uboot启动参数设置分类及方法

一、nfs启动内核与根文件系统,内核与根文件系统都在nfs上

bootargs=noinitrd root=/dev/nfs rw nfsroot=192.168.0.1:/home/tekkaman/working/nf
s/rootfs ip=192.168.0.2:192.168.0.1::255.255.255.0 console=ttySAC0,115200 init=/
linuxrc mem=64M
bootcmd=nfs 0x30008000 192.168.0.1:/home/tekkaman/working/nfs/zImage.img;bootm

(noinitrd 表示没有使用ramdisk)

二、ramdisk启动根文件系统,读取nandflash 中的内核与根文件系统到ram中执行

bootargs= initrd=0x32000000,0x200000 root=/dev/ram rw console=ttySAC0 mem=64M
bootcmd= nand write 0x31000000 0x100000 0x400000; nand write 0x32000000

0x700000 0x200000 ; bootm 0x31000000

0x32000000 根文件系统ramdisk.gz拷贝到内存中的位置
0x31000000 内核被考到内存中的位置
0x100000 内核在NANDFLASH中的位置
0x400000 内核的大小
0x700000 根文件系统在NANDFLASH中的位置
0x200000 根文件系统的大小


三、tftp启动内核(uboot要支持网卡)

bootcmd= "tftp 0x32000000 uImage; bootm 0x32000000"


bootargs="noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC0"

四、mmc上装载内核并启动(uboot要支持sd卡)

bootcmd="mmc init; fatload mmc 1 0x30008000 zImage.img;bootm

sd卡初始化后

五、usb设备上装载内核并启动(uboot要支持u盘)

bootcmd="usb start ; fatload usb 0:4 0x30008000 zImage;bootm

start初始化usb盘后,“0:4”表示初始化后,内核在u盘的第四分区。

原文地址:https://www.cnblogs.com/alan666/p/8312224.html