//-------------- tftp烧录内核及文件系统-----------------------
//烧写完uboot后启动uboot
// 1)设置参数
setenv gatewayip 192.168.2.1
setenv ipaddr 192.168.2.243
setenv serverip 192.168.2.108
setenv netmask 255.255.255.0
setenv ethaddr 12:74:56:78:39:aa
// 2)tftp烧写内核 :
mw.b 82000000 ff 400000
tftp 82000000 uImage20160325
nand erase 100000 400000
nand write 82000000 100000 400000
// 3)设置内核启动方式:为flash 启动方式://nandflash
setenv bootfile uImage
setenv bootcmd 'nand read 0x82000000 0x100000 0x500000;bootm 0x82000000'
// 4)烧写文件系统
mw.b 82000000 ff 7000000
tftp 82000000 rootfs_2k_1bit_20160407_newboard_qt_touch.yaffs2
nand erase 1000000 7000000
nand write.yaffs 82000000 1000000 4612140
// 5)设置启动参数
setenv bootargs 'mem=64M console=ttyAMA0,115200 root=/dev/mtdblock2 rootfstype=yaffs2 mtdparts=hinand:1M(boot),15M(kernel),112M(rootfs)'
setenv bootcmd 'nand read 0x82000000 0x100000 0x500000;bootm 0x82000000'
sa
//-------------------------------------------------ok-----------------------------------------------------