Add prebuilt
This commit is contained in:
parent
9ca112d5ab
commit
67e8c9cf90
|
@ -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]$ ]]
|
||||
|
|
|
@ -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."
|
||||
|
|
|
@ -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!"
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue