(一). 搭建 rootfs 制作环境
1.1).下载busybox
https://busybox.net/downloads/
选择版本
busybox-1.32.0.tar.bz2
mkdir busybox-1.32
cd busybox-1.32
cp ../busybox-1.32.0.tar.bz2 ./
mkdir rootfs
ls
busybox-1.32.0.tar.bz2 rootfs
tar xvf busybox-1.32.0.tar.bz2
cd rootfs
mkdir -p dev etc proc sys tmp mnt lib var/run
cd ../busybox-1.32.0/
1.2).配置busybox
make menuconfig
需选择配置内容:
a).—Build Options
Cross compiler prefix
arm-linux-
b).—Installation Options (“make install” behavior)
Destination path for ‘make install’
/home/robot/busybox-1.32/rootfs /* path /
c).
Coreutils—>
[ ] sync (3.8 kb) / cancel /
d).
Linux System Utilities—>
[ ] nsenter (6.5 kb) / cancel */
1.3).编译安装
make
make install //注意 make install 配置路径
|