OK6410 uboot改造成能使用FTP加载内核和NFS加载文件系统

来源:互联网 发布:linux 父目录 编辑:程序博客网 时间:2024/06/08 00:00

目标是利用uboot中利用TFTP和NFS加载内核镜像和根文件系统,而飞凌官方的uboot源代码是菜单的形式启动的.所以要对官方的uboot进行改造.

首先,我们在uboot的官方网站上下载uboot1.1.6的源代码(与飞提供的源码保持一致).利用原生的uboot中common/main.c替换掉飞凌uboot中的common/main.c.

利用提供的方法将uboot烧写到nandflash中去,nandflash启动后,修改参数:

setenv baudrate 115200
setenv ethaddr 08:08:11:18:12:27  (你的mac地址)
setenv stdin serial
setenv stdout serial
setenv stderr serial
setenv ethact dm9000
setenv bootargs noinitrd root=/dev/nfs rw nfsroot=192.168.1.101:/home/xuxianyin/nfs/rootfs ip=192.168.1.102:192.168.1.101::255.255.255.0 console=ttySAC0,115200
setenv gatewayip 192.168.1.1
setenv netmask 255.255.255.0
setenv ipaddr 192.168.1.102
setenv serverip 192.168.1.101

setenv bootdelay 3

setenv bootcmd "tftp 0xc0008000 uImage;bootm 0xc0008000"

saveenv

其中:192.168.1.101设定成你的tftp服务器的IP地址

192.168.1.102设定成你的开发板的ip地址

/home/xuxianyin/nfs/rootfs 设定成你的文件系统的目录

0 0
原创粉丝点击