linuxrc -> busybox,linuxrc就是busybox程序,也就是内核启动的第一个程序
编译busybox:
1.Makefile里加入交叉编译器前缀:CROSS_COMPILE ?= arm-linux-
2.(可以参考韦东山开发手册)
3.make
4. 创建根文件系统目录:mkdir -p /work/nfs_root/first_fs
5.将编译好的busybox安装到指定的目录/work/nfs_root/first_fs,make CONFIG_PREFIX=/work/nfs_root/first_fs install
第2步的操作(可以参考韦东山开发手册):
1.//添加busybox的自动补全功能:
-> Busybox Settings |
-> Busybox Library Tuning
[*] Tab completion
2.//连接/编译选项
-> Busybox Settings |
| -> Build Options
[ ] Build BusyBox as a static binary (no shared libs)
//这个选项表示是否编译成静态库,目前配置为不编译成静态库,原因不清楚
3.//要使用可加载的模块,需要把下面的配置选上:
-> Linux Module Utilities
[*] insmod | |
| |[*] Module version checking | |
| |[*] Add module symbols to kernel symbol table | |
| |[*] In kernel memory optimization (uClinux only) | |
| |[*] Enable load map (-m) option | |
| |[*] Symbols in load map | |
| |[*] rmmod | |
| |[*] lsmod | |
| |[*] lsmod pretty output for 2.6.x Linux kernels | |
| |[*] modprobe | |
| |[*] Multiple options parsing | |
| |[*] Fancy alias parsing | |
| |--- Options common to multiple modutils | |
| |[*] Support tainted module checking with new kernels | |
| |[*] Support version 2.2.x to 2.4.x Linux kernels | |
| |[*] Support version 2.6.x Linux kernels
4.//为了可以很方便的构造/dev/目录并且可以支持热插拔设备,需要支持mdev。另外,为了方便调试,要选中mount,umount命令,并让mount命令支持NFS(网络文件系统)
-> Linux System Utilities
[*] mdev | |
| |[*] Support /etc/mdev.conf | |
| |[*] Support command execution at device addition/removal
[*] mount | |
| |[*] Support mounting NFS file systems
[*] umount | |
| |[*] umount -a option
5.//除了其他默认配置外,增加ifconfig命令:
-> Networking Utilities
[*] ifconfig | |
| |[*] Enable status reporting output (+7k) | |
| |[*] Enable slip-specific options "keepalive" and "outfill" | |
| |[*] Enable options "mem_start", "io_addr", and "irq" | |
| |[*] Enable option "hw" (ether only) | |
| |[*] Set the broadcast automatically