一、uboot 環境變量:
1. 打印環境變量:# print
2. 設置啟動參數
# set bootargs noinitrd init=/linuxrc console=ttySAC0,115200 root=/dev/nfs nfsroot=192.168.1.103:/work/nfs_root/1.20_fs ip=192.168.1.105:192.168.1.103:192.168.1.1:255.255.255.0::eth0:off
# set bootargs console=ttySAC0,115200 root=/dev/nfs nfsroot=192.168.1.113:/work/nfs_root/1.20_fs ip=192.168.1.105:192.168.1.113:192.168.1.1:255.255.255.0::eth0:off
設置jffs2 文件啟動:
#set bootargs console=ttySAC0 root=/dev/mtdblock3 rootfstype=jffs2 // jffs2
########啟動文件系統時亂碼問題解決:
# set bootargs console=ttySAC0,115200 root=/dev/mtdblock3 // yaffs 出現亂碼時可用
# set bootcmd 'nand read 30000000 kernel;bootm 30000000'
// 設置機器ID:
# set machid 16a //亂碼方法
3. 配置本機/服務器ip:
# set ipaddr 10.70.12.155
# set serverip 10.70.12.103;
# set ethaddr 00:0c:29:4d:e4:f4;
回顯:
1: params 0x00020000 0x00040000 0
2: kernel 0x00200000 0x00060000 0
3: root 0x0fda0000 0x00260000 0
# nand erase 0 40000 //擦除 偏移地址:0x00000000 大小:0x00040000字節
# nand write 32000000 0 40000 //從內存0x32000000為開始地址的 大小:0x00040000字節 寫入 nandflash 偏移地址:0x00000000
# nand erase 0x00060000 0x00200000
# nand write 30000000 0x00060000 0x00200000
# bootm 30000000
//# nand erase 0x00260000 0xfda0000 //直接寫地址
# nand erase root; //看分區寫名稱代替地址
//# nand write.yaffs 32000000 0x00260000 0x0fda0000
# nand write.yaffs 30000000 0x00260000 $(filesize); //實際大小$(filesize);
nfs 32000000 10.70.12.103:/work/nfs_root/u-boot_2012_k4.bin;
nand erase bootloader;
nand write 32000000 bootloader;