led_green=i2c mw 20 0 cf;i2c mw 20 12 10
led_red=i2c mw 20 0 cf;i2c mw 20 12 20
led_orange=i2c mw 20 0 cf;i2c mw 20 12 30

erase_boot=run led_red;protect off nor0,0;erase nor0,0
load_boot=fatload mmc ${mmcdev} ${loadaddr} u-boot.bin
write_boot=run led_orange;cp.b $loadaddr 08000000 $filesize
install_boot=run erase_boot;run load_boot;run write_boot

erase_kernel=run led_red;protect off nor0,3;erase nor0,3
load_kernel=fatload mmc ${mmcdev} ${loadaddr} kernel
write_kernel=run led_orange;cp.b $loadaddr 08100000 $filesize
install_kernel=run erase_kernel;run load_kernel;run write_kernel

erase_rootfs=run led_red;protect off nor0,4;erase nor0,4
load_rootfs=fatload mmc ${mmcdev} ${loadaddr} rootfs.ubi
write_rootfs=run led_orange;cp.b $loadaddr 08500000 $filesize
install_rootfs=run erase_rootfs;run load_rootfs;run write_rootfs

clear_fram=mw.w 1c000000 0 40000

uenvcmd=run led_orange;mtdparts default;run install_boot;run install_kernel;run install_rootfs;run clear_fram;run led_green

