Last active
May 10, 2022 07:58
-
-
Save bjoern-r/47e9f972912fd5eec1321bda8e0cd1a0 to your computer and use it in GitHub Desktop.
Revisions
-
bjoern-r revised this gist
May 10, 2022 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,6 +5,8 @@ for drive in sd{a,b,c,d,e,f} do rdisk=$drive ## Warning: this will spin up the disk! ## TODO: just check for USB and or Vendor ID if dd if=/dev/$rdisk bs=512 skip=0 count=1 status=none | grep -q BENNVENN ; then echo Joey Jr Found at /dev/$rdisk -
bjoern-r revised this gist
Nov 23, 2021 . 1 changed file with 1 addition and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,12 +2,9 @@ #set -x for drive in sd{a,b,c,d,e,f} do rdisk=$drive if dd if=/dev/$rdisk bs=512 skip=0 count=1 status=none | grep -q BENNVENN ; then echo Joey Jr Found at /dev/$rdisk -
bjoern-r created this gist
Nov 23, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,49 @@ #!/bin/bash #set -x for drive in sd{a,b,c} do rdisk=$drive #dd if=/dev/$rdisk bs=512 skip=0 count=1 status=none > check.txt #if grep -q BENNVENN check.txt ; then if dd if=/dev/$rdisk bs=512 skip=0 count=1 status=none | grep -q BENNVENN ; then echo Joey Jr Found at /dev/$rdisk case $1 in ROM) echo Writing Rom... This may take minutes dd if=$2 of=/dev/$rdisk bs=512 seek=37 ;; FLASH) echo Writing Flash Save... dd if=$2 of=/dev/$rdisk bs=512 seek=65573 ;; SRAM) echo Writing SRAM... dd if=$2 of=/dev/$rdisk bs=512 seek=65829 ;; EEPROM) echo Writing EEPROM... dd if=$2 of=/dev/$rdisk bs=512 seek=66085 ;; ROMLIST) dd if=$2 of=/dev/$rdisk bs=512 seek=66341 echo ROMLIST Update Complete ;; MODE) echo -n $2 | dd of=/dev/$rdisk bs=512 cbs=512 seek=66725 conv=sync echo Mode set to $2 sleep 1 if [ $2 = "UPDATE" ] then dd if=$3 of=/dev/$rdisk bs=512 seek=66469 echo Update Complete break fi ;; esac break fi done