1,板卡厂商
根据给的基于windows的软件,直接按照步骤,擦除flash,选择文件,输入地址,然后烧写。
必备方式
2,nfs 这个要确定uboot是否配了nfs的功能
File systems ---> Network File Systems下配置。
nfs 30008000 192.168.1.100:/home/work/ARM/uImage
nfs 32000000 192.168.1.100:/home/work/ARM/rootfs.yaffs
bootm 0x30008000
关于环境变量的设置
setenv bootargs 'root=/dev/nfs rw nfsroot=$serverip:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off console=${consoledev},${baudrate} ${otherbootargs}'
如下:
bootargs=root=/dev/nfs nfsroot=192.168.1.100:/home/work/ARM/rootfs ip=192.168.1.20:192.168.1.100:192.168.1.1:255.255.255.0::eth0:off init=/linuxrc console=ttySAC2,115200
3,tftp
设置板卡IP,主机IP。
tftp 30008000 uImage
tftp 32000000 rootfs.yaffs
bootm 0x30008000
tftp命令后面不用跟地址。
000
4、烧写映像文件到NAND Flash
以64M NAND Flash为例。
1)地址空间说明
| 1M | 3M | 32M | 28M |
|---------------|---------------|---------------|------------------------|
| boot | kernel | rootfs | other |
以下的操作均基于图示的地址空间分配,您也可以根据实际情况进行调整。
2)烧写u-boot
mw.b 82000000 ff 100000 000命令 mw 用于使用一个指定的数据填充一段内存
tftp 82000000 u-boot-hi3516a.bin 通过tftp网络模式下载uboot
nand erase 0 100000 擦除1M内存空间
nand write 82000000 0 100000 写入nandflash
reset
3)烧写内核
mw.b 82000000 ff 300000
tftp 82000000 uImage_hi3516a
nand erase 100000 300000
nand write 82000000 100000 300000
4)烧写文件系统
mw.b 82000000 ff 2000000
tftp 82000000 rootfs_Hi3516a_2k_4bit.yaffs2
nand erase 400000 2000000
nand write.yaffs 82000000 400000 96d200 #注意:96d200为rootfs文件实际大小(16进制)
5)设置启动参数
setenv bootargs 'mem=64M console=ttyAMA0,115200 root=/dev/mtdblock2 rootfstype=yaffs2 mtdparts=hinand:1M(boot),3M(kernel),32M(rootfs),28M(test)'
setenv bootcmd 'nand read 0x82000000 0x100000 0x300000;bootm 0x82000000'
sa