Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6cffb4e311 | |||
| 5c81953278 | |||
| a4e934a4e9 | |||
| 6c75585c0a | |||
| 37f9292ef1 | |||
| dc37b435c3 | |||
| 58b9ccb56c | |||
| 784fb4d5f6 | |||
| 9c0075057b | |||
| 5b59f8de8d | |||
| f3132a310e | |||
| 970d9685f1 | |||
| 689b9402a8 | |||
| b1eb322d7b | |||
| 8178ba195e | |||
| d933444fbc | |||
| 09addfa626 | |||
| 7fceae1418 | |||
| 6ca561592f | |||
| 2b2205f503 | |||
| 6f24c8ef46 | |||
| 2f307aecec | |||
| ee085a7606 | |||
| 907dd98b24 | |||
| 2618de74e8 | |||
| ba3c42f561 |
@@ -33,6 +33,7 @@ jobs:
|
||||
for pkg in make gnu-sed crane; do
|
||||
brew list --formula "$pkg" &>/dev/null || brew install "$pkg"
|
||||
done
|
||||
echo "/opt/homebrew/opt/gnu-sed/libexec/gnubin" >> "$GITHUB_PATH"
|
||||
gmake --version | head -1
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
@@ -66,9 +67,6 @@ jobs:
|
||||
- name: Tag release images
|
||||
run: gmake release TAG=${{ steps.version.outputs.tag }}
|
||||
|
||||
- name: Run Docker Scout CVE scan
|
||||
run: gmake scout
|
||||
|
||||
- name: Compress disk image
|
||||
run: |
|
||||
# The imager outputs to checkouts/talos/_out/
|
||||
@@ -91,11 +89,6 @@ jobs:
|
||||
REPO="${GITHUB_REPOSITORY}"
|
||||
API="${GITEA_URL}/api/v1"
|
||||
|
||||
SCOUT_SECTION=""
|
||||
if [ -f _out/scout-report.md ]; then
|
||||
SCOUT_SECTION=$(cat _out/scout-report.md)
|
||||
fi
|
||||
|
||||
# Extract component versions from tag (format: v1.12.3-k6.12.47-1)
|
||||
TALOS_VER=$(echo "$TAG" | sed -E 's/^(v[0-9]+\.[0-9]+\.[0-9]+)-.*/\1/')
|
||||
KERNEL_VER=$(echo "$TAG" | sed -E 's/.*-k([0-9]+\.[0-9]+\.[0-9]+)-.*/\1/')
|
||||
@@ -109,10 +102,7 @@ jobs:
|
||||
|
||||
## Artifacts
|
||||
- \`metal-arm64.raw.zst\` — Raw disk image for eMMC flashing
|
||||
- \`docker.io/svrnty/talos-rpi5:${TAG}\` — Installer image for talosctl upgrade
|
||||
|
||||
## Security Scan
|
||||
${SCOUT_SECTION}"
|
||||
- \`docker.io/svrnty/talos-rpi5:${TAG}\` — Installer image for talosctl upgrade"
|
||||
|
||||
# Strip leading whitespace from heredoc-style indentation
|
||||
RELEASE_BODY=$(echo "$RELEASE_BODY" | sed 's/^ //')
|
||||
|
||||
@@ -27,6 +27,7 @@ jobs:
|
||||
for pkg in make gnu-sed crane jq; do
|
||||
brew list --formula "$pkg" &>/dev/null || brew install "$pkg"
|
||||
done
|
||||
echo "/opt/homebrew/opt/gnu-sed/libexec/gnubin" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Check for upstream updates
|
||||
id: check
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# make clean # Remove checkouts and build artifacts
|
||||
|
||||
PKG_VERSION = v1.12.0
|
||||
TALOS_VERSION = v1.12.3
|
||||
TALOS_VERSION = v1.12.4
|
||||
SBCOVERLAY_VERSION = main
|
||||
|
||||
# Prefer GNU coreutils (macOS: brew install gnu-sed coreutils)
|
||||
@@ -74,7 +74,6 @@ help:
|
||||
@echo " overlay — Build SBC overlay (U-Boot, firmware, DTBs)"
|
||||
@echo " installer — Build Talos installer image + raw disk image"
|
||||
@echo " release — Tag and push release images"
|
||||
@echo " scout — Run Docker Scout CVE scan on all images"
|
||||
@echo " clean — Remove checkouts and build artifacts"
|
||||
@echo ""
|
||||
@echo "Variables:"
|
||||
@@ -116,8 +115,16 @@ patches-talos:
|
||||
git am "$(PATCHES_DIRECTORY)/siderolabs/talos/"*.patch
|
||||
|
||||
patches-overlay:
|
||||
cd "$(CHECKOUTS_DIRECTORY)/sbc-raspberrypi5" && \
|
||||
git am "$(PATCHES_DIRECTORY)/talos-rpi5/sbc-raspberrypi5/"*.patch
|
||||
@cd "$(CHECKOUTS_DIRECTORY)/sbc-raspberrypi5" && \
|
||||
GO_VER=$$(sed -n 's/^go //p' go.work | head -1) && \
|
||||
GO_MINOR=$$(echo "$$GO_VER" | cut -d. -f1,2) && \
|
||||
if [ "$$GO_MINOR" = "1.24" ]; then \
|
||||
echo "Overlay Go $$GO_VER — applying Go toolchain patch (CVE fix)"; \
|
||||
git am "$(PATCHES_DIRECTORY)/talos-rpi5/sbc-raspberrypi5/0001-"*.patch; \
|
||||
else \
|
||||
echo "Overlay Go $$GO_VER — skipping Go toolchain patch (CVEs fixed upstream)"; \
|
||||
fi && \
|
||||
git am "$(PATCHES_DIRECTORY)/talos-rpi5/sbc-raspberrypi5/0002-"*.patch
|
||||
|
||||
patches: patches-pkgs patches-talos patches-overlay
|
||||
|
||||
@@ -181,6 +188,10 @@ installer:
|
||||
--base-installer-image="$(INSTALLER_IMAGE):base-$(TALOS_TAG)" \
|
||||
$(IMAGER_COMMON_FLAGS) && \
|
||||
crane push ./_out/installer-arm64.tar $(INSTALLER_IMAGE):$(TALOS_TAG) && \
|
||||
printf "FROM $(INSTALLER_IMAGE):$(TALOS_TAG)\n" | docker buildx build \
|
||||
--platform linux/arm64 \
|
||||
$(ATTESTATION_ARGS) \
|
||||
-t $(INSTALLER_IMAGE):$(TALOS_TAG) --push - && \
|
||||
docker \
|
||||
run --rm -t -v ./_out:/out -v /dev:/dev --privileged \
|
||||
$(IMAGER_IMAGE):$(TALOS_TAG) \
|
||||
@@ -193,40 +204,9 @@ installer:
|
||||
#
|
||||
.PHONY: release
|
||||
release:
|
||||
docker pull $(INSTALLER_IMAGE):$(TALOS_TAG) && \
|
||||
docker tag $(INSTALLER_IMAGE):$(TALOS_TAG) $(REGISTRY)/$(REGISTRY_USERNAME)/$(IMAGE_NAME):$(TAG) && \
|
||||
docker push $(REGISTRY)/$(REGISTRY_USERNAME)/$(IMAGE_NAME):$(TAG)
|
||||
|
||||
#
|
||||
# Scout — Docker Scout CVE scan on all pushed images
|
||||
#
|
||||
SCOUT_REPORT := _out/scout-report.md
|
||||
SCOUT_IMAGES := \
|
||||
$(KERNEL_IMAGE):$(PKGS_TAG) \
|
||||
$(OVERLAY_IMAGE):$(SBCOVERLAY_TAG) \
|
||||
$(IMAGER_IMAGE):$(TALOS_TAG) \
|
||||
$(INSTALLER_IMAGE):base-$(TALOS_TAG) \
|
||||
$(INSTALLER_IMAGE):$(TALOS_TAG)
|
||||
|
||||
.PHONY: scout
|
||||
scout:
|
||||
@mkdir -p _out
|
||||
@if ! docker scout version >/dev/null 2>&1; then \
|
||||
echo "Docker Scout not available -- skipping CVE scan." > $(SCOUT_REPORT); \
|
||||
exit 0; \
|
||||
fi
|
||||
@echo "# Docker Scout CVE Summary" > $(SCOUT_REPORT)
|
||||
@echo "" >> $(SCOUT_REPORT)
|
||||
@for image in $(SCOUT_IMAGES); do \
|
||||
echo "Scanning $$image ..."; \
|
||||
echo "### $${image##*/}" >> $(SCOUT_REPORT); \
|
||||
echo '```' >> $(SCOUT_REPORT); \
|
||||
docker scout quickview "$$image" --platform linux/arm64 2>&1 >> $(SCOUT_REPORT) || \
|
||||
echo "Scout scan failed for $$image" >> $(SCOUT_REPORT); \
|
||||
echo '```' >> $(SCOUT_REPORT); \
|
||||
echo "" >> $(SCOUT_REPORT); \
|
||||
done
|
||||
@echo "Scout report written to $(SCOUT_REPORT)"
|
||||
docker buildx imagetools create \
|
||||
-t $(REGISTRY)/$(REGISTRY_USERNAME)/$(IMAGE_NAME):$(TAG) \
|
||||
$(INSTALLER_IMAGE):$(TALOS_TAG)
|
||||
|
||||
#
|
||||
# Clean
|
||||
|
||||
@@ -1,101 +1,152 @@
|
||||
# Talos CM5 Builder
|
||||
|
||||
Custom Talos Linux images for Raspberry Pi CM5 on Compute Blade hardware.
|
||||
Custom Talos Linux images for Raspberry Pi 5 / CM5 on Compute Blade hardware.
|
||||
|
||||
<a href="https://hub.docker.com/r/svrnty/talos-rpi5" target="_blank"><img src="https://img.shields.io/docker/v/svrnty/talos-rpi5?sort=semver&label=talos-rpi5&logo=docker&arch=arm64" alt="Docker Hub"></a>
|
||||
<a href="https://hub.docker.com/r/svrnty/talos-rpi5" target="_blank"><img src="https://img.shields.io/docker/pulls/svrnty/talos-rpi5?logo=docker" alt="Docker Pulls"></a>
|
||||
<a href="https://hub.docker.com/r/svrnty/talos-rpi5" target="_blank"><img src="https://img.shields.io/docker/image-size/svrnty/talos-rpi5?sort=semver&logo=docker&arch=arm64" alt="Docker Image Size"></a>
|
||||
|
||||
The official Talos Image Factory does not support CM5 — the mainline kernel lacks CM5 device trees and RP1 driver support. This builder uses the RPi downstream kernel (via [talos-rpi5/talos-builder](https://github.com/talos-rpi5/talos-builder) patches) to produce working CM5 images with our extensions and overclock config.
|
||||
|
||||
## What it builds
|
||||
## Current versions
|
||||
|
||||
- **Installer image** → `docker.io/svrnty/talos-rpi5:<tag>` (for `talosctl upgrade`)
|
||||
- **Raw disk image** → Gitea release `metal-arm64.raw.zst` (for eMMC flashing)
|
||||
| Component | Version |
|
||||
|-----------|---------|
|
||||
| Talos Linux | <a href="https://github.com/siderolabs/talos" target="_blank"><img src="https://img.shields.io/badge/talos-v1.12.4-blue?logo=kubernetes&logoColor=white" alt="Talos version"></a> |
|
||||
| RPi Kernel | <a href="https://github.com/raspberrypi/linux" target="_blank"><img src="https://img.shields.io/badge/kernel-6.12.47-blue?logo=linux&logoColor=white" alt="Kernel version"></a> |
|
||||
| iscsi-tools | <a href="https://github.com/siderolabs/extensions" target="_blank"><img src="https://img.shields.io/badge/iscsi--tools-v0.1.6-blue?logo=docker" alt="iscsi-tools version"></a> |
|
||||
| util-linux-tools | <a href="https://github.com/siderolabs/extensions" target="_blank"><img src="https://img.shields.io/badge/util--linux--tools-2.40.4-blue?logo=docker" alt="util-linux-tools version"></a> |
|
||||
|
||||
Baked-in config:
|
||||
- RPi downstream kernel with CM5/RP1 support
|
||||
- Overclock: 2.6GHz (`arm_freq=2600`, `over_voltage_delta=50000`, `arm_boost=1`)
|
||||
- Extensions: `iscsi-tools`, `util-linux-tools`
|
||||
## Image tags
|
||||
|
||||
Release images are published to <a href="https://hub.docker.com/r/svrnty/talos-rpi5" target="_blank"><code>docker.io/svrnty/talos-rpi5</code></a> with the format:
|
||||
|
||||
```
|
||||
v<talos>-k<kernel>-<revision>
|
||||
```
|
||||
|
||||
For example: `v1.12.4-k6.12.47-1`
|
||||
|
||||
| Segment | Meaning |
|
||||
|---------|---------|
|
||||
| `v1.12.4` | Upstream Talos Linux version |
|
||||
| `k6.12.47` | RPi downstream kernel version |
|
||||
| `2` | Build revision (bumped for config/patch changes on the same upstream versions) |
|
||||
|
||||
## Usage
|
||||
|
||||
### Building locally (ARM64 host required)
|
||||
### Install from raw disk image
|
||||
|
||||
Download `metal-arm64.raw.zst` from the [latest release](../../releases/latest) and flash to eMMC:
|
||||
|
||||
```bash
|
||||
make checkouts patches # Clone and patch sources
|
||||
make kernel # Build RPi kernel
|
||||
make overlay # Build SBC overlay
|
||||
make installer # Build installer + disk image
|
||||
zstd -d metal-arm64.raw.zst -o metal-arm64.raw
|
||||
# Flash to eMMC/SD via your preferred tool (dd, balenaEtcher, etc.)
|
||||
```
|
||||
|
||||
### CI/CD (Gitea Actions)
|
||||
|
||||
Push a version tag to trigger an automated build:
|
||||
### Upgrade an existing node
|
||||
|
||||
```bash
|
||||
git tag v1.11.5-1
|
||||
git push origin v1.11.5-1
|
||||
talosctl upgrade --image docker.io/svrnty/talos-rpi5:v1.12.4-k6.12.47-1
|
||||
```
|
||||
|
||||
The pipeline runs on the ARM64 self-hosted runner and:
|
||||
1. Builds the kernel, overlay, and installer
|
||||
2. Pushes the installer image to Docker Hub
|
||||
3. Creates a Gitea release with the raw disk image
|
||||
|
||||
### Upstream update checks
|
||||
|
||||
A weekly scheduled workflow checks for new Talos and RPi kernel releases and creates Gitea issues when updates are available.
|
||||
|
||||
## CI Secrets
|
||||
|
||||
| Secret | Description |
|
||||
|--------|-------------|
|
||||
| `REGISTRY_USERNAME` | Docker Hub username (org-level) |
|
||||
| `REGISTRY_PASSWORD` | Docker Hub access token (org-level) |
|
||||
|
||||
## Runner Setup (Apple Silicon Mac Mini)
|
||||
|
||||
The build runner needs:
|
||||
- Docker Desktop with Buildx (arm64 native)
|
||||
- Gitea `act_runner` registered with labels: `self-hosted`, `macOS`, `arm64`
|
||||
- Sufficient disk space for kernel builds (~20GB)
|
||||
> **Note:** In-place upgrades use GRUB with `--no-nvram` to work around the RPi5/CM5 `SetVariableRT` firmware limitation. This patch is included but not yet tested in production — re-flashing the disk image is the proven fallback.
|
||||
|
||||
```bash
|
||||
# Install act_runner via Homebrew
|
||||
brew install act_runner
|
||||
|
||||
# Or download directly
|
||||
curl -sL https://gitea.com/gitea/act_runner/releases/latest/download/act_runner-darwin-arm64 -o act_runner
|
||||
chmod +x act_runner
|
||||
|
||||
# Register
|
||||
./act_runner register \
|
||||
--instance https://git.openharbor.io \
|
||||
--token <runner-token> \
|
||||
--name mac-mini \
|
||||
--labels self-hosted,macOS,arm64
|
||||
|
||||
# Run as service
|
||||
./act_runner daemon
|
||||
# Fallback: re-flash method
|
||||
zstd -d metal-arm64.raw.zst -o metal-arm64.raw
|
||||
# Flash to eMMC/SD via your preferred tool
|
||||
```
|
||||
|
||||
## Structure
|
||||
### What's included
|
||||
|
||||
- RPi downstream kernel with CM5/RP1 support (4K page size, aligned with upstream Talos)
|
||||
- GRUB bootloader with `--no-nvram` for reliable `talosctl upgrade` on RPi5/CM5
|
||||
- Overclock: 2.6GHz (`arm_freq=2600`, `over_voltage_delta=50000`, `arm_boost=1`)
|
||||
- Extensions: `iscsi-tools`, `util-linux-tools`
|
||||
|
||||
## Known issues
|
||||
|
||||
### ~~No serial console output after boot~~ (Fixed)
|
||||
|
||||
The overlay was using `console=ttyAMA0` (GPIO 14/15 UART) but the RPi5/CM5 debug UART is `ttyAMA10`. Fixed by switching to `console=ttyAMA10,115200` and adding `earlycon=pl011,0x107d001000,115200n8` for early boot output. Also added `[pi5] enable_uart=0` to `config.txt` to match upstream and avoid U-Boot compatibility issues.
|
||||
|
||||
*Upstream: <a href="https://github.com/talos-rpi5/talos-builder/issues/4" target="_blank">talos-builder#4</a>*
|
||||
|
||||
### Install disk config ignored on SBCs
|
||||
|
||||
Talos ignores the `machine.install.disk` config field on SBC platforms. You **must flash the disk image directly** to your target disk (eMMC, SD, NVMe). For NVMe boot, `dd` the metal image to the NVMe drive and configure the EEPROM boot order (`BOOT_ORDER=0xf416`, `PCIE_PROBE=1`).
|
||||
|
||||
*Upstream: <a href="https://github.com/talos-rpi5/talos-builder/issues/22" target="_blank">talos-builder#22</a>*
|
||||
|
||||
## Roadmap
|
||||
|
||||
This project targets production-ready Talos clusters on RPi5/CM5 hardware.
|
||||
|
||||
| Status | Milestone | Description |
|
||||
|--------|-----------|-------------|
|
||||
| Untested | **4K page size** | Aligned with upstream Talos kernel config. Reduces memory overhead and improves workload compatibility (Longhorn, jemalloc, F2FS, etc.). |
|
||||
| Untested | **Reliable in-place upgrades** | Force GRUB bootloader with `--no-nvram` on arm64 to work around the `SetVariableRT` firmware limitation (<a href="https://github.com/talos-rpi5/talos-builder/issues/21" target="_blank">talos-builder#21</a>). |
|
||||
| Untested | **Serial console fix** | Use correct debug UART (`ttyAMA10`) with `earlycon` for early boot output. |
|
||||
| Untested | **NVMe boot support** | `dd` image to NVMe + set EEPROM `BOOT_ORDER=0xf416` and `PCIE_PROBE=1`. Kernel has `CONFIG_BLK_DEV_NVME=y` built-in. |
|
||||
|
||||
## NVMe boot (untested)
|
||||
|
||||
The kernel has NVMe built-in (`CONFIG_BLK_DEV_NVME=y`), so booting from NVMe should work by flashing the disk image directly and configuring the RPi5/CM5 EEPROM.
|
||||
|
||||
### 1. Flash the image to NVMe
|
||||
|
||||
Connect the NVMe drive via a USB adapter and flash:
|
||||
|
||||
```bash
|
||||
zstd -d metal-arm64.raw.zst | sudo dd of=/dev/<nvme-device> bs=4M status=progress
|
||||
sync
|
||||
```
|
||||
.gitea/workflows/
|
||||
build.yaml # Build pipeline (tag push trigger)
|
||||
check-updates.yaml # Upstream update checker (weekly cron)
|
||||
Makefile # Build orchestration
|
||||
config/
|
||||
config.txt.append # CM5 overclock settings
|
||||
extensions.yaml # System extensions list
|
||||
scripts/
|
||||
check-upstream.sh # Version comparison script
|
||||
patches/
|
||||
siderolabs/
|
||||
pkgs/0001-*.patch # RPi kernel patch
|
||||
talos/0001-*.patch # Module list patch
|
||||
talos-rpi5/
|
||||
sbc-raspberrypi5/ # Overlay patches (Go toolchain bump)
|
||||
|
||||
### 2. Configure EEPROM boot order
|
||||
|
||||
Use `rpiboot` to update the CM5 EEPROM. Clone the usbboot repo and edit the boot config:
|
||||
|
||||
```bash
|
||||
git clone --depth=1 https://github.com/raspberrypi/usbboot
|
||||
cd usbboot && make
|
||||
# Edit the EEPROM config for CM5
|
||||
cp recovery/boot.conf recovery/boot.conf.bak
|
||||
```
|
||||
|
||||
Add or update these values in `recovery/boot.conf`:
|
||||
|
||||
```ini
|
||||
BOOT_ORDER=0xf416
|
||||
PCIE_PROBE=1
|
||||
```
|
||||
|
||||
Then flash via USB with the CM5 in USB boot mode (hold nRPIBOOT or disable eMMC boot on your carrier board):
|
||||
|
||||
```bash
|
||||
sudo ./rpiboot -d recovery
|
||||
```
|
||||
|
||||
`BOOT_ORDER` is read right-to-left: try NVMe (`6`) first, then SD (`1`), then USB (`4`), then restart (`f`). `PCIE_PROBE=1` is required for non-HAT+ NVMe adapters (Compute Blade, most M.2 carrier boards).
|
||||
|
||||
### 3. Boot from NVMe
|
||||
|
||||
Power on. The RPi firmware should find the boot partition on NVMe, load U-Boot, and boot Talos.
|
||||
|
||||
### Optional: enable PCIe Gen 3
|
||||
|
||||
Add to your `configTxtAppend` overlay option or directly to `config.txt` on the boot partition:
|
||||
|
||||
```ini
|
||||
dtparam=pciex1_gen=3
|
||||
```
|
||||
|
||||
This doubles throughput (~400 MB/s Gen 2 to ~800 MB/s Gen 3). Not officially certified by Raspberry Pi but works on most NVMe drives.
|
||||
|
||||
## Building
|
||||
|
||||
For local builds, CI/CD setup, runner configuration, and project structure, see [TECHNICAL.md](TECHNICAL.md).
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the [Mozilla Public License 2.0](LICENSE).
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
# Technical Guide
|
||||
|
||||
Build infrastructure, CI/CD configuration, and project structure for the Talos CM5 Builder.
|
||||
|
||||
## Building locally (ARM64 host required)
|
||||
|
||||
```bash
|
||||
make checkouts patches # Clone and patch upstream sources
|
||||
make kernel # Build RPi kernel
|
||||
make overlay # Build SBC overlay
|
||||
make installer # Build installer + disk image
|
||||
```
|
||||
|
||||
## CI/CD (Gitea Actions)
|
||||
|
||||
Push a version tag to trigger an automated build:
|
||||
|
||||
```bash
|
||||
git tag v1.12.3-k6.12.47-2
|
||||
git push origin v1.12.3-k6.12.47-2
|
||||
```
|
||||
|
||||
The pipeline runs on the ARM64 self-hosted runner and:
|
||||
1. Builds the kernel, overlay, and installer
|
||||
2. Attaches SBOM attestation (cosign + syft)
|
||||
3. Pushes the installer image to Docker Hub
|
||||
4. Creates a Gitea release with the raw disk image
|
||||
|
||||
### Upstream update checks
|
||||
|
||||
A weekly scheduled workflow checks for new Talos and RPi kernel releases and creates Gitea issues when updates are available.
|
||||
|
||||
## CI Secrets
|
||||
|
||||
| Secret | Description |
|
||||
|--------|-------------|
|
||||
| `REGISTRY_USERNAME` | Docker Hub username (org-level) |
|
||||
| `REGISTRY_PASSWORD` | Docker Hub access token (org-level) |
|
||||
|
||||
## Runner Setup (Apple Silicon Mac Mini)
|
||||
|
||||
The build runner needs:
|
||||
- Docker Desktop with Buildx (arm64 native)
|
||||
- Gitea `act_runner` registered with labels: `self-hosted`, `macOS`, `arm64`
|
||||
- Sufficient disk space for kernel builds (~20GB)
|
||||
|
||||
```bash
|
||||
# Install act_runner via Homebrew
|
||||
brew install act_runner
|
||||
|
||||
# Or download directly
|
||||
curl -sL https://gitea.com/gitea/act_runner/releases/latest/download/act_runner-darwin-arm64 -o act_runner
|
||||
chmod +x act_runner
|
||||
|
||||
# Register
|
||||
./act_runner register \
|
||||
--instance https://git.openharbor.io \
|
||||
--token <runner-token> \
|
||||
--name mac-mini \
|
||||
--labels self-hosted,macOS,arm64
|
||||
|
||||
# Run as service
|
||||
./act_runner daemon
|
||||
```
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
.gitea/workflows/
|
||||
build.yaml # Build pipeline (tag push trigger)
|
||||
check-updates.yaml # Upstream update checker (weekly cron)
|
||||
Makefile # Build orchestration
|
||||
config/
|
||||
config.txt.append # CM5 overclock settings
|
||||
extensions.yaml # System extensions list
|
||||
scripts/
|
||||
check-upstream.sh # Version comparison script
|
||||
patches/
|
||||
siderolabs/
|
||||
pkgs/0001-*.patch # RPi kernel patch
|
||||
talos/0001-*.patch # Module list patch
|
||||
talos/0002-*.patch # Skip NVRAM writes for GRUB on arm64
|
||||
talos/0003-*.patch # Force GRUB bootloader on arm64
|
||||
talos-rpi5/
|
||||
sbc-raspberrypi5/ # Overlay patches (Go toolchain bump)
|
||||
cosign.pub # Public key for verifying image attestations
|
||||
```
|
||||
@@ -0,0 +1,4 @@
|
||||
-----BEGIN PUBLIC KEY-----
|
||||
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEPkZxXgi280kakXdVwjygCvIs5chd
|
||||
Ns/gANqNilq0OZDkmcAzeaKJRkRbiDjqNeW1JLv1CYwN/1olypEdVyjLoQ==
|
||||
-----END PUBLIC KEY-----
|
||||
@@ -58,17 +58,6 @@ index 65b3647..7ba70c0 100644
|
||||
# CONFIG_KEXEC is not set
|
||||
CONFIG_KEXEC_FILE=y
|
||||
CONFIG_KEXEC_SIG=y
|
||||
@@ -450,8 +451,8 @@ CONFIG_ROCKCHIP_ERRATUM_3588001=y
|
||||
CONFIG_SOCIONEXT_SYNQUACER_PREITS=y
|
||||
# end of ARM errata workarounds via the alternatives framework
|
||||
|
||||
-CONFIG_ARM64_4K_PAGES=y
|
||||
-# CONFIG_ARM64_16K_PAGES is not set
|
||||
+# CONFIG_ARM64_4K_PAGES is not set
|
||||
+CONFIG_ARM64_16K_PAGES=y
|
||||
# CONFIG_ARM64_64K_PAGES is not set
|
||||
# CONFIG_ARM64_VA_BITS_39 is not set
|
||||
CONFIG_ARM64_VA_BITS_48=y
|
||||
@@ -660,7 +661,7 @@ CONFIG_CPU_FREQ_STAT=y
|
||||
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
|
||||
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
|
||||
|
||||
@@ -11,7 +11,7 @@ diff --git a/hack/modules-arm64.txt b/hack/modules-arm64.txt
|
||||
index 3b11b7551..95c3ee669 100644
|
||||
--- a/hack/modules-arm64.txt
|
||||
+++ b/hack/modules-arm64.txt
|
||||
@@ -1,237 +1,190 @@
|
||||
@@ -1,238 +1,190 @@
|
||||
-kernel/arch/arm64/lib/xor-neon.ko
|
||||
+modules.builtin.bin
|
||||
+modules.builtin.modinfo
|
||||
@@ -394,6 +394,7 @@ index 3b11b7551..95c3ee669 100644
|
||||
kernel/lib/parman.ko
|
||||
-kernel/lib/raid6/raid6_pq.ko
|
||||
-kernel/net/ipv4/ip_gre.ko
|
||||
-kernel/net/ipv6/ip6_gre.ko
|
||||
-kernel/net/openvswitch/vport-gre.ko
|
||||
-kernel/net/tls/tls.ko
|
||||
+kernel/fs/btrfs/btrfs.ko
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From 2db8797af370535aba7c5694cd291bba8e6c5a67 Mon Sep 17 00:00:00 2001
|
||||
From: Mathias Beaulieu-Duncan <mathias@svrnty.io>
|
||||
Date: Fri, 13 Feb 2026 19:08:41 -0500
|
||||
Subject: [PATCH 2/3] Skip NVRAM writes for GRUB on arm64
|
||||
|
||||
On arm64 platforms like RPi5/CM5, the UEFI firmware (U-Boot) does not
|
||||
support EFI runtime SetVariable, causing grub-install to fail when
|
||||
efibootmgr tries to create NVRAM boot entries. Since arm64-efi systems
|
||||
boot by convention (finding BOOTAA64.efi on the ESP), NVRAM boot
|
||||
entries are unnecessary.
|
||||
|
||||
Pass --no-nvram to grub-install on arm64 to allow in-place upgrades
|
||||
via talosctl upgrade to succeed.
|
||||
---
|
||||
.../machined/pkg/runtime/v1alpha1/bootloader/grub/install.go | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/internal/app/machined/pkg/runtime/v1alpha1/bootloader/grub/install.go b/internal/app/machined/pkg/runtime/v1alpha1/bootloader/grub/install.go
|
||||
index 6f5c9f8..766374b 100644
|
||||
--- a/internal/app/machined/pkg/runtime/v1alpha1/bootloader/grub/install.go
|
||||
+++ b/internal/app/machined/pkg/runtime/v1alpha1/bootloader/grub/install.go
|
||||
@@ -196,7 +196,7 @@ func (c *Config) install(opts options.InstallOptions) (*options.InstallResult, e
|
||||
args = append(args, "--efi-directory="+filepath.Join(opts.MountPrefix, constants.EFIMountPoint))
|
||||
}
|
||||
|
||||
- if opts.ImageMode {
|
||||
+ if opts.ImageMode || opts.Arch == arm64 {
|
||||
args = append(args, "--no-nvram")
|
||||
}
|
||||
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
From 1393b3f013e758f6bb52d14006d3a7e7db348930 Mon Sep 17 00:00:00 2001
|
||||
From: Mathias Beaulieu-Duncan <mathias@svrnty.io>
|
||||
Date: Fri, 13 Feb 2026 19:08:58 -0500
|
||||
Subject: [PATCH 3/3] Force GRUB bootloader on arm64
|
||||
|
||||
On arm64 platforms like RPi5/CM5, the UEFI firmware (U-Boot) exposes
|
||||
/sys/firmware/efi but does not support EFI runtime SetVariable. This
|
||||
causes NewAuto() to select sd-boot, which then fails when trying to
|
||||
write EFI variables during installation/upgrade.
|
||||
|
||||
Force GRUB on arm64 since it uses config files instead of EFI
|
||||
variables for boot configuration. Combined with the --no-nvram patch,
|
||||
this enables reliable in-place upgrades via talosctl upgrade on
|
||||
RPi5/CM5 hardware.
|
||||
|
||||
Ref: https://github.com/siderolabs/talos/issues/10859
|
||||
Ref: https://github.com/talos-rpi5/talos-builder/issues/21
|
||||
---
|
||||
.../machined/pkg/runtime/v1alpha1/bootloader/bootloader.go | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/internal/app/machined/pkg/runtime/v1alpha1/bootloader/bootloader.go b/internal/app/machined/pkg/runtime/v1alpha1/bootloader/bootloader.go
|
||||
index f084e09..5c388c1 100644
|
||||
--- a/internal/app/machined/pkg/runtime/v1alpha1/bootloader/bootloader.go
|
||||
+++ b/internal/app/machined/pkg/runtime/v1alpha1/bootloader/bootloader.go
|
||||
@@ -8,6 +8,7 @@ package bootloader
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
+ goruntime "runtime"
|
||||
|
||||
"github.com/siderolabs/go-blockdevice/v2/block"
|
||||
"github.com/siderolabs/go-blockdevice/v2/partitioning/gpt"
|
||||
@@ -73,6 +74,10 @@ func Probe(disk string, options options.ProbeOptions) (Bootloader, error) {
|
||||
|
||||
// NewAuto returns a new bootloader based on auto-detection.
|
||||
func NewAuto() Bootloader {
|
||||
+ if goruntime.GOARCH == "arm64" {
|
||||
+ return grub.NewConfig()
|
||||
+ }
|
||||
+
|
||||
if sdboot.IsUEFIBoot() {
|
||||
return sdboot.New()
|
||||
}
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
From 98366401143dcc31c056a7d96242775f9ba013ca Mon Sep 17 00:00:00 2001
|
||||
From: Mathias Beaulieu-Duncan <mathias@svrnty.io>
|
||||
Date: Sat, 14 Feb 2026 14:05:15 -0500
|
||||
Subject: [PATCH 4/4] Fallback to classic bind mounts on kernels without
|
||||
open_tree support
|
||||
|
||||
The open_tree syscall on anonymous filesystem file descriptors was added
|
||||
in kernel 6.15.0. Talos previously only checked for this capability when
|
||||
running in container mode, assuming bare metal always had a sufficiently
|
||||
new kernel. However, platforms like RPi5/CM5 use the RPi downstream
|
||||
kernel (6.12.x) which lacks this feature, causing shadow bind mount
|
||||
failures for /etc files and cascading network initialization failures.
|
||||
|
||||
Remove the InContainer() gate so the OpentreeOnAnonymousFS() capability
|
||||
check runs on all platforms, enabling the classic (OSRoot) fallback when
|
||||
the kernel does not support the newer mount API.
|
||||
---
|
||||
.../pkg/runtime/v1alpha2/v1alpha2_controller.go | 11 ++++++-----
|
||||
1 file changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/internal/app/machined/pkg/runtime/v1alpha2/v1alpha2_controller.go b/internal/app/machined/pkg/runtime/v1alpha2/v1alpha2_controller.go
|
||||
index 29b297654..653a45d57 100644
|
||||
--- a/internal/app/machined/pkg/runtime/v1alpha2/v1alpha2_controller.go
|
||||
+++ b/internal/app/machined/pkg/runtime/v1alpha2/v1alpha2_controller.go
|
||||
@@ -113,11 +113,12 @@ func (ctrl *Controller) Run(ctx context.Context, drainer *runtime.Drainer) error
|
||||
|
||||
networkBindMountTarget = constants.SystemResolvedPath
|
||||
|
||||
- // While running in container, we don't have control over kernel version
|
||||
- // shipped with the machine. If the kernel does not support open_tree syscall
|
||||
- // on anonymous filesystem file descriptors, we need to fallback to the classic,
|
||||
- // less secure mode. This capability was added in kernel 6.15.0.
|
||||
- if ctrl.v1alpha1Runtime.State().Platform().Mode().InContainer() {
|
||||
+ // If the kernel does not support open_tree syscall on anonymous filesystem
|
||||
+ // file descriptors, we need to fallback to the classic, less secure mode.
|
||||
+ // This capability was added in kernel 6.15.0. This check is needed for
|
||||
+ // containers (where the host kernel is unknown) and for bare metal platforms
|
||||
+ // running older kernels such as the RPi downstream kernel (6.12.x).
|
||||
+ {
|
||||
opentreeOnAnonymous, err := runtime.KernelCapabilities().OpentreeOnAnonymousFS()
|
||||
if err != nil {
|
||||
return err
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
From 7c1f75d724e54df5382d7900a0fdfac50f870043 Mon Sep 17 00:00:00 2001
|
||||
From: Mathias Beaulieu-Duncan <mathias@svrnty.io>
|
||||
Date: Fri, 13 Feb 2026 19:43:02 -0500
|
||||
Subject: [PATCH] Fix serial console for RPi5/CM5 debug UART
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The overlay was using console=ttyAMA0 (GPIO 14/15 UART) but the RPi5
|
||||
debug UART — the JST connector between HDMI ports on Pi5, or test pads
|
||||
TP35/TP36 on CM5 — is ttyAMA10.
|
||||
|
||||
Changes:
|
||||
- main.go: Use console=ttyAMA10,115200 (Pi5 debug UART, not GPIO UART0)
|
||||
- main.go: Add earlycon=pl011,0x107d001000,115200n8 for early boot output
|
||||
before the full PL011 driver initializes
|
||||
- config.txt: Add [pi5] enable_uart=0 to match upstream and avoid U-Boot
|
||||
compatibility issues (the debug UART is always active regardless)
|
||||
|
||||
The earlycon parameter uses the BCM2712 debug UART MMIO base address
|
||||
(0x107d001000) to provide kernel output immediately after ExitBootServices,
|
||||
bridging the gap between U-Boot handoff and full driver init.
|
||||
---
|
||||
installers/rpi5/src/config.txt | 7 ++++++-
|
||||
installers/rpi5/src/main.go | 3 ++-
|
||||
2 files changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/installers/rpi5/src/config.txt b/installers/rpi5/src/config.txt
|
||||
index 1445d0e..7af461e 100644
|
||||
--- a/installers/rpi5/src/config.txt
|
||||
+++ b/installers/rpi5/src/config.txt
|
||||
@@ -11,8 +11,13 @@ kernel=u-boot.bin
|
||||
arm_64bit=1
|
||||
# Run as fast as firmware / board allows.
|
||||
arm_boost=1
|
||||
-# Enable the primary/console UART.
|
||||
+# Enable the primary/console UART (globally).
|
||||
enable_uart=1
|
||||
+# Disable UART on Pi5 to avoid U-Boot compatibility issue.
|
||||
+# The debug UART (ttyAMA10) is always active regardless of this setting.
|
||||
+[pi5]
|
||||
+enable_uart=0
|
||||
+[all]
|
||||
# Disable Bluetooth.
|
||||
dtoverlay=disable-bt
|
||||
# Disable Wireless Lan.
|
||||
diff --git a/installers/rpi5/src/main.go b/installers/rpi5/src/main.go
|
||||
index 38cd824..fed3819 100644
|
||||
--- a/installers/rpi5/src/main.go
|
||||
+++ b/installers/rpi5/src/main.go
|
||||
@@ -32,8 +32,9 @@ func (i *RpiInstaller) GetOptions(extra rpiOptions) (overlay.Options, error) {
|
||||
return overlay.Options{
|
||||
Name: "rpi5",
|
||||
KernelArgs: []string{
|
||||
+ "earlycon=pl011,0x107d001000,115200n8",
|
||||
"console=tty0",
|
||||
- "console=ttyAMA0,115200",
|
||||
+ "console=ttyAMA10,115200",
|
||||
"sysctl.kernel.kexec_load_disabled=1",
|
||||
"talos.dashboard.disabled=1",
|
||||
},
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
+20
-2
@@ -83,11 +83,11 @@ fi
|
||||
echo "Running patch smoke test ..." >&2
|
||||
if ! gmake checkouts patches; then
|
||||
echo "Patches failed to apply!" >&2
|
||||
gmake checkouts-clean 2>/dev/null || true
|
||||
gmake checkouts-clean >/dev/null 2>&1 || true
|
||||
echo "patch_failed=true"
|
||||
exit 0
|
||||
fi
|
||||
gmake checkouts-clean
|
||||
gmake checkouts-clean >/dev/null 2>&1
|
||||
|
||||
# ── Generate tag ────────────────────────────────────────────────────
|
||||
TALOS_VER=$(grep '^TALOS_VERSION' "$MAKEFILE" | awk '{print $NF}')
|
||||
@@ -103,5 +103,23 @@ LAST_BUILD=$(git tag -l "${TAG_PREFIX}-*" \
|
||||
NEXT_BUILD=$(( ${LAST_BUILD:-0} + 1 ))
|
||||
NEW_TAG="${TAG_PREFIX}-${NEXT_BUILD}"
|
||||
|
||||
# ── Update README badges and examples ───────────────────────────────
|
||||
README="README.md"
|
||||
if [ -f "$README" ]; then
|
||||
OLD_TALOS=$(sed -n 's/.*talos-v\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p' "$README" | head -1)
|
||||
OLD_KERNEL=$(sed -n 's/.*kernel-\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p' "$README" | head -1)
|
||||
OLD_TAG=$(sed -n 's/.*\(v[0-9]*\.[0-9]*\.[0-9]*-k[0-9]*\.[0-9]*\.[0-9]*-[0-9]*\).*/\1/p' "$README" | head -1)
|
||||
|
||||
echo "Updating README: talos v${OLD_TALOS} → v${TALOS_VER}, kernel ${OLD_KERNEL} → ${KERNEL_VER}, tag ${OLD_TAG} → ${NEW_TAG}" >&2
|
||||
|
||||
sed -i "s/talos-v${OLD_TALOS}/talos-${TALOS_VER}/g" "$README"
|
||||
sed -i "s/kernel-${OLD_KERNEL}/kernel-${KERNEL_VER}/g" "$README"
|
||||
sed -i "s/\`v${OLD_TALOS}\`/\`${TALOS_VER}\`/g" "$README"
|
||||
sed -i "s/\`k${OLD_KERNEL}\`/\`k${KERNEL_VER}\`/g" "$README"
|
||||
if [ -n "$OLD_TAG" ]; then
|
||||
sed -i "s/${OLD_TAG}/${NEW_TAG}/g" "$README"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Generated tag: $NEW_TAG" >&2
|
||||
echo "new_tag=$NEW_TAG"
|
||||
|
||||
Reference in New Issue
Block a user