开发环境:Ubuntu 1404
交叉工具链:fsl-imx-x11-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-neon-toolchain-4.1.15-2.1.0.sh
BusyBox:busybox-1.23.2 下载地址https://busybox.net/downloads/
一:编译busybox
将busybox-1.23.2解压到ubuntu下面,然后:
source /opt/fsl-imx-x11/4.1.15-2.1.0/environment-setup-cortexa9hf-neon-poky-linux-gnueabi
export arch=arm
make menuconfig
Busybox Settings --->
Build Options --->
选中:Build BusyBox as a static binary (no shared libs)
并且配置Cross Compiler prefix 等下面两个选项,选项中内容填充可以在ubuntu中输入:env
配置如下:
Busybox Settings --->
Installation Options ("make install" behavior) --->
填上自己rootfs的路径。我的是:/smb/study/rootfs
配置好以后,make。编译即可。
二:安装
make install 即可安装busybox到指定路径。
cd /smb/study/rootfs
mkdir dev home tmp proc sys
mknod console c 5 1
mknod null c 1 3
如果没有权限,命令前面加上sudo
另外把busybox-1.23.2目录下examples->bootfloopy 中的etc 复制到rootfs文件夹下,这样就根文件系统做好了
自己在根据实际情况改改脚本即可