=> fdt print
5. Save fdt to NOR flash:
-=> erase fc060000 fc07ffff
-=> cp.b 1800000 fc060000 10000
+=> erase fc180000 fc07ffff
+=> cp.b 1800000 fc180000 10000
All this can be integrated into an environment command:
-=> setenv upd_fdt 'tftp 1800000 a3m071/a3m071.dtb;run mtdargs addip2 addtty; \
- fdt addr 1800000;fdt boardsetup;fdt chosen;erase fc060000 fc07ffff; \
- cp.b 1800000 fc060000 10000'
+=> setenv upd_fdt 'tftp 1800000 a3m071/a3m071.dtb;run mtdargs addip addtty; \
+ fdt addr 1800000;fdt boardsetup;fdt chosen;erase fc180000 fc07ffff; \
+ cp.b 1800000 fc180000 10000'
=> saveenv
After this, only "run upd_fdt" needs to get called to load, patch
#define CONFIG_HOSTNAME a3m071
#endif
+#define CONFIG_BOOTCOUNT_LIMIT
+
/*
* Serial console configuration
*/
#define CONFIG_FLASH_CFI_MTD
#define MTDIDS_DEFAULT "nor0=fc000000.flash"
#define MTDPARTS_DEFAULT "mtdparts=fc000000.flash:512k(u-boot)," \
- "256k(env)," \
+ "128k(env1)," \
+ "128k(env2)," \
"128k(hwinfo)," \
"1M(nvramsim)," \
"128k(dtb)," \
"128k(sysinfo)," \
"7552k(root)," \
"4M(app)," \
- "13568k(data)"
+ "5376k(data)," \
+ "8M(install)"
+
#define CONFIG_LZO /* needed for UBI */
#define CONFIG_RBTREE /* needed for UBI */
#define CONFIG_CMD_MTDPARTS
"nfsargs=setenv bootargs root=/dev/nfs rw " \
"nfsroot=${serverip}:${rootpath}\0" \
"ramargs=setenv bootargs root=/dev/ram rw\0" \
- "mtdargs=setenv bootargs root=/dev/mtdblock7 " \
+ "mtdargs=setenv bootargs root=/dev/mtdblock8 " \
"rootfstype=squashfs,jffs2\0" \
"addhost=setenv bootargs ${bootargs} " \
"hostname=${hostname}\0" \
":${hostname}:${netdev}:off panic=1\0" \
"addtty=setenv bootargs ${bootargs} " \
"console=${consoledev},${baudrate}\0" \
- "flash_nfs=run nfsargs addip addtty addhost;" \
+ "flash_nfs=run nfsargs addip addtty addmtd addhost;" \
"bootm ${kernel_addr} - ${fdt_addr}\0" \
- "flash_mtd=run mtdargs addip addtty addhost;" \
+ "flash_mtd=run mtdargs addip addtty addmtd addhost;" \
"bootm ${kernel_addr} - ${fdt_addr}\0" \
- "flash_self=run ramargs addip addtty addhost;" \
+ "flash_self=run ramargs addip addtty addmtd addhost;" \
"bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \
"net_nfs=tftp ${kernel_addr_r} ${bootfile};" \
"tftp ${fdt_addr_r} ${fdtfile};" \
- "run nfsargs addip addtty addhost;" \
+ "run nfsargs addip addtty addmtd addhost;" \
"bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \
"load=tftp ${loadaddr} " __stringify(CONFIG_HOSTNAME) \
"/u-boot-img.bin\0" \
- "update=protect off fc000000 fc07ffff; " \
+ "update=protect off fc000000 fc07ffff;" \
"era fc000000 fc07ffff;" \
"cp.b ${loadaddr} fc000000 ${filesize}\0" \
"upd=run load;run update\0" \
+ "upd_fdt=tftp 1800000 a3m071/a3m071.dtb;" \
+ "run mtdargs addip addtty addmtd addhost;" \
+ "fdt addr 1800000;fdt boardsetup;fdt chosen;" \
+ "erase fc1e0000 fc1fffff;cp.b 1800000 fc1e0000 20000" \
+ "upd_kernel=tftp 1000000 a3m071/uImage-uncompressed;" \
+ "erase fc200000 fc6fffff;" \
+ "cp.b 1000000 fc200000 ${filesize}" \
+ "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \
+ "mtdids=" MTDIDS_DEFAULT "\0" \
+ "mtdparts=" MTDPARTS_DEFAULT "\0" \
""
#define CONFIG_BOOTCOMMAND "run flash_mtd"