首先下载busybox源码
解压
比如我的是busybox-1.23.2, 交叉工具是arm-none-linux-gnueabi-gcc
进入配置,跟配置内核差不多,用menuconfig
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- menuconfig
选择自己要的功能,退出后保存配置
然后编译:
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- CFLAGS="-I/thirdparty/include -L/thirdparty/lib" LDGLAGS="-L/thirdparty/lib"
需要用到libcrypto 等额外库时,则要通过CFLAGS与 LDFLAGS来指定库位置
否则会出现
Trying libraries: crypt m
Library crypt is needed, can't exclude it (yet)
Library m is needed, can't exclude it (yet)
Final link with: crypt m
生成target
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- install
成功后会在源码目录下生成_install 里面就是要用的target
作者:帅得不敢出门 程序群:31843264
阅读(9683) | 评论(0) | 转发(3) |