how to setup uboot enviroment variable for linux booting
Uboot needs to pass command line variables to linux kernel during bootstrapping the kernel.
1. NFS boot -- assume nfs rootfiles system is ready and exported by NFS server
a. set
nfs_boot=run nfsargs addbootfile addip;tftpboot $(kernel_addr) $(bootfile);bootm $(kernel_addr)
nfsargs=setenv bootargs root=/dev/nfs rw console=ttyS0,115200 mem=128M nfsroot=172.30.80.217:/localhome/wli/rootfs
addbootfile=setenv bootfile uImage_$(kernel_ver)
addip=setenv bootargs $(bootargs) ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname):$(netdev):off panic=1
2. RAM boot
ram_boot=run ramargs addip;tftpboot $(kernel_addr) bootimg_f;bootm $(kernel_addr)
ramargs=setenv bootargs root=/dev/ram console=ttyS0,$(baudrate) ramdisk_size=20000
The bootfile is bootimg_f, which combine kernel image and root file system together.
1. NFS boot -- assume nfs rootfiles system is ready and exported by NFS server
a. set
nfs_boot=run nfsargs addbootfile addip;tftpboot $(kernel_addr) $(bootfile);bootm $(kernel_addr)
nfsargs=setenv bootargs root=/dev/nfs rw console=ttyS0,115200 mem=128M nfsroot=172.30.80.217:/localhome/wli/rootfs
addbootfile=setenv bootfile uImage_$(kernel_ver)
addip=setenv bootargs $(bootargs) ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname):$(netdev):off panic=1
2. RAM boot
ram_boot=run ramargs addip;tftpboot $(kernel_addr) bootimg_f;bootm $(kernel_addr)
ramargs=setenv bootargs root=/dev/ram console=ttyS0,$(baudrate) ramdisk_size=20000
The bootfile is bootimg_f, which combine kernel image and root file system together.
0 Comments:
Post a Comment
<< Home