编译busybox是出错:
coreutils/fsync.c: In function `fsync_main':
coreutils/fsync.c:27: error:
`O_NOATIME' undeclared (first use in this function)
coreutils/fsync.c:27:
error: (Each undeclared identifier is reported on
coreutils/fsync.c:27: error: for each function it appears
in.)
make[1]: *** [coreutils/fsync.o] 错误 1
make: *** [coreutils] 错误 2
解决方法是把cross_compile路径改成3.4.1(原来是3.3.2/bin/arm-linux-),我想可能跟版本有关系吧,然后通过了。顺序是:
$make menuconfig
Build options ---->
[*] Build BusyBox as a static binary (no shared libs)
[*] Do you want to build BusyBox with a Cross Compiler?
(/usr/local/arm/3.3/bin/arm-linux-) Cross Compiler prefix
$make
$make PREFIX=/../rootfs/ install
——————————————————————————————————————————————————
碰到这个错误后,Google时发现另外一种解法,不过好像不好用,不过可以借鉴一下:
1.手动设置Makefile 的ARCH = arm,CROSS_COMPILE = arm-linux-
2.make menuconfig
build选项中指定采用共享库
3.copy ARM编译器中 libc*.so libm*.so
ld*.so到rootbox的lib中。并保持链接关系。
make ;make install
rootbox的意思是指你生成的busybox目录
一般make 完后,make
install
后,会在busybox目录下生成一个_install,这个就你要东东啰。。。
评论