这是我uboot 的环境变量设置,在该设置下可以运行initram 内核(从内存下载到nandflash再运行),但是运行nfs 根文件系统的时候一直出错,各种错误。查看了很多资料后猜想应该是uboot 传递给 linux内核的参数有问题,也就是bootargs 的设置有问题。 #printenv bootargs=noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0,115200 rootfstype=yaffs2 rw mem=64M bootcmd=nand read 0x32000000 0x60000 0x300000; bootm 0x32000000 bootdelay=3 baudrate=115200 ethaddr=08:00:3e:26:0a:5b ipaddr=192.168.1.110 serverip=192.168.1.100 netmask=255.255.255.0 stdin=serial stdout=serial stderr=serial ethact=dm9000 #setenv … … #saveenv … … #bdinfo 可以查看机器码等信息 所以查看资料后就开始对 bootargs 参数进行设置: 因为为了方便对程序测试等工作,使用 nfs 根文件系统可以在不烧写根文件系统到flash中完成对程序的测试工作,因此设置bootargs 使它支持 nfs 根文件系统启动。 #setenv bootargs 'root=/dev/nfs rw nfsroot=10.103.4.216:/nfsroot/rootfs ip=10.103.4.211 console=ttySAC0' #saveenv #tftp 31000000 uImage #bootm 31000000 启动信息如下: … … s3c2440-sdi s3c2440-sdi: running at 0kHz (requested: 0kHz). s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 198kHz). s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 198kHz). s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 198kHz). s3c2440-sdi s3c2440-sdi: powered down. eth0: link down IP-Config: Guessing netmask 255.0.0.0 IP-Config: Complete: device=eth0, addr=10.103.4.211, mask=255.0.0.0, gw=255.255.255.255, host=10.103.4.211, domain=, nis-domain=(none), bootserver=255.255.255.255, rootserver=10.103.4.216, rootpath= Looking up port of RPC 100003/2 on 10.103.4.216 eth0: link up, 10Mbps, half-duplex, lpa 0x0021 Looking up port of RPC 100005/1 on 10.103.4.216 VFS: Mounted root (nfs filesystem) on device 0:11. Freeing init memory: 128K Processing /etc/profile... Done # 最后实现了内核正常启动,nfs 根文...