arm-linux下busybox文件系统制作
一、使用busybox制作rootfs
1.下载busybox源码
//源码下载地址、版本可根据自己需求来进行下载
https://www.busybox.net/downloads/
2.安装及相应配置
//将下载好的源码放入我们虚拟机中我这里使用的是乌班图18并进行解压
编译工具进行检查,在解压目录下makefile文件中进行修改,添加以下内容
3.make menuconfig配置
Busybox Settings--->
Build Options--->
[*]Build BusyBox as a static binary(no shared libs)
Busybox Library Tuning--->
[*]vi-style line editing commands
[*]Fancy shell prompts
Linux Module Utilities--->
[ ]Simplified modutils
[*]insmod
[*]rmmod
[*]lsmod
[*]modprobe
[*]depmod
Linux System Utilities--->[*]mdev
[*]Support /etc/mdev.conf
[*]Support subdirs/symlinks
[*]Support regular expressions substitutions when renaming dev
[*]Support command execution at device addition/removal
[*]Support loading of firmwares
4.make
在进行make 编译时出现了以下错误,下面是错误的解决方法
错误1
networking/libiproute/ipaddress.c: In function 'print_addrinfo':
networking/libiproute/ipaddress.c:345: error: 'IFA_F_DADFAILED' undeclared (first use in this function)
networking/libiproute/ipaddress.c:345: error: (Each undeclared identifier is reported only once
networking/libiproute/ipaddress.c:345: error: for each function it appears in.)
scripts/Makefile.build:197: recipe for target 'networking/libiproute/ipaddress.o' failed
make[1]: *** [networking/libiproute/ipaddress.o] Error 1
Makefile:751: recipe for target 'networking/libiproute' failed
make: *** [networking/libiproute] Error 2
4.1解决方法
vim networking/libiproute/ipaddress.c 在345行加入条件编译
错误2
util-linux/lib.a(nsenter.o): In function `nsenter_main':
nsenter.c:(.text.nsenter_main+0x180): undefined reference to `setns'
4.2解决方法
在make menuconfig下去掉相应的配置选项
以上就是在make编译中遇到的问题,如果大家遇到了其他问题,也可按上述解决方式,如果报错的文件我们没有用到就在make menuconfig中去掉该配置选项
5.make install安装
在进行make install 时如果我们不指定安装路径则会在当前路径下生成一个_install 安装在该文件夹中,但一般来说我们在进行安装时会安装在自己选择的路径中,我们可以在Make menconfig中进行安装路径的更改。
出现下面内容则说明安装成功了