您的位置:首页 > 编程语言 > PHP开发

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

2014-08-25 12:42 567 查看
目标是利用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 设定成你的文件系统的目录
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: