busybox根文件系统使用记录

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了busybox根文件系统使用记录相关的知识,希望对你有一定的参考价值。

1、DHCP功能配置

1.1、配置Linux内核使能DHCP相关选项: 
[*]Networking support --> 
Networking support 
Networking options --> 
[*]Packet socket 
[*]IP:kernel level autoconfiguration 
[*] IP:DHCP support 
[*]Network packet filtering framework(Netfilter) --> //下层子选项可不作配置 
如下图: 
技术分享 
技术分享

1.2、配置Busybox,使能以下选项: 
Networking Utilities 
[*]udhcp server (udhcpd) 
[*] dhcprelay 
[*] Lease display utility (dumpleases) 
[*]udhcp client (udhcpc) 
[*] Verify that the offered address is free,using ARP ping 
如下图: 
技术分享

1.3、使用Busybox下的simple.script 
进入busybox目录:busybox1.19.2/example/udhcp/,拷贝文件simple.script到根文件系统的/usr/share/udhcpc/目录下,更名为default.script,再将default.script中RESOLV_CONF=”/etc/resolv.conf”更改为RESOLV_CONF=”/tmp/resolv.conf”。 
(说明:由于测试使用Cramfs文件系统,etc目录不可写,运行udhcpc无法在/etc目录下创建resolv.conf文件。)

1.4、拷贝工具 
重新编译安装busybox,将安装文件拷至根文件系统目录,运行udhcpc即可动态获取IP。

以上是关于busybox根文件系统使用记录的主要内容,如果未能解决你的问题,请参考以下文章

使用BusyBox制作根文件系统

使用BusyBox制作Linux根文件系统

Busybox构建根文件系统和制作Ramdisk

使用busybox1.21.1制作根文件系统

根文件系统构建(Buildroot 方式)

busybox最小根文件系统