Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2260245
  • 博文数量: 218
  • 博客积分: 5767
  • 博客等级: 大校
  • 技术积分: 5883
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-01 14:44
文章存档

2012年(53)

2011年(131)

2009年(1)

2008年(33)

分类: 嵌入式

2011-08-16 13:50:51

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卡启动

阅读(5532) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~