#env.img 0x0:0x0 0x200:0x40000 0x200:0x40000
mw.b ${ramdisk_addr_r} 0xff 0x40000; fatload mmc 1 ${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 0x170:0x2E000
mw.b ${ramdisk_addr_r} 0xff 0x2E000; fatload mmc 1 ${ramdisk_addr_r} idblock.img; mtd erase spi-nand0 0x40000 0x40000; mtd write spi-nand0 ${ramdisk_addr_r} 0x40000 0x2E000;

#uboot.img 0x400:0x80000 0x400:0x80000 0x200:0x40000
mw.b ${ramdisk_addr_r} 0xff 0x40000; fatload mmc 1 ${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 0x1C5A:0x38B400
mw.b ${ramdisk_addr_r} 0xff 0x38B400; fatload mmc 1 ${ramdisk_addr_r} boot.img; mtd erase spi-nand0 0x100000 0x400000; mtd write spi-nand0 ${ramdisk_addr_r} 0x100000 0x38B400;

#rootfs.img 0x2800:0x500000 0x100000:0x20000000 0x100000:0x20000000
mw.b ${ramdisk_addr_r} 0xff 0x20000000; fatload mmc 1 ${ramdisk_addr_r} rootfs.img; mtd erase spi-nand0 0x500000 0x20000000; mtd write spi-nand0 ${ramdisk_addr_r} 0x500000 0x20000000;

#oem.img 0x102800:0x20500000 0x40000:0x8000000 0x40000:0x8000000
mw.b ${ramdisk_addr_r} 0xff 0x8000000; fatload mmc 1 ${ramdisk_addr_r} oem.img; mtd erase spi-nand0 0x20500000 0x8000000; mtd write spi-nand0 ${ramdisk_addr_r} 0x20500000 0x8000000;

#userdata.img 0x142800:0x28500000 0x40000:0x8000000 0x40000:0x8000000
mw.b ${ramdisk_addr_r} 0xff 0x8000000; fatload mmc 1 ${ramdisk_addr_r} userdata.img; mtd erase spi-nand0 0x28500000 0x8000000; mtd write spi-nand0 ${ramdisk_addr_r} 0x28500000 0x8000000;

% <- this is end of file symbol
