一、使用busybox制作rootfs
1、下载源码解压到指定目录
$ mkdir busybox_xxx
$ cd busybox_xxx
$ wget http://busybox.net/downloads/busybox.1.33.1.tar.bz2
如果提示没有wget命令,先安装wget工具,安装方法sudo apt-get install wget
$ tar -xvf busybox.1.33.1.tar.bz2 -C ./
$ cd busybox.1.33.1
2、配置源码,指定:arm-none-linux-gnueabi-交叉编译器
$ make menuconfig
busybox settings--->
buibld options--->
[*]build busybox...
[]force nommu
[]build with large....
(arm-none-linux-gnueabi-)cross complier prefix
()additional cflags
3、编译
$ make
出现如下问题:
util-linux/lib.a(nsenter.o): In function `nsenter_main':
nsenter.c:(.text.nsenter_main+0x184): undefined reference to `setns'
coreutils/lib.a(sync.o): In function `sync_common':
sync.c:(.text.sync_common+0x38): undefined reference to `syncfs'
1)nsenter问题解决方法:
nsenter命令是一个可以在指定进程的命令空间下运行指定程序的命令。它位于util-linux包中。在文件系统中可以不需要
<