uboot启动参数设置和内核引导方法总结

来源:互联网 发布:刘德华唱功知乎 编辑:程序博客网 时间:2024/05/29 10:10
uboot启动参数设置和内核引导方法总结
1. 从flash启动内核 ,挂载NFS网络文件系统
环境搭建:
setenv bootcmd bootm 0x2060000
setenv ipaddr 10.108.23.111
setenv ethaddr 00:0E:99:EF:EF:22
setenv serverip 10.108.23.115
setenv nfshost 10.108.23.115
setenv rootpath /home/filesys


setenv bootargs console=ttyS0,115200n8 video=dm64xxfb:interface=composite:mode=ntsc:output=pal noinitrd rw eth=eth0 ip=10.108.23.111::10.108.23.115 root=/dev/nfs nfsroot=10.108.23.115:/home/filesys,nolock mem=120M


应用uboot1.3.4, 最后设置的启动参数,可以实现OSD功能:20120307
setenv bootargs mem=116M console=ttyS0,115200n8 root=/dev/nfs rw nfsroot=10.108.23.115:/home/filesys,nolock ip=dhcp video=davincifb:vid0=0,2500K:vid1=0,2500K:osd0=720x576x16,2025K  davinci_enc_mngr.ch0_output=COMPOSITE davinci_enc_mngr.ch0_mode=ntsc




saveenv
EVM板关电重起;


烧写内核:


把uImage考入到/tftpboot目录
tftp 0x80800000 uImage
在uboot下:erase 0x2060000 +200000
cp.b 0x80800000 0x2060000 200000


完毕
2. TFTP引导内核启动,挂载NFS网络文件系统
法一:
从上面改几个环境变量参数即可:
setenv bootcmd ‘dhcp;bootm’
setenv bootfile uImage
saveenv
重启
PS:此法实现内核自启动
法二:
进入uboot下载模式,输入命令:
tftp 0x80800000 uImage //把uImage内核文件加载到内存0x80800000地址处
bootm 0x80800000 //从内存0x80800000地址处启动内核






以下是法一:启动打印信息




*****************************************************
              *Laboratary of ITS, BIT* 
*****************************************************
Hit any key to stop autoboot:  0 
BOOTP broadcast 1
DHCP client bound to address 10.108.22.148
TFTP from server 10.108.23.115; our IP address is 10.108.22.148
Filename 'uImage'.
Load address: 0x80700000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         ############################################################
done
Bytes transferred = 1638048 (18fea0 hex)
## Booting image at 80700000 ...
   Image Name:   Linux-2.6.18_pro500-davinci_evm-
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1637984 Bytes =  1.6 MB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
OK


Starting kernel ...
原创粉丝点击