u-boot烧写及引导参数设置

来源:互联网 发布:淘宝客真的很多赚钱吗 编辑:程序博客网 时间:2024/05/22 09:00
u-boot烧写及引导参数设置
IP地址基本设置:
set ipaddr 192.168.1.56
set serverip 192.168.1.54
set gatewayip 192.168.1.1
save
烧写内核使用的命令:
tftp 0x33000000 uImage
nand erase 0x80000 0x200000
nand  write  0x33000000 0x80000 0x200000


烧写文件系统基本命令:
tftp 0x30008000 root.cramfs //把tftp文件所在目录下的root.cramfs拷在0x30008000(内存)起始位置
nand erase 0x500000 0x3e00000  //从0x500000(nand flash)开始擦除,大小为0x3e00000
nand write 0x30008000 0x500000 0x3e00000//把0x30008000内容写到0x500000,大小为0x3e00000

设置内核nand启动的参数:
set bootargs root=/dev/mtdblock2 console=ttySAC0 init=/linuxrc
set bootcmd nand read 0x33000000 0x80000 0x200000\; bootm 0x33000000 //设置环境变量
save

设置yaffs文件系统启动参数:
set bootargs root=/dev/mtdblock2 console=ttySAC0,115200 rootfstype=yaffs2 mem=32mb  
save
启动系统


使用tftp动态挂载内核与 nfs文件系统:
首先,烧写uboot并配置IP地址
最后,启动uboot,设置内核与nfs文件系统的启动参数,在串口输入以下命令:
set bootcmd tftp 0x33000000 uImage\;bootm 0x33000000
set bootargs root=/dev/nfs rw nfsroot=192.168.1.54:/opt/nfs/filesys ip=192.168.1.56:192.168.1.54:255.255.255.0 console=ttySAC0,115200 mem=64mb
save


烧写到norflash启动

tftp 0x30000000 uImage
erase 0x00040000 0x001dffff
cp.b 0x30000000 0x00040000 $(filesize)
set bootargs root=/dev/nfs rw nfsroot=192.168.1.54:/opt/nfs/filesys ip=192.168.1.56:192.168.1.54:255.255.255.0 console=ttySAC0,115200 mem=64mb
set bootcmd cp.b 0x00040000 0x33000000 $(filesize)\;go 0x33000000
saveenv
reset

u盘启动

sd卡启动


原创粉丝点击