1、nandflash分区信息
mtdpart
device nand0 <nandflash0>, # parts = 4
#: name size offset
0: bootloader 0x00040000 0x00000000 //256k
1: params 0x00020000 0x00040000 //128k
2: kernel 0x00200000 0x00060000 //2m
3: root 0x0fba0000 0x00460000 //余下全部
2、设置机器ID
set machid 16a
3、设置环境变量
print //打印环境变量
save //保存环境变量
setenv bootdelay 5 //设置bootcmd延时为5
setenv ipaddr 192.168.1.226 //设置开发板IP
setenv serverip 192.168.1.200 //设置服务器ip(Windows)
setenv gatewayip 192.168.1.254 //设置网关
setenv netmask 255.255.255.0 //设置子网掩码
setenv bootargs noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0,115200
//清除某个环境变量
setenv bootargs //以bootargs为例
save
//清除全部的环境变量
nand erase params
4、tftp烧写
//通过tftp烧写u-boot.bin到nand Flash步骤:
在SecureCRT中依次输入:
tftp 0x30008000 u-boot.bin //将uboot.bin 下载到sdram 0x30008000
nand erase bootloader //擦除bootloader区域
nand write 0x30008000 bootloader //烧写到bootloader
//通过tftp烧写uImage到nand Flash步骤:
在SecureCRT中依次输入:
tftp 0x30008000 uImage
nand erase kernel
nand write 0x30008000 kernel
//烧写YAFFS至Nand Flash
打开 tftpd32.exe 软件, 将 fs_mini.yaffs2 拷贝至工作目录
在SecureCRT中依次输入:
tftp 0x30008000 fs_mini.yaffs2
nand erase root
nand write.yaffs 0x30008000 root $(filesize) // $(filesieze) 是fs_mini.yaffs2 的大小
//烧写JFFS至Nand Flash
打开 tftpd32.exe 软件,将 fs_mini.jffs2 拷贝至工作目录
在SecureCRT中依次输入:
tftp 0x30008000 fs_mini.jffs2
nand erase root
nand write.jffs2 0x30008000 root $(filesize) // $(filesieze) 是fs_mini.yaffs2 大小