begin:
cls
/////////////////////////////////////////////
//    SB6120 Script
/////////////////////////////////////////////
echo 1. Backup flash
echo 2. Restore flash
echo 3. Program boot (Like noisy boot)
echo 4. Program firmware (Like shell firmware
echo 5. Exit
option 1 backup 2 restore 3 pgboot 4 pgfirm 5 end
backup:
echo backup flash
flshdct 0
flashchk 0
if FLASHSET == 0
echo flash not defined
goto continue
endif
getram 0 800000
checkmdw 0
if MEMORY != 120000ea
echo Your boot code does not seems to be right. This might brick the box
goto continue
endif
save 0 800000
goto continue
restore:
flshdct 0
flashchk 0
if FLASHSET == 0
echo flash not defined
goto continue
endif
ldram 0
checkmdw 0
if MEMORY != 120000ea
echo Your boot code does not seems to be right. This might brick the box
goto continue
endif
program 0 800000
cmpram 0 800000
goto continue
pgboot:
echo program boot
ldram 0
checkmdw 0
if MEMORY != 120000ea
echo Your boot code does not seems to be right.
goto continue
endif
flshdct 0
flashchk 0
if FLASHSET == 0
echo flash not defined
goto continue
endif
program 0 20000
cmpram 0 20000
goto continue
pgfirm:
echo program firmware
ldram 40000
ldram 3f0000
checkmdw 40000
if MEMORY != 56190527
echo Your boot code does not seems to be right. This might brick the box
goto continue
endif
checkmdw 3f0000
if MEMORY != 56190527
echo Your boot code does not seems to be right. This might brick the box
goto continue
endif
flshdct 0
flashchk 0
if FLASHSET == 0
echo flash not defined
goto continue
endif
program 40000 760000
cmpram 40000 760000
continue:
pause
goto begin
end:
