From 8d7b1e437218464ab8c3d11af43cde99635e2420 Mon Sep 17 00:00:00 2001 From: Nicolas Stalder Date: Thu, 14 Jan 2021 02:42:19 +0100 Subject: [PATCH] Book experiment --- book/.gitignore | 1 + book/Makefile | 3 +++ book/book.toml | 6 +++++ book/src/SUMMARY.md | 6 +++++ book/src/chapter_1.md | 1 + book/src/getting-started/README.md | 4 ++++ book/src/getting-started/rpi.md | 36 ++++++++++++++++++++++++++++++ 7 files changed, 57 insertions(+) create mode 100644 book/.gitignore create mode 100644 book/Makefile create mode 100644 book/book.toml create mode 100644 book/src/SUMMARY.md create mode 100644 book/src/chapter_1.md create mode 100644 book/src/getting-started/README.md create mode 100644 book/src/getting-started/rpi.md diff --git a/book/.gitignore b/book/.gitignore new file mode 100644 index 00000000..7585238e --- /dev/null +++ b/book/.gitignore @@ -0,0 +1 @@ +book diff --git a/book/Makefile b/book/Makefile new file mode 100644 index 00000000..4d8ab123 --- /dev/null +++ b/book/Makefile @@ -0,0 +1,3 @@ +PORT := $(shell printf "%d" 0xbeee) +serve: + mdbook serve -p $(PORT) diff --git a/book/book.toml b/book/book.toml new file mode 100644 index 00000000..1d281ceb --- /dev/null +++ b/book/book.toml @@ -0,0 +1,6 @@ +[book] +authors = ["Nicolas Stalder"] +language = "en" +multilingual = false +src = "src" +title = "Solo 🐝" diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md new file mode 100644 index 00000000..3a51bfe2 --- /dev/null +++ b/book/src/SUMMARY.md @@ -0,0 +1,6 @@ +# Summary + +- [Chapter 1](./chapter_1.md) + +- [Getting Started](getting-started/README.md) + - [Raspberry Pi 4B](getting-started/rpi.md) diff --git a/book/src/chapter_1.md b/book/src/chapter_1.md new file mode 100644 index 00000000..b743fda3 --- /dev/null +++ b/book/src/chapter_1.md @@ -0,0 +1 @@ +# Chapter 1 diff --git a/book/src/getting-started/README.md b/book/src/getting-started/README.md new file mode 100644 index 00000000..37207e8e --- /dev/null +++ b/book/src/getting-started/README.md @@ -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). diff --git a/book/src/getting-started/rpi.md b/book/src/getting-started/rpi.md new file mode 100644 index 00000000..451ebba6 --- /dev/null +++ b/book/src/getting-started/rpi.md @@ -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 to work: just use `gdb`! +- For `jlink-software-and-documentation`, if it's not merged yet, apply a patch like +. 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 +```