diff --git a/3_backup_internal_flash.sh b/3_backup_internal_flash.sh index cfcc494..e86b440 100755 --- a/3_backup_internal_flash.sh +++ b/3_backup_internal_flash.sh @@ -15,7 +15,7 @@ if test -f backups/internal_flash_backup.bin; then exit 1 fi -echo "This step will overwrite the contents of the SPI flash that we backed up in step 2." +echo "This step will overwrite the contents of the SPI flash chip that we backed up in step 2." echo "It will be restored in step 5. Continue? (Y/y)" read -n 1 -r if [[ ! $REPLY =~ ^[Yy]$ ]] diff --git a/4_unlock_device.sh b/4_unlock_device.sh index 7b3e400..2436bb8 100755 --- a/4_unlock_device.sh +++ b/4_unlock_device.sh @@ -33,4 +33,5 @@ if ! openocd -f openocd/interface_"$1".cfg \ exit 1 fi -echo "Congratulations, your device has been unlocked. Please power-cycle it for the changes to take full effect." +echo "Congratulations, your device has been unlocked." +echo "Please power-cycle it for the changes to take full effect." diff --git a/install_pwnadventure.sh b/install_pwnadventure.sh new file mode 100755 index 0000000..0ad3d0f --- /dev/null +++ b/install_pwnadventure.sh @@ -0,0 +1,30 @@ +#!/bin/bash + + +if [[ $# -ne 1 ]]; then + echo "Usage: $0 " + exit 1 +fi + +ADAPTER=$1 +mkdir -p logs + + +echo "Installing on internal flash..." +if ! openocd -f openocd/interface_"$1".cfg \ + -c "init;" \ + -c "halt;" \ + -c "program prebuilt/gw_retrogo_nes.elf;" \ + -c "exit;" >>logs/5_openocd.log 2>&1; then + echo "Installing on flash failed." + exit 1 +fi + + +echo "Installing data on SPI flash..." +if ! ./scripts/flashloader.sh $ADAPTER prebuilt/gw_retrogo_nes_extflash.bin; then + echo "Installing on SPI flash failed. Check debug connection and try again." + exit 1 +fi + +echo "Success!" diff --git a/prebuilt/gw_retrogo_nes.elf b/prebuilt/gw_retrogo_nes.elf new file mode 100755 index 0000000..ecb8ede Binary files /dev/null and b/prebuilt/gw_retrogo_nes.elf differ diff --git a/prebuilt/gw_retrogo_nes_extflash.bin b/prebuilt/gw_retrogo_nes_extflash.bin new file mode 100755 index 0000000..cf8e3fa Binary files /dev/null and b/prebuilt/gw_retrogo_nes_extflash.bin differ