标签:偏移地址 参数 名称 配置 otc OLE erase rip ipaddr
一、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;
4. 查看Nandflash的分区: # mtdpart
回显:
device nand0 <nandflash0>, # parts = 4
#: name size offset mask_flags
0: bootloader 0x00040000 0x00000000 0
1: params 0x00020000 0x00040000 0
2: kernel 0x00200000 0x00060000 0
3: root 0x0fda0000 0x00260000 0
5. 保存
# save;
二、 烧写命令:
1. -->tftp命令
1)uboot
# tftp 32000000 u-boot.bin
# nand erase 0 40000 //擦除 偏移地址:0x00000000 大小:0x00040000字节
# nand write 32000000 0 40000 //从内存0x32000000为开始地址的 大小:0x00040000字节 写入 nandflash 偏移地址:0x00000000
2)uImage
# tftp 30000000 uImage_digitpic
# nand erase 0x00060000 0x00200000
# nand write 30000000 0x00060000 0x00200000
启动内核:
# boot;
# bootm 30000000
3)yaffs2烧写:
# tftp 32000000 fs_mini_mdev_new_digitpic.yaffs2
//# nand erase 0x00260000 0xfda0000 //直接写地址
# nand erase root; //看分区写名称代替地址
//# nand write.yaffs 32000000 0x00260000 0x0fda0000
# nand write.yaffs 30000000 0x00260000 $(filesize); //实际大小$(filesize);
2. -->nfs命令
1)// 下载u-boot u-boot_2012_org.bin
nfs 32000000 10.70.12.103:/work/nfs_root/u-boot_2012_k4.bin;
nand erase bootloader;
nand write 32000000 bootloader;
2)uImage
# nfs 30000000 10.70.12.103:/work/nfs_root/uImage_nolcd
# bootm 30000000
3.-->挂载命令
mount -t nfs -o nolock,vers=2 10.70.12.103:/work/nfs_root/ /mnt
u-boot、kernel、root系统烧写和挂载命令命令
标签:偏移地址 参数 名称 配置 otc OLE erase rip ipaddr
原文地址:https://www.cnblogs.com/lxl-lennie/p/10207213.html