Add prebuilt

This commit is contained in:
Thomas Roth 2020-11-29 19:30:27 +01:00
parent 9ca112d5ab
commit 67e8c9cf90
5 changed files with 33 additions and 2 deletions

View File

@ -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]$ ]]

View File

@ -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."

30
install_pwnadventure.sh Executable file
View File

@ -0,0 +1,30 @@
#!/bin/bash
if [[ $# -ne 1 ]]; then
echo "Usage: $0 <Adapter: jlink or stlink>"
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!"

BIN
prebuilt/gw_retrogo_nes.elf Executable file

Binary file not shown.

Binary file not shown.