begin:
flshdct 0
flashchk 0
if FLASHSET == 0
echo flash not detected, check connection.
goto continue
endif
cls
/////////////////////////////////////////////
//    Meraki MR33
/////////////////////////////////////////////
echo 1. Backup flash
echo 2. Restore flash
echo 3. program openwrt 
echo 4. Exit
option 1 backup 2 restore 3 openwrt 4 end
backup:
cls
getram 0 8400000
save 0 8400000
goto continue
restore:
cls
echo Please select the original flash file from backup
ldram 0
echo programing...
erase 0 8400000
sprogram 0 8400000
goto continue
openwrt:
cls
echo Programming u-boot
echo Please select the u-boot file (2012 version)
ldram u-boot
erase u-boot
sprogram u-boot
echo Programming ubi
echo Please select the ubi file for openwrt
ldram ubi
erase ubi
sprogram ubi
continue:
pause
goto begin
end:
