the pitfull way to create a uClinux image including gdb.
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
If same error appears again, then it needs to install them on the host computer.
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.
If the same error appears still, then please install it into host computer too:
./configure
make && make install
11. Please install openssl library( with development headers)
apt-get install libssl-dev
apt-get install libssl0.9.8
12. cannot find makedepend
apt-get install xutils-dev
13. yacc cannot found
apt-get install flex bison
14. undefined reference to pcap_parse
apt-get install libpcap-dev libcap-dev
15. mkimage not found
apt-get install u-boot-tools
16. Makefile:247: recipe for target 'linux' failed
There are many redefined PHYS_OFFSET warnings.
#ifdef PHYS_OFFSET
#undef PHYS_OFFSET
#endif
#define PHYS_OFFSET __pv_phys_offset
17. If prompt: /usr/include/err.h:378:7 error: unknown typename ERR_FNS, please add the following three lines into /usr/include/err.h
typedef struct st_ERR_FNS ERR_FNS;
extern void warnx (__const char *__format, ...);
extern void warn (__const char *__format, ...);
18. /opt/armv7el/usr/lib/gcc/arm-buildroot-linux-uclibcgnueabi/4.7.3/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: cannot find -lcrypt_old
config/auto.conf:393:CONFIG_LIB_LIBCRYPT_OLD=n --> config/auto.conf:393:CONFIG_LIB_LIBCRYPT_OLD=
config/.config:54:CONFIG_LIB_LIBCRYPT_OLD=y --> config/.config:54:CONFIG_LIB_LIBCRYPT_OLD=
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.的更多相关文章
- 《Continuous Integration》读书笔记
Trigger a Build whenever a change occurs. it can help us reduce assumptions on a projecvt by rebuild ...
- 转:45 个 LoadRunner 面试问题(附答案)_纯英文,太有逼格了
What is load testing? - Load testing is to test that if the application works fine with the loads th ...
- PHP filesystem attack vectors
http://www.ush.it/2009/02/08/php-filesystem-attack-vectors/ On Apr 07, 2008 I spoke with Kuza55 and ...
- ansible 安装使用
ansible ansible源码安装 yum -y install python-jinja2 PyPAML python-parmiko python-babel python-crypto ta ...
- 轻松解决Linux安装Eclipse方法
随着Linux的发展,很多人开始学习Linux系统,你了解Linux系统么?你是Linux系统的应用者么?本文为你详细介绍Linux安装Eclipse,为你在学习Linux安装Eclipse时起一定的 ...
- hadoop文件系统FileSystem详解 转自http://hi.baidu.com/270460591/item/0efacd8accb7a1d7ef083d05
Hadoop文件系统 基本的文件系统命令操作, 通过hadoop fs -help可以获取所有的命令的详细帮助文件. Java抽象类org.apache.hadoop.fs.FileSystem定义了 ...
- 一步一步使用sklearn
http://kukuruku.co/hub/python/introduction-to-machine-learning-with-python-andscikit-learn Hello, %u ...
- The 10 Most Important Security Controls Missing in JavaEE--reference
JavaEE has some excellent built-in security mechanisms, but they don’t come close to covering all th ...
- (原创) mac 10.9.2 eclipse 的 CDT 的 异常的修复
测试平台:macbook air 2012 , os x 10.9.2 , eclipse 4.3 在升级了 10.9 之后,eclipse 的CDT 无法正常使用了 异常表现: 1. 文 ...
随机推荐
- C#反射实现 C# 反射 判断类的延伸类型 使用代码生成工具Database2Sharp快速生成工作流模块控制器和视图代码 C# ADO.NET的SqlDataReader对象,判断是否包含指定字段 页面中添加锚点的几种方式 .net 简单实用Log4net(多个日志配置文件) C# 常用小点
C#反射实现 一.反射概念: 1.概念: 反射,通俗的讲就是我们在只知道一个对象的内部而不了解内部结构的情况下,通过反射这个技术可以使我们明确这个对象的内部实现. 在.NET中,反射是重要的机制, ...
- atitit r9 doc on home ntpc .docx
卷 p2soft 的文件夹 PATH 列表 卷序列号为 9AD0-D3C8 D:. │ Aittit pato 面对拒绝 的回应.docx │ Atitit 中国明星数量统计 attilax. ...
- UltraVNC 简体中文版 1.2.2.1
1.专门针对WinXP进行编译,同时适用XP之后的Windows版本(XP/Vista/8.1/10/2003/2008/2012): 2.配置低的计算机,Win8.1之前的系统,需要安装Mirror ...
- [HDFS Manual] CH7 ViewFS Guide
ViewFS Guide ViewFS Guide 1 介绍 2. The Old World(Prior to Federation) 2.1单个Namenode Clusters 2.2 路径使用 ...
- Asp.Net Nuget常用命令
1.安装 Install-Package EntityFramework //ef Install-Package EntityFramework.zh-Hans //ef中文
- ph 提交代码的步骤;
ph 提交代码的步骤: git status 查看状态: ls -ah 查看文件: git stash list 查看本地缓存的文件: git branch 查看本地的分支: git checkout ...
- Deepin 15.5上安装 Node.js
Node.js 源码安装 以下部分我们将介绍在Ubuntu Linux下安装 Node.js . 其他的Linux系统,如Centos等类似如下安装步骤. 在 Github 上获取 Node.js 源 ...
- CentOS 7下安装samba
Samba是一种软件,它可以运行在非Windows平台上,比如UNIX, Linux, IBM System 390, OpenVMS或其他操作系统.Samba使用安装在主机上的TCP/IP协议.当正 ...
- Cocoapods 创建自己的公开库、私有库
如何创建自己的共有库 1.注册Trunk trunk需要CocoaPods 0.33版本以上,用pod --version 命令查看版本 CocoaPods版本 如果版本低,需要升级: sudo ge ...
- HTTPS 通讯流程
原文地址 https://blog.csdn.net/wangweilica6/article/details/50171457 一.简介 前一篇文章,我总结了下,如何部署https服务,开通ssl通 ...