一、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;