setenv serverip 192.168.1.6;setenv ipaddr 192.168.1.12;setenv netmask 255.255.0.0;setenv gatewayip 192.168.1.1;sa 以128M SPI NAND Flash为例。 1, 地址空间说明 set -f ethaddr 00:11:85:18:40:91 128M | 2M | 4M | 13M | 90M | 13M | 1M | 1M | 4M | |--------|--------|---------|--------|--------|-------|-----|-------| | boot | kernel | rootfs | app | www | para | p2p | log | 2,烧写u-boot UB_BOOT_BIT mw.b 0x21000000 ff 1e0000;tftp 0x21000000 uboot_V211227;nand erase 0 1e0000;nand write.e 0x21000000 0 160000 3,烧写内核 UB_KERNEL_BIT mw.b 0x21000000 ff 400000;tftp 0x21000000 kernel_V211215;nand erase 200000 400000;nand write.e 0x21000000 200000 380000 4,烧写文件系统 UB_ROOTFS_BIT mw.b 0x21000000 ff d00000;tftp 0x21000000 rootfs_V211215;nand erase 600000 d00000;nand write.e 0x21000000 600000 c80000 6,烧写app UB_APP_BIT mw.b 0x21000000 ff 2a00000;tftp 0x21000000 app_V211202_IPCSC327DE_128M_M;nand erase 1300000 2a00000;nand write.e 0x21000000 1300000 2600000 7,烧写WWW UB_WWW_BIT mw.b 0x21000000 ff d00000;tftp 0x21000000 www_V211201;nand erase 6d00000 d00000;nand write.e 0x21000000 6d00000 c80000 8,设置启动参数 UB_ENVAR_BIT setenv bootargs 'console=ttyS0,115200 root=/dev/mtdblock2 rootfstype=squashfs ro init=/linuxrc LX_MEM=0x7fc6000 mma_heap=mma_heap_name0,miu=0,sz=0x3400000 mtdparts=nand0:2M(boot),4M(kernel),13M(rootfs),90M(app),13M(www),1M(para),1M(p2p),4M(log)'; setenv bootcmd 'nand read 0x21000000 200000 380000;bootm 0x21000000';sa; 9,擦参数 UB_PARACLR_BIT nand erase 7a00000 80000; 10,擦除备份参数 nand erase 7a80000 80000; 11,擦除出厂参数区 nand erase 7b00000 100000; (注:如果擦除了备份参数区,要重新设置keyid和boardid)