1、busybox源码下载

下载地址

2、修改Makefile

(1) ARCH = arm
(2) CROSS_COMPILE = /usr/local/arm/arm-2009q3/bin//arm-none-linux-gnueabi-

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 install

错误:sync.c:(.text.sync_main+0x78): undefined reference to `syncfs’
collect2: ld returned 1 exit status
Makefile:718: recipe for target ‘busybox_unstripped’ failed
make: * [busybox_unstripped] Error 1
解决:find -name “sync.c” 得到./coreutils/sync.c
这里写图片描述

5、设置安装的路径/root/rootfs

这里写图片描述

6、设置bootargs:
setenv bootargs root=/dev/nfs nfsroot=192.168.0.109:/root/rootfs  ip=192.168.0.20:192.168.0.109:192.168.0.1:255.255.255.0::eth0:off  init=/linuxrc console=ttySAC2,115200   

注意:/root/rootfs  这个目录不是乱设置的,是与nfs的设置要一致才可以
问题:VFS: Cannot open root device "nfs" or unknown-block(2,0)
1、kernel的nfs的配置没有弄
2、uboot的启动命令问题
3、nfs的路径/root/rootfs确保是安装nfs的路径
7、

这里写图片描述

8、我们把共享目录下的etc复制到root/rootfs中

问题:
这里写图片描述
这里写图片描述

这里写图片描述

问题:nfs: server 192.168.0.109 not responding, still trying
解决:
这里写图片描述

由于找到了问题所在,我就没继续配置
提供做好的rootfs,登陆名root,没有密码

做好的rootfs下载地址

Logo

更多推荐