mtd erase SPL 0
mtd erase SPL.backup 0
mtd erase U-Boot 0
mtd erase U-Boot.backup 0
if itest.b *0x1c03035 == 40; then echo "Toshiba NAND Detected"; nand write.raw.noverify 0x42000000 0 40; nand write.raw.noverify 0x42000000 0x400000 40; fi
if itest.b *0x1c03035 == 60; then echo "Hynix NAND Detected"; nand write.raw.noverify 0x43000000 0 40; nand write.raw.noverify 0x43000000 0x400000 40; fi
mtd write U-Boot 0x43400000 0
mtd write U-Boot.backup 0x43400000 0
poweroff
