the pitfull way to create a uClinux image including gdb.
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了the pitfull way to create a uClinux image including gdb.,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含4166字,纯文字阅读大概需要6分钟。
内容图文
![the pitfull way to create a uClinux image including gdb.](/upload/InfoBanner/zyjiaocheng/495/2b7a54fc5e224283a2685cd78a0797a1.jpg)
After downloaded and installed the GCT‘s SDK and toolchain, we try to make an our own image which include gdb. But the way is much more tortuous than we thought. Most problems are related with mtd-utils and the most difficult problem is related with uClib. Here, record all pits and resolving way simply.
1. make menuconfig
zconf.tab.c: undefined reference to kconf_id_lookup()
Deal:
add declaration for kconf_id_lookup() into config/kconfig/zconf.tab.c:
extern struct kconf_id * kconf_id_lookup(register const char * str, register unsigned int len);
2. make
GEN extra/locale/wctables.h
extra/locale/Makefile.in:179: recipe for target ‘extra/locale/wctables.h‘ failed
Deal:
download gen_wctype.patch from http://ftp.osuosl.org/pub/manulix/scripts/build-scripts/PPFILES/ppfiles-uclibc/gen_wctype.patch and apply it to uClibc/extra/locale/gen_wctype.c.
3. make
user/gdb/gdb/cp-name-parser.y:1980:20:error comparison between ‘enum demangle_compenent_type‘ and ‘enum<anoymous>‘[-Werror=enum-compare]
Deal:
comparing between different enum types is an error. force change on of them to int.
4. make
.../gdb/ada-lang.c:8186:30: error: comparison between ‘enum exp_opcode‘ and ‘enum ada_operator‘[-Werror=enum-compare]
Deal:
Same as the last.
5. make
mkfs.ubifs/hashtable/hashtable_itr.c:42:1: error: redefinition of ‘hashtable_iterator_key‘
Deal:
This is the fault of mtd-utils-1.5.0.
Change the extern to static before the definition of hashtable_iterator_key and hashtable_iterator_value in hashtable_itr.h.
Delete the definitions of hashtable_iterator_key and hashtable_iterator_value in hashtable_itr.c
Do the same things for hashtable_itr.c and hashtable_itr.h in tools/mtd-utils/mkffs.ubifs and user/mtd-utils/mkfs.ubifs. If not, there will be and an obscure error:
collect2: ld returned 1.
This is because the hashtable_iterator_key and hashtable_iterator_value are multidefined in three places. So ld won‘t know which to use.
6. make
mkffs.jffs2.c:70:21: fatal error: sys/acl.h: No such file or directory.
Deal:
make WITHOUT_XATTR=1
Just don‘t use the libacl but zlib.
Another way: cross-compile and install libacl-dev. It‘s not necessary.
7. make WITHOUT_XATTR=1
compr_zlib.c:39: fatal error: zlib.h: No such file or directory.
Deal:
Download zlib-1.2.11.tar.gz and lzo.2.10.tar.gz
tar zxvf zlib-1.2.11.tar.gz
cd zlib-1.2.11
CC=armv7el-linux-gcc ./configure --shared --prefix=/opt/armv7el/usr/arm-buildroot-linux-uclibcgnueabi/
make
make install
tar zxvf lzo.2.10.tar.gz
cd lzo.2.10
CC=armv7el-linux-gcc ./configure --host=armv7-linux --prefix=/opt/armv7/usr/arm-buildroot-linux-uclibcgnueabi/
make
make install
8. make WITHOUT_XATTR=1
arm-buildroot-linux-uclibcgnueabi/bin/ld:cannot find -lz
Deal:
Need to cross-compile openssl and install to /opt/armv7el/usr/arm-buildroot-linux-uclibcgnueabi/
Downlaod openssl-1.1.0g.tar.gz from https://www.openssl.org/source/
tar zxvf openssl-1.1.0g.tar.gz
cd openss-1.1.0g
CC=armv7el-linux-gcc ./configure --prefix=/opt/armv7el/usr/arm-buildroot-linux-uclibcgnueabi/
9. make WITHOUT_XATTR=1
arm-buildroot-linux-uclibcgnueabi/bin/ld: cannot find -llzo2
Deal:
This is becauses of the failure of 7 steps when make lzo.2.10
10. make WITHOUT_XATTR=1
mkfs.ubifs/mkfs.ubifs.h:46:23: fatal error: uuid/uuid.h: No such file or directory
Deal:
Download e2fsprogs-libs-1.43.7.tar.gz from https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.43.7/
tar zxvf e2fsprogs-libs-1.43.7.tar.gz
cd e2fsprogs-libs-1.43.7
CC=armv7el-linux-gcc ./configure --host=armv7-linux --prefix=/opt/armv7el/usr/arm-buildroot-linux-uclibcgnueabi/
make
sudo make install.
About Cross-compile:
1. toolchains/usr/, cross-compile tools‘ home.
2. /opt/armv7el/usr/arm-buildroot-linux-uclibcgnueabi/,all files ( head files, libs and so on) whose host is target machine but may be refered to during compiling should be here.
the pitfull way to create a uClinux image including gdb.
标签:lookup imp force directory ted collect iso who erro
本文系统来源:http://www.cnblogs.com/clblacksmith/p/7966207.html
内容总结
以上是互联网集市为您收集整理的the pitfull way to create a uClinux image including gdb.全部内容,希望文章能够帮你解决the pitfull way to create a uClinux image including gdb.所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。