cls
dialog 6
Enter TRAP ON
Backup flash
Restore flash
Debrick (When normal programming not working)
program openwrt initramfs
Exit
begin:
option 1 trapon 2 backup 3 restore 4 debrick 5 openwrt 6 end
trapon:
if TRAP == 1
echo Already in TRAP ON
goto begin
endif
echo Trying to put the router into TRAP ON mode.
echo Power off the router hit TRAP ON 1 second after power on
detect
program
goto begin
backup:
if TRAP == 0
echo Need to enter TRAP ON mode first
goto continue
endif
echo backup flash
detect
getram 0 8400000
goto continue
restore:
if TRAP == 0
echo Need to enter TRAP ON mode first
goto continue
endif
detect
echo Please select the original flash
ldram 0
echo program boot
program boot
echo program kernel1
program kernel1
echo program kernel2
program kernel2
echo program UBI1
program UBI1
echo program UBI2
program UBI2
goto continue
debrick:
cls
program
if DEBUG == 0
echo Please try again
goto continue
endif
detect
echo Please select the original flash
ldram 0
echo program boot
erase boot
sprogram boot
goto restore1
openwrt:
if TRAP == 0
echo Need to enter TRAP ON mode first
goto continue
endif
echo backup flash
detect
echo Please select mr18-initramfs-kernel-ecc.bin
ldram kernel2
erase kernel1
program kernel2
continue:
pause
goto begin
end:
