Chinaunix首页 | 论坛 | 博客
  • 博客访问: 276380
  • 博文数量: 39
  • 博客积分: 1215
  • 博客等级: 军士长
  • 技术积分: 471
  • 用 户 组: 普通用户
  • 注册时间: 2011-12-17 19:34
个人简介

grace under pressure

文章分类

全部博文(39)

文章存档

2013年(6)

2012年(28)

2011年(5)

分类: LINUX

2012-02-22 22:28:13

有多事情时间久了总是容易慢慢忘记,下面这些是我常用的启动参数,仅供自己备忘,对于不同的系统,可能有区别,因此仅供大家参考:
nandflash启动:
setenv bootcmd cp.b 0x00030000 0x21500000 0x00200000\;cp.b 0x00300000 0x21100000 0x00400000\;bootm 0x21500000
set ker nand read 21500000 30000 200000//200000为内核大小
set fs nand read 21100000 300000 400000//400000为fs大小
set bootcmd run boot
set boot run fs\;run ker\;bootm 21500000
set bootargs mem=64M console=ttyS0,115200 initrd=0x21100000,4M root=/dev/ram0 rw ip=192.168.1.5:192.168.1.1:192.168.1.100:255.255.255.0::eth0:off


yaffs系统启动:
7M文件系统   2M内核(mtd启动文件系统)
setenv bootcmd cp.b 0x00030000 0x21800000 0x00200000\;cp.b 0x0500000 0x21100000 0x700000\;bootcmd 21800000
set ker nand read 21800000 30000 200000
set bootcmd run boot 
set boot run ker\;run fs\;bootm 21800000
setenv bootargs men=64M console=ttyS0,115200 init=/linuxrc root=/dev/mtdblock1 rw rootfstype=yaffs2 ip=192.168.1.5:192.168.1.1:192.168.1.100:255.255.255.0::eth0:off

28M文件系统   2M内核(mtd启动文件系统)内核从3000地方启动
setenv bootcmd cp.b 0x00030000 0x23700000 0x00200000\;cp.b 0x0E00000 0x21100000 0x2600000\;bootcmd 23700000
set ker nand read 23700000 30000 200000
set bootcmd run boot 
set boot run ker\;run fs\;bootm 23700000
setenv bootargs men=64M console=ttyS0,115200 init=/linuxrc root=/dev/mtdblock2 rw rootfstype=yaffs2 ip=192.168.1.5:192.168.1.1:192.168.1.100:255.255.255.0::eth0:off

28M文件系统   2M内核(mtd启动文件系统)内核从6M地方开始
setenv bootcmd cp.b 0x00600000 0x23700000 0x00200000\;cp.b 0x0E00000 0x21100000 0x2600000\;bootcmd 23700000
set ker nand read 23700000 600000 200000
set bootcmd run boot 
set boot run ker\;run fs\;bootm 23700000


nfs启动:

setenv ethaddr 12:34:56:78:90:12
setenv bootargs console=ttyS0,115200  root=/dev/nfs nfsroot=192.168.1.1:/media/ubuntu/share/fs ip=192.168.1.5:192.168.1.1:192.168.1.100:255.255.255.0::eth0:off


tftp启动内核,nfs启动文件系统:

setenv ethaddr 00:12:34:56:78:9a
setenv ipaddr  192.168.1.5
setenv serverip 192.168.1.1 
setenv netmask 255.255.255.0
setenv rootpath /media/ubuntu/share/fs
//根文件系统在主机上的目录
setenv stdin serial
setenv stdout serial
setenv stderr serial
setenv bootcmd tftp 21000000 uImage\;bootm 21000000 
//bootcmd是u-boot启动后执行的命令,命令之间用分号分隔
//tftp 21000000 uImage 表示通过tftp 将内核映像下载到RAM
//中地址为0×21000000;bootm 21000000 启动linux操作系统


setenv bootargs root=/dev/nfs rw nfsroot=192.168.1.1:/media/ubuntu/share/fs  ip=192.168.1.5: 192.168.1.1:192.168.1.100:255.255.255.0::eth0:off console=ttyS0,115200

注意:在设置网卡时,在eth0的后面加上“:off”

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