-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgo
executable file
·33 lines (28 loc) · 1.11 KB
/
go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
set -e
../tools/acme -o new/miner2021 -r miner2021.txt --vicelabels miner2021.sym miner2021.a
../tools/acme -o new/loader -r loader.txt --vicelabels loader.sym loader.a
sort -o miner2021.tmp miner2021.sym
sort -o loader.tmp loader.sym
uniq miner2021.tmp miner2021.sym
uniq loader.tmp loader.sym
rm miner2021.tmp
rm loader.tmp
grep miner2021.sym -e 'allFree' | sed 's/^.*\([0-9a-f][0-9a-f][0-9a-f][0-9a-f]\).*/\1/' | awk '{printf "%d bytes free\n",(("0x" $1) + 0)}'
echo
# Create new SSD file with the appropriate files
../tools/bbcim -new -type ADFS NEWMINER.ssd
../tools/bbcim -boot NEWMINER.ssd EXEC
../tools/bbcim -a NEWMINER.ssd new/!BOOT new/MANIC new/LOADER new/MINER2021
echo
if [ $USER == "tobynelson" ];
then
# Open SSD in b2
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
open -a 'b2 Debug'
sleep 1
# curl -G 'http://localhost:48075/reset/b2' --data-urlencode "config=Master 128 (MOS 3.50)"
curl -H 'Content-Type:application/binary' --upload-file "$DIR/NEWMINER.ssd" 'http://localhost:48075/run/b2?name=NEWMINER.ssd'
else
# Open SSD in BeebEm
open NEWMINER.ssd
fi