-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script to install software on Raspberry Pi
Also update instructions for building and installing using script.
- Loading branch information
1 parent
05331c4
commit 2efa229
Showing
8 changed files
with
261 additions
and
229 deletions.
There are no files selected for viewing
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
CPP=g++ | ||
CC=gcc | ||
DTC=dtc | ||
BIN=bin_pi | ||
|
||
clean: | ||
rm -f ${BIN}/a314d-td | ||
rm -f ${BIN}/a314d-cp | ||
rm -f ${BIN}/a314d-fe | ||
rm -f ${BIN}/spi-a314.dtbo | ||
rm -f ${BIN}/start_gpclk | ||
rmdir ${BIN} | ||
|
||
${BIN}/a314d-td: a314d/a314d.cc | ||
${CPP} -DMODEL_TD=1 a314d/a314d.cc -O3 -o ${BIN}/a314d-td | ||
|
||
${BIN}/a314d-cp: a314d/a314d.cc | ||
${CPP} -DMODEL_CP=1 a314d/a314d.cc -O3 -o ${BIN}/a314d-cp | ||
|
||
${BIN}/a314d-fe: a314d/a314d.cc | ||
${CPP} -DMODEL_FE=1 a314d/a314d.cc -O3 -o ${BIN}/a314d-fe | ||
|
||
${BIN}/spi-a314.dtbo: a314d/spi-a314-overlay.dts | ||
${DTC} -I dts -O dtb -o ${BIN}/spi-a314.dtbo a314d/spi-a314-overlay.dts | ||
|
||
${BIN}/start_gpclk: a314d/start_gpclk.c | ||
${CC} a314d/start_gpclk.c -I/opt/vc/include -L/opt/vc/lib -lbcm_host -o ${BIN}/start_gpclk |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,67 @@ | ||
# A314 Software | ||
|
||
The A314 software supports multiple variants of A314 hardware. | ||
The variants of the software use the following acronyms: | ||
|
||
- a314-td (trapdoor), works with A314-500 and A314-600 | ||
- a314-cp (clockport), works with A314-cp | ||
- a314-fe (front expansion), works with A314-1000 | ||
|
||
## How to install | ||
|
||
Software needs to be built and installed for both the Raspberry Pi side and the Amiga side. | ||
|
||
### Raspberry Pi | ||
|
||
To build and install on the Pi side, do the following: | ||
To build and install the software on the Raspberry Pi side, do the following: | ||
|
||
- Install Raspberry Pi OS (I tend to use Raspberry Pi OS Lite 64-bit): https://www.raspberrypi.com/software/operating-systems/ | ||
- Install Raspberry Pi OS (I tend to use Raspberry Pi OS Lite 64-bit, | ||
but any recent version should work): | ||
<https://www.raspberrypi.com/software/operating-systems/> | ||
- Install Dependencies: `sudo apt install python3-dev python3-distutils python3-pip build-essential git` | ||
- Clone the a314 repo: `git clone https://github.com/niklasekstrom/a314.git` | ||
- `cd a314/Software` | ||
- Build binaries: `make -f Makefile-td` or `make -f Makefile-cp` depending on variant of A314 | ||
- Install software: `sudo make -f Makefile-td install` or `sudo make -f Makefile-cp install` | ||
- Enable and start a314d: | ||
- `sudo systemctl daemon-reload` | ||
- `sudo systemctl enable a314d` | ||
- `sudo systemctl start a314d` | ||
- Obtain a copy of the repository, either: | ||
- Clone the a314 repository: `git clone https://github.com/niklasekstrom/a314.git`, or | ||
- Download the sources from a release. Pick a release from | ||
<https://github.com/niklasekstrom/a314/releases>, download the file linked to as | ||
Source code (tar.gz), and extract with `tar xvf <filename>.tar.gz`. | ||
- Change into the Software directory: `cd a314/Software` | ||
- Run the installer script: `sudo ./install-pi.sh <model>`, where `<model>` is | ||
`td`, `cp` or `fe` depending on which variant of A314 is used. | ||
- Reboot the Raspberry Pi: `sudo reboot now` | ||
|
||
### Amiga | ||
|
||
The binaries for the Amiga side are already built and are available as part of a release on the GitHub page: https://github.com/niklasekstrom/clockport_pi_interface/releases | ||
The binaries for the Amiga side are already built and are available as part of a release on the GitHub page: <https://github.com/niklasekstrom/a314/releases> | ||
|
||
There are multiple sub directories in the release archive, and the files in those sub directories should be copied to the corresponding sub directories in the AmigaOS system volume. | ||
|
||
It is also possible to build the Amiga binaries from source on the Raspberry Pi. To do so, follow these steps: | ||
Note that in the Devs directory there are multiple different versions of a314.device: | ||
`a314-td.device`, `a314-cp.device`, `a314-fe.device`. | ||
Copy only the version that matches your A314 hardware and rename it to `a314.device`. | ||
|
||
- Install Docker: `curl -sSL https://get.docker.com | sh` | ||
- Allow user pi to run Docker: `sudo usermod -aG docker pi` | ||
- Log out and then log back in again to make the previous command take effect | ||
- Clone the a314 repo: `git clone -b clockport_if https://github.com/niklasekstrom/a314.git` | ||
- `cd a314/Software` | ||
- Build binaries by running: `./rpi_docker_build.sh` | ||
After these files are copied to the Amiga it should be possible to run the pi command. | ||
The pi command can be invoked by `pi` without any arguments to get an interactive bash terminal, | ||
or with arguments to run a particular Linux command. | ||
|
||
The binaries are now available in the sub directories of the `bin_amiga` directory. | ||
#### Building | ||
|
||
After these files are copied to the Amiga it should be possible to mount the PiDisk: by `Mount PI0:`. | ||
The pi command can be invoked by `pi` without any arguments to run bash, or with arguments to run a particular Linux command. | ||
It is also possible to build the Amiga binaries from source, either on the Raspberry Pi or on a Linux PC. | ||
To do so, follow these steps: | ||
|
||
- Download and install VBCC: | ||
- On the bottom of this page, <http://www.compilers.de/vbcc.html>, there are archives with VBCC | ||
pre-compiled for different plattforms such as Linux (x64) and Raspberry Pi | ||
- Download the appropriate archive, e.g.: `wget http://www.ibaug.de/vbcc/vbcc_linux_x64.tar.gz` | ||
- Unpack to some suitable directory: `tar xvf vbcc_linux_x64.tar.gz -C ~/amiga/` | ||
- Set the VBCC environment variable: `export VBCC=~/amiga/vbcc` | ||
- Add VBCC to PATH: `export PATH=$VBCC/bin:$PATH` | ||
- Download and add NDK3.2: | ||
- Download archive from Aminet: `wget http://aminet.net/dev/misc/NDK3.2.lha` | ||
- Install lha extraction software: `sudo apt install lhasa` | ||
- Extract archive: `lha xw=~/amiga/NDK3.2 NDK3.2.lha` | ||
- Add environment variable: `export NDK32=~/amiga/NDK3.2` | ||
- Clone the a314 repo: `git clone https://github.com/niklasekstrom/a314.git ~/amiga/a314` | ||
- Change into the Software directory: `cd ~/amiga/a314/Software` | ||
- Build binaries by running: `make -f Makefile-amiga` | ||
|
||
The binaries are now available in the sub directories of the `bin_amiga` directory. |
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE | ||
iptables -A FORWARD -i wlan0 -o tap0 -m state --state RELATED,ESTABLISHED -j ACCEPT | ||
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE | ||
iptables -A FORWARD -i wlan0 -o tap0 -m state --state RELATED,ESTABLISHED -j ACCEPT | ||
iptables -A FORWARD -i tap0 -o wlan0 -j ACCEPT |
Oops, something went wrong.