Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Book experiment #36

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions book/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
book
3 changes: 3 additions & 0 deletions book/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PORT := $(shell printf "%d" 0xbeee)
serve:
mdbook serve -p $(PORT)
6 changes: 6 additions & 0 deletions book/book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[book]
authors = ["Nicolas Stalder"]
language = "en"
multilingual = false
src = "src"
title = "Solo 🐝"
6 changes: 6 additions & 0 deletions book/src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Summary

- [Chapter 1](./chapter_1.md)

- [Getting Started](getting-started/README.md)
- [Raspberry Pi 4B](getting-started/rpi.md)
1 change: 1 addition & 0 deletions book/src/chapter_1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Chapter 1
4 changes: 4 additions & 0 deletions book/src/getting-started/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Getting Started

Development mainly happens on Arch Linux and macOS, besides that GitHub Actions runs on Ubuntu,
and we do CI builds for Windows (which is Windows Server 2019).
36 changes: 36 additions & 0 deletions book/src/getting-started/rpi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Raspberry Pi 4B

The intent of this platform is to be a driver for CI, that is, run a self-hosted GitHub Actions runner.

The firmware would then be compiled on GitHub's usual Ubuntu CI servers, and just the built artifact
transfered for functional HIL testing.

We use Arch Linux for its wide collection of up-to-date packages, and the ease of building one's one
(e.g., we'll want to package up our own `lpc55-host`).

- [Install Arch on a MicroSD card](https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-4)
(AArch64 works fine, don't forget the last `sed` step, make sure you're not in the RPi3 section).
- If network doesn't come up reliably (`networkctl` shows `eth0` as `Configuring`), you can fix manually
with `networkctl down eth0`, `networkctl up eth0`, but
[this change to mkinitcpio.conf](https://github.com/raspberrypi/linux/issues/3108#issuecomment-723580334)
also seems to work (early `systemd-networkd` journal entries indicate `eth0` can't be found).
- No need to try to compile `ncurses5` to `arm-none-eabi-gdb` from <https://developer.arm.com/> to work: just use `gdb`!
- For `jlink-software-and-documentation`, if it's not merged yet, apply a patch like
<https://aur.archlinux.org/packages/jlink-software-and-documentation#comment-786082>. It seems like not
having a GUI suppresses `JLinkGDBServer`'s pop-up and confirmation attempts.

## The Runner
Install it as described in the Settings > Actions tab, then keep it running with:

```
[Unit]
Description=GitHub Actions runner
[Service]
Type=simple
ExecStart=/home/alarm/actions-runner/run.sh
WorkingDirectory=/home/alarm/actions-runner
[Install]
WantedBy=default.target
```