由于交叉编译博芯官方提供的busybox 1.10,出现了不少问题,刚好找到一篇出现问题一样的文章
我的平台是fedora8,
交叉编译器:/usr/local/arm/3.3.2/bin/arm-linux-
Busybox版本:busybox-1.10.1.tar.bz2
解压,进入目录,
make menuconfig
Busybox Settings-->Build Options--> Build BusyBox as a static binary (no shared libs) 选上。静态编译,为了以后方便。
在Busybox Settings-->Build Options-->Cross Compiler Prefix
填入交叉编译器路径。这里用3.3.2的版本。
/usr/local/arm/3.3.2/bin/arm-linux-
(注意最后是arm-linux-不多不少)
由于编译器版本,glibc的版本匹配问题,编译过程中可能会出错。有些错误是莫名其妙的。
编译过程中出现了
In file included from miscutils/watchdog.c:13:
/usr/local/arm/3.3.2/arm-linux/sys-include/linux/watchdog.h:17: error: parse error before "__u32"
/usr/local/arm/3.3.2/arm-linux/sys-include/linux/watchdog.h:19: error: parse error before "identity"
/usr/local/arm/3.3.2/arm-linux/sys-include/linux/watchdog.h:20: error: parse error before ''}'' token
make[1]: *** [miscutils/watchdog.o] 错误 1
make: *** [miscutils] 错误 2
可是/usr/local/arm/3.3.2/arm-linux/sys-include/linux/watchdog.h相关行
struct watchdog_info {
__u32 options; /* Options the card/driver supports */
__u32 firmware_version; /* Firmware version of the card */
__u8 identity[32]; /* Identity of the board */
};
并没有语法错误,解决办法为,去掉相应选项,
make menuconfig
去掉Miscellaneous Utilities --->里的最后一个watchdog(实际上它是指pc机上的,和我们板子的看门狗没有关系)
继续make
networking/brctl.c: In function `brctl_main'':
networking/brctl.c:186: error: `SIOCBRADDBR'' undeclared (first use in this function)
networking/brctl.c:186: error: (Each undeclared identifier is reported on
networking/brctl.c:186: error: for each function it appears in.)
networking/brctl.c:186: error: `SIOCBRDELBR'' undeclared (first use in this function)
networking/