Running Arch Linux ARM on the Steam Link.
Yes, running - no puny chroot.
The Steam Link has ~256MiB of RAM (unlike what Wikipedia says),
and a Marvell ARMv7 CPU (1 Core, 1 Thread) (MV88DE3108
).
Directly booting a custom image has been made /harder/ due to contractual requirements.
This repository explores alternative methods.
- Ethernet connectivity to the Steam Link
- A USB Stick
bsdtar
curl
sudo
e2fsprogs
- partition the USB to one big partition
sudo mkfs.ext4 /dev/sdXY
sudo tune2fs -O ^has_journal /dev/sdXY
- disable journaling (no kernel support)
- Full userspace replacement
- Handoff to systemd
Three scripts - factory_test
, init-trampoline
and handoff
- work together to replace
the running userspace (including PID 1) with a different one.
factory_test
:- convince steam link that it is being QA/QC'd, and make it exec
handoff
- convince steam link that it is being QA/QC'd, and make it exec
handoff
:- creates a copy of
/sbin/init
in a tmpfs - masks
/sbin/init
, overlayinginit-trampoline
- calls the previously-copied
init
binary astelinit u
to reexec init- this causes PID 1 to exec
init-trampoline
- this causes PID 1 to exec
- creates a copy of
init-trampoline
:pivot_root
s to the new userspace rootfschroot
s to the new userspace rootfs to work around an issue causing the caller to still have their cwd in the old rootfs- creates necessary system mountpoints
- execs
lib/systemd/systemd
to hand off PID 1 to systemd
- Maybe open a fd to /sbin/init in
handoff
before mounting it, saves us from copying it to tmpfs - A patched kexec works with limitations
- Restructure repo into two methods: trampoline/kexec
- Potentially submit patched kconfig to archlinux arm upstream, or provide unofficial builds
- grawity:
handoff
idea, debugging