How to setup your A314

This tutorial will only cover what I think is two most common setups for A314 v1.1, the A500 rev.6a and the A500/+ rev.8a. I used an A500+ with WorkBench 2.1 as reference for this tutorial. However, I also made the 1 MB chip mod setup on my A500 rev. 6a.
I will try to make it mostly a bullet to bullet post, to keep it as short and clear as possible

Setting up your hardware.

First thing to do is to make sure your Amiga sees the extra memory shared with the A314, and that the RTC gets dectected. The amount of extra memory you will get from the A314 depends on your motherboard revision, and jumper settings, see images below:

A500 rev. 6a - Agnus 8372 with 512kB chip RAM, and motherboard chip mod.

JMP2 - Set (1), and JMP3 - Open (0),
adds 512kB chip RAM.

Note that you can skip the chip mod if you want a 512 KB chip and 512 KB slow/ranger RAM system. You need to set the A314 jumpers as follows:
JMP2 - open (0), and JMP3 - Set (1),
adds 512kB slow/ranger RAM.

However, with this setup you will not be able to use the PiAudio, RemoterWB or the VideoPlayer - these features requires shared chip ram, as the configuration above and below this section.

A500/+ rev. 8a - Agnus 8375 with 1MB chip RAM.

JMP2 - Does not care (X), and JMP3 - Set (1),
adds 1MB chip RAM.


To improve the speed of the SPI communication, you should hook up INT2 from the A314 to INT2 on the Amiga's ODD CIA (A) pin 21, see images below. Note that even if this is optional, it will improve the speed of small SPI transfers and give you a better user experience.

After you have installed your A314 card, boot up your Amiga with Workbench of your choice, or use Amiga Test Kit. I used the Avail command in AmigaShell to confirm that I got more memory, and Time in the WorkBench/Prefs/ folder to set and save the Date and Time, see image below. Note that the save button will be greyed out if the RTC is not present.

If everything looks OK, you can now proceed with the setup of your Raspberry Pi.
It is recommended to use model 3B or 3B+, but older and slower 2B model also works with an added wifi dongle. However, because the development has mainly been done on model 3B, no guarantees given that model 4 will work. More extensive testing needs to be done before any conclusions can be made. Please tell if you are using model 4, and if you have run in to any issues šŸ™‚

Installing latest Rasbian.

Download latest Raspbian image: raspberrypi.org
Restore image to SD-card with the tool of your choice.
I am sure you know how to work your google-fu šŸ˜‰

Connect your Raspberry Pi to a monitor, keyboard and mouse.
Start Raspberry Pi, and complete the setup wizard.

To enable SPI (Serial Peripheral Interface) and SSH (Secure SHell), go to Menu and click:
    > Preferences > RaspberryPi Configuration
In the new window click the tab <interfaces> and check the following:
    SPI <Enable>
    SSH <Enable> (optional).

Setting up the Raspberry Pi to work with your A314 expansion card.

The following steps shall be done from the Linux terminal. This can be done directly on the Raspberry Pi, or from another computer via SSH. If you want to copy and paste from this document, you need to use <ctrl+shift+v> to paste into the terminal.

Edit config.txt:
        sudo nano /boot/config.txt
To get correct SPI frequency, add the line:
        core_freq_min
    Save and exit by pressing <ctrl+x>, then press <y>, and hit <enter>.

Edit cmdline.txt using:
        sudo nano /boot/cmdline.txt
To set the max SPI buffer size, add the following at the end of the line:
        spidev.bufsiz=65536
    (please note that it says spidev.bufsiz, the 'e' is missing on purpose!)
    Save and exit by pressing <ctrl+x>, then press <y>, and hit <enter>.

Note if you use Rasbian Lite, it could be necessary to install two additionl libraries for python3:
        sudo apt install python3-dev python3-distutils-extra

Install Docker to help you build your files:
        sudo curl -sSL https://get.docker.com | sh
    This can take some time...
Allow user pi to run Docker:
        sudo usermod -aG docker pi
Restart Raspberry Pi to get Docker up and runing:
        sudo shutdown -r now

To be able to install the software for A314 you have to clone the repository from GitHub:
        git clone https://github.com/niklasekstrom/a314.git

Go to Software directory:
        cd a314/Software
Set the build script as executable:
        sudo chmod +x rpi_docker_build.sh
Build software for both the Amiga and Pi:
        ./rpi_docker_build.sh
    This can take some time...
Install software for Pi:
        sudo make install

Make a314d executable:
        sudo chmod +x /opt/a314/a314d
Enable and add a314d to startup:
        sudo systemctl daemon-reload
        sudo systemctl enable a314d
        sudo systemctl start a314d

Create the directory a314shared for PiDisk:
        mkdir /home/pi/a314shared
    I'm assuming you are using the default user pi from the Raspbian installation;
    If not, then you can change this path in the file /etc/opt/a314/a314fs.conf.

To be able to use PiAudio you have to create asound.conf that will configure
ALSA (Advanced Linux Sound Architecture) to send audio to your Amiga:
        sudo nano /etc/alsa/conf.d/asound.conf
Add this to the empty file:
        pcm.!amiga {
            type plug
            slave {
                pcm pipe
                format s8
                rate 18000
                channels 2
            }
            hint {
                description "Play audio to Amiga using A314"
            }
        }
        pcm.pipe {
            type file
            format raw
            file "/tmp/piaudio_pipe"
            slave.pcm null
        }

    Save and exit by pressing <ctrl+x>, then press <y>, and hit <enter>.

Create a empty .asoundrc to prevent asound.conf to be overwritten by other instances:
        touch /home/pi/.asoundrc
Change permission to read only:
        chmod a-w /home/pi/.asoundrc

Install mpg123 for mp3 playback:
        sudo apt update
        sudo apt install mpg123

To make it easier to "play all" with mpg123, you have to create an executable bash file.
To do this, first log in as super user (su):
        sudo su
Create the "play all" bash script for mpg123.
Copy and paste all text below, and hit <enter>:
        echo '#\!/bin/sh' > /usr/local/bin/playmusic
        echo 'mpg123 -a amiga ./Music/*.mp3' >> /usr/local/bin/playmusic

Make file executable for all users:
        chmod a+x /usr/local/bin/playmusic
    Press <ctrl+d> to exit su (super user) promt.

Setting up Pure-FTPd - for easy file transfers to the Raspberry Pi.

Install the Pure-FTPd server:
        sudo apt update
        sudo apt install pure-ftpd

Create a new user group:
        sudo groupadd ftpgroup
Create a new user that has NO login privilege and NO home directory:
        sudo useradd ftpuser -g ftpgroup -s /sbin/nologin -d /dev/null
Set ownership for the folder a314shared/ and Music/:
        sudo chown pi:ftpgroup /home/pi/a314shared/
        sudo chown pi:ftpgroup /home/pi/Music/

Create file Umask, and setup permissions for files and folders:
        sudo nano /etc/pure-ftpd/conf/Umask
Set permissions for folder:file to 666:774, by adding the following line to the empty file:
        111 003
    Save and exit by pressing <ctrl+x>, then press <y>, and hit <enter>
Add user pi to group ftpgroup, and make folder writable for ftpgroup:
        sudo usermod -a -G ftpgroup pi
        sudo chmod g+w /home/pi/a314shared/
        sudo chmod g+w /home/pi/Music/

Create a pure-ftp user - replace <user> with a name of your choice - and map it to ftpuser, ftpgroup, and setup home directory:
        sudo pure-pw useradd <user> -u ftpuser -g ftpgroup -d /home/pi/ -m
Create data base:
        sudo pure-pw mkdb
Define the authentication method:
        sudo ln -s /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/auth/60puredb
Restart Pure FTPd with new settings:
        sudo service pure-ftpd restart
More info can be found at: pureftp.org

Setting up your Amiga WorkBench HD/disk.

In the a314/Software/bin directory there are a number of files that should be copied to your Amiga WorkBench directories, this can be done in different ways, preferably via UAE.

a314/Software/bin/a314.device to DEVS:
a314/Software/bin/a314fs to L:
a314/Software/bin/pi to C:
a314/Software/bin/piaudio to C:
a314/Software/bin/remotewb to C:
a314/Software/bin/videoplayer to C:
a314/Software/a314fs/a314fs-mountlist to the DEVS:
     You could also append the content of a314fs-mountlist to DEVS:MountList.
     This is done easiest by copying the MountList file to the a314shared/ folder,
     and then edited with nano via SSH:
          sudo nano /home/pi/s314shared/MountList
     Append this text at the end of MoutList:
          PI0: FileSystem = l:a314fs
               Device = a314.device
               Unit = 0
               Surfaces = 1
               BlocksPerTrack = 10
               Reserved = 2
               LowCyl = 0
               HighCyl = 100
               StackSize = 1000
               Mount = 1
               DosType = 0x33313400
           #

        Save and exit by pressing <ctrl+x>, then press <y>, and hit <enter>.
    Replace the old MountList in DEVS: on your Amiga.

Note that if you clone the Git repo on Windows then Git may change the line endings of that file to CRLF instead of just LF (depending on your Git settings),
and the Amiga mount command cannot handle that, so you may have to open the file in some editor that allows you to change the line endings back to just LF.

Optional - Add Audio Filter Switch (AFS) to C: for bettter audio playback:
Dowload AFSwitch from aminet.net, extract AFSwitch.lha and copy:
afs to C:

    How AFSwitch works.
    AFS D ........ Disable audio filter/LED
    AFS E ........ Enable audio filter/LED
    AFS S ........ simply Switch the current state of audio filter/LED
    AFS H or ? ... small help text

Editing startup-sequences.

Edit SYS:S/User-Startup by adding the following lines:
        ;Mount A314 filesystem
        ;with a314fs-mountlist (if not used remove this and next line)
        Mount Pi0: FROM DEVS:a314fs-mountlist

        ;with MountList (if not used remove this and next line)
        Mount Pi0:

Edit SYS:S/Shell-Startup by adding the following lines:
        ;Starts A314 piaudio service
        RUN >NIL: piaudio
        ;AFS disable filter (if not used remove this and next line)
        AFS D

        ;Alias for A314
        Alias reboot pi sudo reboot
        Alias shutdown pi sudo shutdown now
        Alias mp3list pi ls ./Music/
        Alias mp3 pi mpg123 -a amiga "./Music/[]"
        Alias mp3all pi bash playmusic

Power off your Amiga and put your Raspberry Pi int the A314 socket.
Start your Amiga, now you should be up and running with the basics!

Please stay tuned for more tips and trix! šŸ™‚

Meanwhile check out these links:
Take a look at my other posts regarding A314 @CrowStudio
Join the A314 discussion @discord
A314 @GitHub
A314 - The RPi co-processor Official thread @EAB
Pre-order/buy A314 @AmiBay

Spread the love

8 thoughts on “How to setup your A314

    • Thanks! šŸ™‚
      Unfortunately I cannot do that at the moment. I know that the A314-team have talked about this as a coming feature at the GitHub repository. However, it is not very hard to make the installation and setup – you have a great guide to follow! šŸ˜‰
      Have you bought a card yet?

      Best regards/Daniel

    • As the documentation over at raspberrypi.org says – “Minimum value of core_freq used for dynamic frequency clocking.”
      So no need to worry about that! šŸ˜‰

  1. Hi, this is the type of guide that is ideal for me with my limited knowledge of Linux, would it be possible to update this on how to build and configure the a314eth.device please.

    I’m using a version 1.1 A314 board, on an A500 with 1mb chip and 8mb fastram with OS 3.1 with a Pi 3b+ board connected

    • Hi Alasdair!

      I will make one for sure, a bit much going on right now though!
      Please come and visit us at the discord channel, link can be found at the bottom of the post above šŸ˜‰

      Best regards/Daniel

Leave a Reply

Your email address will not be published. Required fields are marked *