#env.img 0x0:0x0 0x200:0x40000 0x200:0x40000
mw.b ${ramdisk_addr_r} 0xff 0x40000; tftp ${ramdisk_addr_r} env.img; mtd erase spi-nand0 0x0 0x40000; mtd write spi-nand0 ${ramdisk_addr_r} 0x0 0x40000;

#idblock.img 0x200:0x40000 0x200:0x40000 0x178:0x2F000
mw.b ${ramdisk_addr_r} 0xff 0x2F000; tftp ${ramdisk_addr_r} idblock.img; mtd erase spi-nand0 0x40000 0x40000; mtd write spi-nand0 ${ramdisk_addr_r} 0x40000 0x2F000;

#uboot.img 0x400:0x80000 0x400:0x80000 0x200:0x40000
mw.b ${ramdisk_addr_r} 0xff 0x40000; tftp ${ramdisk_addr_r} uboot.img; mtd erase spi-nand0 0x80000 0x80000; mtd write spi-nand0 ${ramdisk_addr_r} 0x80000 0x40000;

#boot.img 0x800:0x100000 0x2000:0x400000 0x17F5:0x2FEA00
mw.b ${ramdisk_addr_r} 0xff 0x2FEA00; tftp ${ramdisk_addr_r} boot.img; mtd erase spi-nand0 0x100000 0x400000; mtd write spi-nand0 ${ramdisk_addr_r} 0x100000 0x2FEA00;

#oem.img 0x2800:0x500000 0x12000:0x2400000 0x9D00:0x13A0000
mw.b ${ramdisk_addr_r} 0xff 0x13A0000; tftp ${ramdisk_addr_r} oem.img; mtd erase spi-nand0 0x500000 0x2400000; mtd write spi-nand0 ${ramdisk_addr_r} 0x500000 0x13A0000;

#rootfs.img 0x14800:0x2900000 0x69000:0xD200000 0x25D00:0x4BA0000
mw.b ${ramdisk_addr_r} 0xff 0x4BA0000; tftp ${ramdisk_addr_r} rootfs.img; mtd erase spi-nand0 0x2900000 0xD200000; mtd write spi-nand0 ${ramdisk_addr_r} 0x2900000 0x4BA0000;

reset
% <- this is end of file symbol
