Several adjustements:
- Get latest Go version as of now. - Nowadays (?) GitHub 'git clone' seems to only work with a GitHub account. Therefore the zip download workaround. The becomes hopefully unnecessary soon with Go module magic. - Use 'go mod tidy' to update .sum file for now. - Error handling for an empty drive 2 is currently not exactly great, so download Total Replay for drive 2. Unfortunately there's no stable URL as of now. - Use $USER and $HOME instead of hardcoded values. - Removed deprecated syslog output directives.
This commit is contained in:
parent
88de535ddf
commit
1a1abe7c70
|
@ -1,18 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
sudo apt install git -y
|
||||
wget https://golang.org/dl/go1.17.3.linux-armv6l.tar.gz
|
||||
sudo tar -C /usr/local -xzf go1.17.3.linux-armv6l.tar.gz
|
||||
wget https://golang.org/dl/go1.19.linux-armv6l.tar.gz
|
||||
sudo tar -C /usr/local -xzf go1.19.linux-armv6l.tar.gz
|
||||
sudo ln -s /usr/local/go/bin/go /usr/bin/go
|
||||
git clone https://github.com/tjboldt/ProDOS-Utilities.git
|
||||
wget https://github.com/oliverschmidt/ProDOS-Utilities/archive/refs/heads/main.zip -O ProDOS-Utilities.zip
|
||||
unzip ProDOS-Utilities.zip
|
||||
mv ProDOS-Utilities-main ProDOS-Utilities
|
||||
cd ProDOS-Utilities || exit
|
||||
go mod tidy
|
||||
go build
|
||||
cd ~ || exit
|
||||
sudo ln -s /home/pi/ProDOS-Utilities/ProDOS-Utilities /usr/bin/ProDOS-Utilities
|
||||
git clone https://github.com/tjboldt/Apple2-IO-RPi.git
|
||||
sudo ln -s $HOME/ProDOS-Utilities/ProDOS-Utilities /usr/bin/ProDOS-Utilities
|
||||
wget https://github.com/oliverschmidt/Apple2-IO-RPi/archive/refs/heads/main.zip -O Apple2-IO-RPi.zip
|
||||
unzip Apple2-IO-RPi.zip
|
||||
mv Apple2-IO-RPi-main Apple2-IO-RPi
|
||||
cd Apple2-IO-RPi/RaspberryPi/apple2driver || exit
|
||||
go mod tidy
|
||||
go build
|
||||
sudo apt install cc65 vim -y
|
||||
sudo apt install cc65 -y
|
||||
cd ~ || exit
|
||||
sudo bash -c 'cat > /boot/config.txt << EOF
|
||||
disable_splash=1
|
||||
|
@ -20,18 +25,17 @@ dtoverlay=disable-bt
|
|||
boot_delay=0
|
||||
EOF'
|
||||
sudo bash -c 'echo " quiet" >> /boot/cmdline.txt'
|
||||
sudo bash -c 'cat > /etc/systemd/system/apple2driver.service << EOF
|
||||
wget https://archive.org/download/TotalReplay/Total%20Replay%20v5.0-alpha.4.hdv -O TotalReplay.hdv
|
||||
sudo --preserve-env=HOME --preserve-env=USER bash -c 'cat > /etc/systemd/system/apple2driver.service << EOF
|
||||
[Unit]
|
||||
Description=Apple2-IO-RPi Driver
|
||||
|
||||
[Service]
|
||||
ExecStart=/home/pi/Apple2-IO-RPi/RaspberryPi/apple2driver/apple2driver
|
||||
StandardOutput=syslog
|
||||
StandardError=syslog
|
||||
ExecStart=$HOME/Apple2-IO-RPi/RaspberryPi/apple2driver/apple2driver -cdc -d1 $HOME/Apple2-IO-RPi/RaspberryPi/Apple2-IO-RPi.hdv -d2 $HOME/TotalReplay.hdv
|
||||
SyslogIdentifier=apple2driver
|
||||
User=pi
|
||||
Group=pi
|
||||
WorkingDirectory=/home/pi/Apple2-IO-RPi/RaspberryPi/apple2driver
|
||||
User=$USER
|
||||
Group=$USER
|
||||
WorkingDirectory=$HOME/Apple2-IO-RPi/RaspberryPi/apple2driver
|
||||
|
||||
[Install]
|
||||
WantedBy=basic.target
|
||||
|
|
Loading…
Reference in New Issue