Skip to content

Latest commit

 

History

History
103 lines (81 loc) · 4.66 KB

Setup.md

File metadata and controls

103 lines (81 loc) · 4.66 KB

Notation

  • RPi: Raspberry Pi
  • ReRAM: Resistive Random Access Memory
  • PCB: Printed Circuit Board
  • TRNG: True Random Number Generator
  • Supervisor RPi (optional): The Raspberry Pi which supervises the progress (the one with a 1 in its ID)
  • ReRAM RPi: The RPi which is connected to the ReRAM PCB (the one with a 2 in its ID)

On the Supervisor RPi

The Supervisor RPi is not really necessary anymore since the ReRAM RPi is able to write any results directly to a file on the SD card (since commit 67cc0804c4a468e16ec96f596f74eb685c565452, the big circle rewrite). However, it is still useful as one can watch the progress through debug statements scattered throughout the code.

Wiring

Wiring diagram

Compilation

Use a Pre-built Kernel

From GitHub

  1. Just download the latest workflow build

From UPA FIM GitLab (the same, just a mirror)

  1. Go to the latest pipeline build
  2. Open its build log
  3. On the right sidebar, click on Download under Job artifacts
  4. The zip file contains all the relevant files. Be sure to rename the kernel that you want to deploy to just kernel8.img!

Compiling It Yourself

  1. Clone this Git repository (remember to also initialise the circle submodule!)
  2. Install either a cross-compiling gcc instance (gcc-aarch64-linux-gnu) or the native gcc if you are already on the ARMv8/AARCH64v8 platform
  3. Install make and wget
  4. Run ./init.sh
  5. Run ./compile.sh with your desired parameters
  6. All the required files can be found in boot

ReRAM RPi Setup

  1. Start Raspberry Pi Imager
  2. Select Raspberry Pi OS Lite 64 bit as image
  3. Select the correct SD card
  4. Advanced settings: don't matter
  5. Select Write
  6. Wait until done
  7. Briefly disconnect the SD card from the computer and insert it again
  8. You can remove all the files on the SD-card and copy the required files from the previous step onto its boot partition
  9. Put the SD card in RPi with the 2 in its ID
  10. Do not turn it on yet

Supervisor RPi Setup (optional, but has benefits)

Firmware Setup

  1. Start Raspberry Pi Imager
  2. Select Raspberry Pi OS Lite 32 bit as image
  3. Select correct SD card
  4. Advanced settings:
    • Hostname: Self-selectable (preferably name corresponding to letters on RPi, e.g. A1 -> alice, B1 -> bob etc.).
    • Enable SSH: Check the box and select Use password for authentication
    • Set up Wifi: Check the box and insert the data from your hotspot; also select the correct wifi country (probably corresponding to the language of the mobile phone)
    • Remaining parameters do not matter
  5. Select Write
  6. Wait until ready
  7. Put SD card in RPi with the 1 in its ID
  8. Turn on your hotspot
  9. Turn on the RPi
  10. Connect laptop to hotspot
  11. Wait until RPi is logged into the hotspot (may take a while at the first start...)
  12. Connect to RPi via ssh (try the host name as the IP address, otherwise use ip neigh or brute-force via e.g. "Angry IP Scanner")
  13. Execute command: sudo apt update && sudo apt install minicom screen && sudo raspi-config
  14. Navigate to "Interface Options" and select "Serial Port".
  15. For Would you like a login shell [...] select: <No>
  16. For Do you want to enable the serial port hardware [...] select: <Yes>
  17. Confirm with <Ok> and change to <Finish> with Tab and confirm with Enter
  18. When asked for a reboot, confirm with <Yes> and wait

Minicom Setup

  1. Once the RPi is restarted, connect again via SSH
  2. Execute command: ls /dev/ttyS0 and check that the file is displayed. If not, something went wrong during the setup
  3. Execute command: sudo minicom -s
  4. Navigate to Serial port setup in the menu and select it by pressing Enter
  5. Type A; the Serial device field should be selected now
  6. Change to /dev/ttyS0 and confirm with Enter
  7. Check that E says 115200 8N1
  8. Go to the main menu with Enter
  9. Under Screen and keyboard change A to Ctrl+X (it must then say ^X)
  10. Go back to the main menu with Enter
  11. Select Save setup as dfl and wait until the small message disappears
  12. Select Exit
  13. The minicom console should now be opened

Test Run

  1. Make sure that you are inside minicom in the Supervisor RPi
  2. Make sure that everything is wired up correctly
  3. Turn on the ReRAM RPi
  4. You should see logs inside minicom. If not, something went wrong!