Compare commits

..

7 Commits

Author SHA1 Message Date
Mathias Beaulieu-Duncan 5abca73056 Fix 21 Go stdlib CVEs and enable supply chain attestations
Build Talos CM5 Image / build (push) Successful in 3m26s
- Patch sbc-raspberrypi5 overlay to use Go 1.24.13 (fixes 1C/7H/12M/1L CVEs)
- Add ATTESTATION_ARGS (--provenance=true --sbom=true) to all buildx targets
- Override upstream --provenance=false via TARGET_ARGS (last flag wins)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 15:36:13 -05:00
Mathias Beaulieu-Duncan 0d3941eb91 Add daily auto-update workflow and fix overlay dirty tag
Build Talos CM5 Image / build (push) Successful in 3m6s
- Rewrite check-upstream.sh to parse RPi kernel version from patch file
- Add auto-update.sh for automated version bumps with patch smoke test
- Rewrite check-updates.yaml as daily auto-build with issue fallback
- Update build.yaml release body to show Talos + kernel versions from tag
- Fix overlay dirty tag: remove --dirty from SBCOVERLAY_TAG git describe
  (the sed rewrite of pkg.yaml is intentional, not an accidental change)

Tag strategy: v{TALOS}-k{KERNEL}-{BUILD} (e.g. v1.12.3-k6.12.47-1)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 15:05:46 -05:00
Mathias Beaulieu-Duncan 3a824e960f Regenerate talos patch for v1.12.3
Build Talos CM5 Image / build (push) Failing after 31m33s
Patch was stale — regenerated from the working checkout to match
the v1.12.3 hack/modules-arm64.txt index.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 14:27:34 -05:00
Mathias Beaulieu-Duncan f2b8a0ec65 Fix talos patch — restore hack/modules-arm64.txt
Build Talos CM5 Image / build (push) Failing after 13s
The talos patch was incorrectly replaced with pkgs-repo changes
(Pkgfile, kernel config). Restored the correct patch that modifies
hack/modules-arm64.txt in the talos checkout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 14:26:12 -05:00
Mathias Beaulieu-Duncan a3a3881cff Bump RPi kernel to stable_20250916 (6.12.47)
Build Talos CM5 Image / build (push) Failing after 19s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 14:11:55 -05:00
Mathias Beaulieu-Duncan 2b5fd0a25e Update patches for Talos v1.12.3 / pkgs v1.12.0
Regenerated patches to match current upstream checkouts:
- pkgs: updated kernel version, checksums, and config-arm64
- talos: reworked to patch Pkgfile, kernel config, and pkg.yaml

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 14:06:01 -05:00
Mathias Beaulieu-Duncan e98c573bae Add Docker Scout CVE scanning and switch CI to gmake
- Add `scout` Makefile target that scans all 5 pushed images with
  `docker scout quickview` and writes a summary to _out/scout-report.md
- Switch all CI workflow steps from `make` to `gmake` for GNU Make 4.x
- Add brew dependency step for make, gnu-sed, and crane
- Include CVE summary in Gitea release notes via jq JSON escaping
- Update `clean` target to remove _out/ directory

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 14:01:13 -05:00
8 changed files with 652 additions and 337 deletions
+46 -15
View File
@@ -28,6 +28,13 @@ jobs:
- name: Verify Docker is running
run: docker info
- name: Install build dependencies
run: |
for pkg in make gnu-sed crane; do
brew list --formula "$pkg" &>/dev/null || brew install "$pkg"
done
gmake --version | head -1
- name: Set up Docker Buildx
run: |
docker buildx version
@@ -42,22 +49,25 @@ jobs:
run: echo "tag=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
- name: Clone upstream sources
run: make checkouts
run: gmake checkouts
- name: Apply patches
run: make patches
run: gmake patches
- name: Build kernel
run: make kernel
run: gmake kernel
- name: Build SBC overlay
run: make overlay
run: gmake overlay
- name: Build installer and disk image
run: make installer
run: gmake installer
- name: Tag release images
run: make release TAG=${{ steps.version.outputs.tag }}
run: gmake release TAG=${{ steps.version.outputs.tag }}
- name: Run Docker Scout CVE scan
run: gmake scout
- name: Compress disk image
run: |
@@ -81,21 +91,42 @@ jobs:
REPO="${GITHUB_REPOSITORY}"
API="${GITEA_URL}/api/v1"
# Create release
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/')
RELEASE_BODY="Custom Talos Linux image for Raspberry Pi 5 / CM5 (Compute Blade)
**Talos**: ${TALOS_VER}
**Kernel**: RPi downstream ${KERNEL_VER} (CM5/RP1 support)
**Extensions**: iscsi-tools, util-linux-tools
**Overclock**: 2.6GHz (arm_freq=2600)
## 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}"
# Strip leading whitespace from heredoc-style indentation
RELEASE_BODY=$(echo "$RELEASE_BODY" | sed 's/^ //')
RELEASE_BODY_JSON=$(jq -Rs '.' <<< "$RELEASE_BODY")
RELEASE_ID=$(curl -sf -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
-d "{
\"tag_name\": \"${TAG}\",
\"name\": \"Talos RPi5 ${TAG}\",
\"body\": \"Custom Talos Linux image for Raspberry Pi 5 / CM5 (Compute Blade)\n\n**Talos version**: ${TAG}\n**Kernel**: RPi downstream (CM5/RP1 support)\n**Extensions**: iscsi-tools, util-linux-tools\n**Overclock**: 2.6GHz (arm_freq=2600)\n\n## Artifacts\n- \`metal-arm64.raw.zst\` — Raw disk image for eMMC flashing\n- \`docker.io/svrnty/talos-rpi5:${TAG}\` — Installer image for talosctl upgrade\",
\"prerelease\": true
}" \
-d "{\"tag_name\":\"${TAG}\",\"name\":\"Talos RPi5 ${TAG}\",\"body\":${RELEASE_BODY_JSON},\"prerelease\":true}" \
"${API}/repos/${REPO}/releases" | jq -r '.id')
echo "Created release ID: ${RELEASE_ID}"
# Upload disk image
curl -sf -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-F "attachment=@metal-arm64.raw.zst" \
@@ -105,4 +136,4 @@ jobs:
- name: Clean up
if: always()
run: make clean
run: gmake clean
+88 -93
View File
@@ -1,25 +1,32 @@
# Check for upstream Talos and RPi kernel updates
# Daily upstream update check with auto-build
#
# Runs on a schedule and creates a Gitea issue when new versions are found.
# This is notification-only — builds require manual tag push after verifying
# patches still apply.
# Detects new Talos OS and RPi kernel versions, applies updates,
# smoke-tests patches, and pushes a release tag (which triggers build.yaml).
# Falls back to creating a Gitea issue if patches fail to apply.
name: Check Upstream Updates
on:
schedule:
# Run weekly on Monday at 08:00 UTC
- cron: '0 8 * * 1'
- cron: '0 8 * * *' # Daily at 08:00 UTC
workflow_dispatch:
jobs:
check-updates:
check-and-build:
runs-on: [self-hosted, macos]
timeout-minutes: 10
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Need full history for tag-based build numbering
- name: Install dependencies
run: |
for pkg in make gnu-sed crane jq; do
brew list --formula "$pkg" &>/dev/null || brew install "$pkg"
done
- name: Check for upstream updates
id: check
@@ -27,95 +34,83 @@ jobs:
chmod +x scripts/check-upstream.sh
scripts/check-upstream.sh >> "$GITHUB_OUTPUT"
- name: Create issue for Talos update
if: steps.check.outputs.talos_update == 'true'
uses: actions/github-script@v7
with:
script: |
const currentVersion = '${{ steps.check.outputs.talos_current }}';
const latestVersion = '${{ steps.check.outputs.talos_latest }}';
const title = `Talos update available: ${currentVersion} → ${latestVersion}`;
- name: Run auto-update
if: steps.check.outputs.talos_update == 'true' || steps.check.outputs.rpi_update == 'true'
id: update
env:
TALOS_UPDATE: ${{ steps.check.outputs.talos_update }}
RPI_UPDATE: ${{ steps.check.outputs.rpi_update }}
LATEST_TALOS: ${{ steps.check.outputs.talos_latest }}
LATEST_RPI_TAG: ${{ steps.check.outputs.rpi_latest }}
run: |
chmod +x scripts/auto-update.sh
scripts/auto-update.sh >> "$GITHUB_OUTPUT"
// Check if an open issue already exists
const issues = await github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
labels: 'upstream-update',
});
- name: Commit and tag
if: steps.update.outputs.patch_failed != 'true' && steps.update.outputs.new_tag != ''
env:
NEW_TAG: ${{ steps.update.outputs.new_tag }}
run: |
git config user.name "Gitea Actions"
git config user.email "actions@openharbor.io"
git add -A
git commit -m "Bump upstream: ${NEW_TAG}"
git tag "$NEW_TAG"
git push origin main --tags
const existing = issues.data.find(i => i.title.includes('Talos update'));
if (existing) {
console.log(`Issue already exists: #${existing.number}`);
return;
}
- name: Create issue on patch failure
if: steps.update.outputs.patch_failed == 'true'
env:
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TALOS_CURRENT: ${{ steps.check.outputs.talos_current }}
TALOS_LATEST: ${{ steps.check.outputs.talos_latest }}
TALOS_UPDATE: ${{ steps.check.outputs.talos_update }}
RPI_CURRENT: ${{ steps.check.outputs.rpi_current }}
RPI_LATEST: ${{ steps.check.outputs.rpi_latest }}
RPI_UPDATE: ${{ steps.check.outputs.rpi_update }}
run: |
GITEA_URL="${GITHUB_SERVER_URL}"
REPO="${GITHUB_REPOSITORY}"
API="${GITEA_URL}/api/v1"
await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: title,
body: [
`## Talos Update Available`,
``,
`| | Version |`,
`|---|---|`,
`| Current | \`${currentVersion}\` |`,
`| Latest | \`${latestVersion}\` |`,
``,
`### Steps`,
`1. Update \`TALOS_VERSION\` in \`Makefile\``,
`2. Verify patches still apply: \`make checkouts patches\``,
`3. If patches fail, port them to the new version`,
`4. Push a version tag to trigger the build pipeline`,
``,
`### Links`,
`- [Talos Release Notes](https://github.com/siderolabs/talos/releases/tag/${latestVersion})`,
].join('\n'),
labels: ['upstream-update', 'talos'],
});
BODY="## Upstream update requires manual patch porting
- name: Create issue for RPi kernel update
if: steps.check.outputs.rpi_update == 'true'
uses: actions/github-script@v7
with:
script: |
const currentVersion = '${{ steps.check.outputs.rpi_current }}';
const latestVersion = '${{ steps.check.outputs.rpi_latest }}';
const title = `RPi kernel update available: ${currentVersion} → ${latestVersion}`;
Automated patch application failed. Manual intervention needed.
const issues = await github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
labels: 'upstream-update',
});
| Component | Current | Latest | Update? |
|-----------|---------|--------|---------|
| Talos | \`${TALOS_CURRENT}\` | \`${TALOS_LATEST}\` | ${TALOS_UPDATE} |
| RPi kernel | \`${RPI_CURRENT}\` | \`${RPI_LATEST}\` | ${RPI_UPDATE} |
const existing = issues.data.find(i => i.title.includes('RPi kernel update'));
if (existing) {
console.log(`Issue already exists: #${existing.number}`);
return;
}
### Steps
1. Check out this repo and run \`scripts/auto-update.sh\` to see what fails
2. Port patches to the new upstream version
3. Verify: \`gmake checkouts patches && gmake checkouts-clean\`
4. Push changes — the next scheduled run will pick them up
await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: title,
body: [
`## RPi Kernel Update Available`,
``,
`| | Version |`,
`|---|---|`,
`| Current (in pkgs patch) | \`${currentVersion}\` |`,
`| Latest stable | \`${latestVersion}\` |`,
``,
`### Steps`,
`1. Update the kernel version in the pkgs patch`,
`2. Verify the patch still applies: \`make checkouts patches\``,
`3. Test build: \`make kernel\``,
`4. Push a version tag to trigger the full build pipeline`,
``,
`### Links`,
`- [RPi Linux Releases](https://github.com/raspberrypi/linux/tags)`,
].join('\n'),
labels: ['upstream-update', 'kernel'],
});
### Links
- [Talos Releases](https://github.com/siderolabs/talos/releases)
- [RPi Linux Tags](https://github.com/raspberrypi/linux/tags)"
# Strip leading whitespace from heredoc-style indentation
BODY=$(echo "$BODY" | sed 's/^ //')
BODY_JSON=$(jq -Rs '.' <<< "$BODY")
# Check for existing open issue to avoid duplicates
EXISTING=$(curl -sf \
-H "Authorization: token ${GITEA_TOKEN}" \
"${API}/repos/${REPO}/issues?state=open&type=issues&labels=upstream-update" \
| jq -r '[.[] | select(.title | contains("manual patch"))][0].id // empty')
if [ -n "$EXISTING" ]; then
echo "Issue already exists (id: $EXISTING), skipping creation"
exit 0
fi
curl -sf -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
-d "{\"title\":\"Upstream update requires manual patch porting\",\"body\":${BODY_JSON},\"labels\":[\"upstream-update\"]}" \
"${API}/repos/${REPO}/issues"
echo "Created issue for manual patch porting"
+111 -27
View File
@@ -8,17 +8,27 @@
# make kernel # Build RPi kernel (~15-30 min on ARM64)
# make overlay # Build U-Boot + firmware + DTBs
# make installer # Build installer image + raw disk image
# make release # Tag images for release
# make release # Tag and push release images
# make clean # Remove checkouts and build artifacts
PKG_VERSION = v1.12.0
TALOS_VERSION = v1.12.3
SBCOVERLAY_VERSION = main
# Prefer GNU coreutils (macOS: brew install gnu-sed coreutils)
export PATH := /opt/homebrew/opt/gnu-sed/libexec/gnubin:$(PATH)
REGISTRY ?= docker.io
REGISTRY_USERNAME ?= svrnty
TAG ?= $(shell git describe --tags --exact-match 2>/dev/null || echo dev)
# Docker Hub image names (project-specific)
KERNEL_IMAGE = $(REGISTRY)/$(REGISTRY_USERNAME)/talos-rpi5-kernel
OVERLAY_IMAGE = $(REGISTRY)/$(REGISTRY_USERNAME)/talos-rpi5-overlay
IMAGER_IMAGE = $(REGISTRY)/$(REGISTRY_USERNAME)/talos-rpi5-imager
INSTALLER_IMAGE = $(REGISTRY)/$(REGISTRY_USERNAME)/talos-rpi5-installer
# Public image name on Docker Hub (used by talosctl upgrade)
IMAGE_NAME ?= talos-rpi5
@@ -35,11 +45,21 @@ PATCHES_DIRECTORY := $(PWD)/patches
PKGS_TAG = $(shell cd $(CHECKOUTS_DIRECTORY)/pkgs && git describe --tag --always --dirty --match v[0-9]\*)
TALOS_TAG = $(shell cd $(CHECKOUTS_DIRECTORY)/talos && git describe --tag --always --dirty --match v[0-9]\*)
SBCOVERLAY_TAG = $(shell cd $(CHECKOUTS_DIRECTORY)/sbc-raspberrypi5 && git describe --tag --always --dirty)-$(PKGS_TAG)
SBCOVERLAY_TAG = $(shell cd $(CHECKOUTS_DIRECTORY)/sbc-raspberrypi5 && git describe --tag --always)-$(PKGS_TAG)
# Build the --system-extension-image flags from the EXTENSIONS list
EXTENSION_FLAGS = $(foreach ext,$(EXTENSIONS),--system-extension-image=$(ext))
# Supply chain attestation flags (overrides upstream --provenance=false)
ATTESTATION_ARGS = --provenance=true --sbom=true
# Common imager flags for overlay and extensions
IMAGER_COMMON_FLAGS = \
--overlay-name="rpi5" \
--overlay-image="$(OVERLAY_IMAGE):$(SBCOVERLAY_TAG)" \
--overlay-option="configTxtAppend=$$(cat $(PWD)/config/config.txt.append)" \
$(EXTENSION_FLAGS)
#
# Help
#
@@ -54,6 +74,7 @@ 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:"
@@ -61,6 +82,12 @@ help:
@echo " PKG_VERSION = $(PKG_VERSION)"
@echo " REGISTRY = $(REGISTRY)"
@echo " REGISTRY_USERNAME = $(REGISTRY_USERNAME)"
@echo ""
@echo "Images:"
@echo " KERNEL_IMAGE = $(KERNEL_IMAGE)"
@echo " OVERLAY_IMAGE = $(OVERLAY_IMAGE)"
@echo " IMAGER_IMAGE = $(IMAGER_IMAGE)"
@echo " INSTALLER_IMAGE = $(INSTALLER_IMAGE)"
#
# Checkouts
@@ -79,7 +106,7 @@ checkouts-clean:
#
# Patches
#
.PHONY: patches-pkgs patches-talos patches
.PHONY: patches-pkgs patches-talos patches-overlay patches
patches-pkgs:
cd "$(CHECKOUTS_DIRECTORY)/pkgs" && \
git am "$(PATCHES_DIRECTORY)/siderolabs/pkgs/"*.patch
@@ -88,66 +115,123 @@ patches-talos:
cd "$(CHECKOUTS_DIRECTORY)/talos" && \
git am "$(PATCHES_DIRECTORY)/siderolabs/talos/"*.patch
patches: patches-pkgs patches-talos
patches-overlay:
cd "$(CHECKOUTS_DIRECTORY)/sbc-raspberrypi5" && \
git am "$(PATCHES_DIRECTORY)/talos-rpi5/sbc-raspberrypi5/"*.patch
patches: patches-pkgs patches-talos patches-overlay
#
# Kernel
# Kernel — build and push the RPi downstream kernel
#
.PHONY: kernel
kernel:
cd "$(CHECKOUTS_DIRECTORY)/pkgs" && \
$(MAKE) \
REGISTRY=$(REGISTRY) USERNAME=$(REGISTRY_USERNAME) PUSH=true \
PLATFORM=linux/arm64 \
kernel
$(MAKE) docker-kernel \
TARGET_ARGS="--tag=$(KERNEL_IMAGE):$(PKGS_TAG) --push=true $(ATTESTATION_ARGS)" \
PLATFORM=linux/arm64
#
# Overlay
# Overlay — build U-Boot + firmware + DTBs
#
# The overlay's pkg.yaml references the kernel as PKGS_PREFIX/kernel:PKGS.
# We rewrite it to point to our project-specific kernel image name.
#
.PHONY: overlay
overlay:
@echo "SBCOVERLAY_TAG = $(SBCOVERLAY_TAG)"
@sed -i.bak 's|{{ .BUILD_ARG_PKGS_PREFIX }}/kernel:{{ .BUILD_ARG_PKGS }}|$(KERNEL_IMAGE):$(PKGS_TAG)|' \
"$(CHECKOUTS_DIRECTORY)/sbc-raspberrypi5/internal/base/pkg.yaml" && \
rm -f "$(CHECKOUTS_DIRECTORY)/sbc-raspberrypi5/internal/base/pkg.yaml.bak"
cd "$(CHECKOUTS_DIRECTORY)/sbc-raspberrypi5" && \
$(MAKE) \
REGISTRY=$(REGISTRY) USERNAME=$(REGISTRY_USERNAME) IMAGE_TAG=$(SBCOVERLAY_TAG) PUSH=true \
PKGS_PREFIX=$(REGISTRY)/$(REGISTRY_USERNAME) PKGS=$(PKGS_TAG) \
INSTALLER_ARCH=arm64 PLATFORM=linux/arm64 \
sbc-raspberrypi5
$(MAKE) docker-sbc-raspberrypi5 \
TARGET_ARGS="--tag=$(OVERLAY_IMAGE):$(SBCOVERLAY_TAG) --push=true $(ATTESTATION_ARGS)" \
INSTALLER_ARCH=arm64 PLATFORM=linux/arm64
#
# Installer / Disk Image
#
# Builds the imager, installer-base, and installer images step by step,
# pushing each to our project-specific Docker Hub repos.
#
.PHONY: installer
installer:
cd "$(CHECKOUTS_DIRECTORY)/talos" && \
$(MAKE) \
REGISTRY=$(REGISTRY) USERNAME=$(REGISTRY_USERNAME) PUSH=true \
PKG_KERNEL=$(REGISTRY)/$(REGISTRY_USERNAME)/kernel:$(PKGS_TAG) \
REGISTRY=$(REGISTRY) USERNAME=$(REGISTRY_USERNAME) \
PKG_KERNEL=$(KERNEL_IMAGE):$(PKGS_TAG) \
INSTALLER_ARCH=arm64 PLATFORM=linux/arm64 \
IMAGER_ARGS="--overlay-name=rpi5 --overlay-image=$(REGISTRY)/$(REGISTRY_USERNAME)/sbc-raspberrypi5:$(SBCOVERLAY_TAG) $(EXTENSION_FLAGS)" \
kernel initramfs imager installer-base installer && \
kernel initramfs && \
$(MAKE) \
REGISTRY=$(REGISTRY) USERNAME=$(REGISTRY_USERNAME) \
PKG_KERNEL=$(KERNEL_IMAGE):$(PKGS_TAG) \
INSTALLER_ARCH=arm64 PLATFORM=linux/arm64 \
target-imager \
TARGET_ARGS="--output type=image,name=$(IMAGER_IMAGE):$(TALOS_TAG),push=true $(ATTESTATION_ARGS)" && \
$(MAKE) \
REGISTRY=$(REGISTRY) USERNAME=$(REGISTRY_USERNAME) \
PKG_KERNEL=$(KERNEL_IMAGE):$(PKGS_TAG) \
INSTALLER_ARCH=arm64 PLATFORM=linux/arm64 \
target-installer-base \
TARGET_ARGS="--output type=image,name=$(INSTALLER_IMAGE):base-$(TALOS_TAG),push=true $(ATTESTATION_ARGS)" && \
docker pull $(IMAGER_IMAGE):$(TALOS_TAG) && \
docker run --rm -t -v ./_out:/out --privileged --network=host \
$(IMAGER_IMAGE):$(TALOS_TAG) \
installer --arch arm64 \
--base-installer-image="$(INSTALLER_IMAGE):base-$(TALOS_TAG)" \
$(IMAGER_COMMON_FLAGS) && \
crane push ./_out/installer-arm64.tar $(INSTALLER_IMAGE):$(TALOS_TAG) && \
docker \
run --rm -t -v ./_out:/out -v /dev:/dev --privileged \
$(REGISTRY)/$(REGISTRY_USERNAME)/imager:$(TALOS_TAG) \
$(IMAGER_IMAGE):$(TALOS_TAG) \
metal --arch arm64 \
--base-installer-image="$(REGISTRY)/$(REGISTRY_USERNAME)/installer:$(TALOS_TAG)" \
--overlay-name="rpi5" \
--overlay-image="$(REGISTRY)/$(REGISTRY_USERNAME)/sbc-raspberrypi5:$(SBCOVERLAY_TAG)" \
--overlay-option="configTxtAppend=$$(cat $(PWD)/config/config.txt.append)" \
$(EXTENSION_FLAGS)
--base-installer-image="$(INSTALLER_IMAGE):$(TALOS_TAG)" \
$(IMAGER_COMMON_FLAGS)
#
# Release — tag images with the Git tag for stable references
#
.PHONY: release
release:
docker pull $(REGISTRY)/$(REGISTRY_USERNAME)/installer:$(TALOS_TAG) && \
docker tag $(REGISTRY)/$(REGISTRY_USERNAME)/installer:$(TALOS_TAG) $(REGISTRY)/$(REGISTRY_USERNAME)/$(IMAGE_NAME):$(TAG) && \
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)"
#
# Clean
#
.PHONY: clean
clean: checkouts-clean
rm -rf _out
rm -rf checkouts/_out
File diff suppressed because it is too large Load Diff
@@ -1,17 +1,18 @@
From 87c9e57548bc0aef15d67967a68cc9185216361d Mon Sep 17 00:00:00 2001
From 808bd99557797a8175464184202ff4df7c324a55 Mon Sep 17 00:00:00 2001
From: Patrick Hunziker <patrick@hunziker.io>
Date: Sat, 8 Nov 2025 11:31:15 +0100
Subject: [PATCH] [PATCH] Patched for Raspberry Pi 5
Subject: [PATCH] Patched for Raspberry Pi 5
---
hack/modules-arm64.txt | 343 +++++++++++++++++++----------------------
1 file changed, 160 insertions(+), 183 deletions(-)
hack/modules-arm64.txt | 367 ++++++++++++++++++-----------------------
1 file changed, 160 insertions(+), 207 deletions(-)
diff --git a/hack/modules-arm64.txt b/hack/modules-arm64.txt
index 6c48a7465..95c3ee669 100644
index 3b11b7551..95c3ee669 100644
--- a/hack/modules-arm64.txt
+++ b/hack/modules-arm64.txt
@@ -1,213 +1,190 @@
@@ -1,237 +1,190 @@
-kernel/arch/arm64/lib/xor-neon.ko
+modules.builtin.bin
+modules.builtin.modinfo
+modules.builtin.alias.bin
@@ -32,6 +33,7 @@ index 6c48a7465..95c3ee669 100644
kernel/crypto/async_tx/async_raid6_recov.ko
kernel/crypto/async_tx/async_tx.ko
-kernel/crypto/async_tx/async_xor.ko
-kernel/crypto/hkdf.ko
-kernel/crypto/xor.ko
-kernel/drivers/acpi/video.ko
-kernel/drivers/ata/ahci.ko
@@ -53,9 +55,10 @@ index 6c48a7465..95c3ee669 100644
+kernel/drivers/infiniband/hw/hns/hns-roce-hw-v2.ko
+kernel/drivers/misc/bcm2835_smi.ko
kernel/drivers/crypto/tegra/tegra-se.ko
-kernel/drivers/gpu/drm/display/drm_dp_aux_bus.ko
-kernel/drivers/gpu/drm/drm_buddy.ko
-kernel/drivers/gpu/drm/drm_exec.ko
-kernel/drivers/gpu/drm/drm_gpuvm.ko
-kernel/drivers/gpu/drm/drm_panel_backlight_quirks.ko
-kernel/drivers/gpu/drm/drm_suballoc_helper.ko
+kernel/drivers/acpi/video.ko
+kernel/drivers/gpu/drm/vc4/vc4.ko
@@ -108,12 +111,15 @@ index 6c48a7465..95c3ee669 100644
-kernel/drivers/infiniband/hw/mlx4/mlx4_ib.ko
-kernel/drivers/infiniband/hw/mlx5/mlx5_ib.ko
-kernel/drivers/infiniband/sw/rxe/rdma_rxe.ko
-kernel/drivers/irqchip/irq-bcm2712-mip.ko
-kernel/drivers/irqchip/irq-imx-mu-msi.ko
-kernel/drivers/leds/led-class-multicolor.ko
-kernel/drivers/mailbox/bcm-flexrm-mailbox.ko
-kernel/drivers/md/bcache/bcache.ko
-kernel/drivers/md/dm-bio-prison.ko
-kernel/drivers/md/dm-cache-smq.ko
-kernel/drivers/md/dm-cache.ko
-kernel/drivers/md/dm-integrity.ko
-kernel/drivers/md/dm-multipath.ko
-kernel/drivers/md/dm-raid.ko
-kernel/drivers/md/dm-round-robin.ko
@@ -133,6 +139,7 @@ index 6c48a7465..95c3ee669 100644
-kernel/drivers/mmc/host/sdhci-pci.ko
-kernel/drivers/mmc/host/sdhci-pltfm.ko
-kernel/drivers/mmc/host/sdhci-tegra.ko
-kernel/drivers/mmc/host/sdhci-uhs2.ko
-kernel/drivers/mmc/host/sdhci-xenon-driver.ko
+kernel/drivers/nvme/host/nvme-rdma.ko
+kernel/drivers/nvme/target/nvme-loop.ko
@@ -189,12 +196,16 @@ index 6c48a7465..95c3ee669 100644
-kernel/drivers/net/ethernet/intel/i40e/i40e.ko
-kernel/drivers/net/ethernet/intel/iavf/iavf.ko
-kernel/drivers/net/ethernet/intel/ice/ice.ko
-kernel/drivers/net/ethernet/intel/idpf/idpf.ko
-kernel/drivers/net/ethernet/intel/igb/igb.ko
-kernel/drivers/net/ethernet/intel/igbvf/igbvf.ko
-kernel/drivers/net/ethernet/intel/igc/igc.ko
-kernel/drivers/net/ethernet/intel/ixgbe/ixgbe.ko
-kernel/drivers/net/ethernet/intel/ixgbevf/ixgbevf.ko
-kernel/drivers/net/ethernet/intel/libeth/libeth_xdp.ko
-kernel/drivers/net/ethernet/intel/libeth/libeth.ko
-kernel/drivers/net/ethernet/intel/libie/libie_adminq.ko
-kernel/drivers/net/ethernet/intel/libie/libie_fwlog.ko
-kernel/drivers/net/ethernet/intel/libie/libie.ko
-kernel/drivers/net/ethernet/marvell/sky2.ko
-kernel/drivers/net/ethernet/mellanox/mlx4/mlx4_core.ko
@@ -220,6 +231,7 @@ index 6c48a7465..95c3ee669 100644
-kernel/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.ko
-kernel/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.ko
-kernel/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.ko
-kernel/drivers/net/ethernet/stmicro/stmmac/dwmac-renesas-gbeth.ko
-kernel/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.ko
-kernel/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.ko
-kernel/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.ko
@@ -315,18 +327,30 @@ index 6c48a7465..95c3ee669 100644
-kernel/drivers/usb/serial/cp210x.ko
-kernel/drivers/usb/serial/ftdi_sio.ko
-kernel/drivers/usb/serial/pl2303.ko
-kernel/drivers/vdpa/mlx5/mlx5_vdpa.ko
-kernel/drivers/vdpa/octeon_ep/octep_vdpa.ko
-kernel/drivers/vdpa/solidrun/snet_vdpa.ko
-kernel/drivers/vdpa/vdpa_sim/vdpa_sim_blk.ko
-kernel/drivers/vdpa/vdpa_sim/vdpa_sim_net.ko
-kernel/drivers/vdpa/vdpa_sim/vdpa_sim.ko
-kernel/drivers/vdpa/vdpa_user/vduse.ko
-kernel/drivers/vdpa/vdpa.ko
-kernel/drivers/vdpa/virtio_pci/vp_vdpa.ko
-kernel/drivers/vfio/pci/vfio-pci-core.ko
+kernel/drivers/thunderbolt/thunderbolt.ko
kernel/drivers/vfio/pci/vfio-pci.ko
-kernel/drivers/vfio/vfio_iommu_type1.ko
+kernel/drivers/vfio/pci/vfio-pci-core.ko
kernel/drivers/vfio/vfio.ko
-kernel/drivers/vhost/vhost_vdpa.ko
-kernel/drivers/vhost/vringh.ko
-kernel/drivers/virtio/virtio_balloon.ko
-kernel/drivers/virtio/virtio_input.ko
-kernel/drivers/virtio/virtio_mmio.ko
-kernel/drivers/virtio/virtio_pci_legacy_dev.ko
-kernel/drivers/virtio/virtio_pci_modern_dev.ko
-kernel/drivers/virtio/virtio_pci.ko
-kernel/drivers/virtio/virtio_vdpa.ko
+kernel/drivers/vfio/vfio_iommu_type1.ko
+kernel/drivers/usb/class/cdc-wdm.ko
+kernel/drivers/usb/serial/usb_wwan.ko
@@ -0,0 +1,38 @@
From 69f14c84e9e458dcff24905145cac8557c0e2965 Mon Sep 17 00:00:00 2001
From: Mathias Beaulieu-Duncan <mathias@svrnty.io>
Date: Fri, 13 Feb 2026 15:25:26 -0500
Subject: [PATCH] Bump Go toolchain to 1.24.13 to fix stdlib CVEs
---
go.work | 4 +++-
installers/rpi5/src/go.mod | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/go.work b/go.work
index f4dafe7..798ea43 100644
--- a/go.work
+++ b/go.work
@@ -1,3 +1,5 @@
-go 1.24.0
+go 1.24.13
+
+toolchain go1.24.13
use ./installers/rpi5/src
diff --git a/installers/rpi5/src/go.mod b/installers/rpi5/src/go.mod
index 50b72d5..af5f5f8 100644
--- a/installers/rpi5/src/go.mod
+++ b/installers/rpi5/src/go.mod
@@ -1,6 +1,8 @@
module rpi_generic
-go 1.24.0
+go 1.24.13
+
+toolchain go1.24.13
require (
github.com/siderolabs/go-copy v0.1.0
--
2.50.1 (Apple Git-155)
+107
View File
@@ -0,0 +1,107 @@
#!/usr/bin/env bash
# Auto-update upstream versions, verify patches, and generate a release tag
#
# Expects environment variables from check-upstream.sh:
# TALOS_UPDATE, RPI_UPDATE, LATEST_TALOS, LATEST_RPI_TAG
#
# Outputs (for GitHub Actions):
# patch_failed=true — if patches fail to apply (caller should create issue)
# new_tag=<tag> — the computed release tag (e.g. v1.12.3-k6.12.47-1)
#
# Usage:
# TALOS_UPDATE=true LATEST_TALOS=v1.13.0 ./scripts/auto-update.sh >> "$GITHUB_OUTPUT"
set -euo pipefail
TALOS_UPDATE=${TALOS_UPDATE:-false}
RPI_UPDATE=${RPI_UPDATE:-false}
LATEST_TALOS=${LATEST_TALOS:-}
LATEST_RPI_TAG=${LATEST_RPI_TAG:-}
MAKEFILE="Makefile"
PATCH_FILE="patches/siderolabs/pkgs/0001-Patched-for-Raspberry-Pi-5.patch"
# Helper: extract kernel semver (e.g. 6.12.47) from the RPi repo Makefile
get_kernel_version() {
local tag="$1"
curl -sf "https://raw.githubusercontent.com/raspberrypi/linux/${tag}/Makefile" \
| awk '
/^VERSION/ { version=$3 }
/^PATCHLEVEL/ { patchlevel=$3 }
/^SUBLEVEL/ { sublevel=$3 }
END { print version "." patchlevel "." sublevel }
'
}
# ── RPi kernel update ───────────────────────────────────────────────
if [ "$RPI_UPDATE" = "true" ] && [ -n "$LATEST_RPI_TAG" ]; then
echo "Updating RPi kernel to $LATEST_RPI_TAG ..." >&2
# Download tarball and compute checksums
TARBALL_URL="https://github.com/raspberrypi/linux/archive/refs/tags/${LATEST_RPI_TAG}.tar.gz"
TMP=$(mktemp)
curl -sL "$TARBALL_URL" -o "$TMP"
NEW_SHA256=$(shasum -a 256 "$TMP" | awk '{print $1}')
NEW_SHA512=$(shasum -a 512 "$TMP" | awk '{print $1}')
rm -f "$TMP"
echo " SHA256: $NEW_SHA256" >&2
echo " SHA512: $NEW_SHA512" >&2
# Get actual kernel version for the config header
KERNEL_VERSION=$(get_kernel_version "$LATEST_RPI_TAG")
echo " Kernel version: $KERNEL_VERSION" >&2
# Update patch file
sed -i "s/+ linux_version: .*/+ linux_version: ${LATEST_RPI_TAG}/" "$PATCH_FILE"
sed -i "s/+ linux_sha256: .*/+ linux_sha256: ${NEW_SHA256}/" "$PATCH_FILE"
sed -i "s/+ linux_sha512: .*/+ linux_sha512: ${NEW_SHA512}/" "$PATCH_FILE"
sed -i "s|+# Linux/arm64 .* Kernel Configuration|+# Linux/arm64 ${KERNEL_VERSION} Kernel Configuration|" "$PATCH_FILE"
fi
# ── Talos update ────────────────────────────────────────────────────
if [ "$TALOS_UPDATE" = "true" ] && [ -n "$LATEST_TALOS" ]; then
echo "Updating Talos to $LATEST_TALOS ..." >&2
# Update TALOS_VERSION in Makefile
sed -i "s/^TALOS_VERSION = .*/TALOS_VERSION = ${LATEST_TALOS}/" "$MAKEFILE"
# Derive matching PKG_VERSION (same major.minor as Talos)
PKG_MINOR=$(echo "$LATEST_TALOS" | sed -E 's/^(v[0-9]+\.[0-9]+)\..*/\1/')
LATEST_PKG=$(curl -sf "https://api.github.com/repos/siderolabs/pkgs/tags?per_page=20" \
| jq -r "[.[] | select(.name | startswith(\"${PKG_MINOR}\"))][0].name")
if [ -n "$LATEST_PKG" ] && [ "$LATEST_PKG" != "null" ]; then
echo " Updating PKG_VERSION to $LATEST_PKG" >&2
sed -i "s/^PKG_VERSION = .*/PKG_VERSION = ${LATEST_PKG}/" "$MAKEFILE"
else
echo " WARNING: No matching pkgs tag for $PKG_MINOR — keeping current PKG_VERSION" >&2
fi
fi
# ── Smoke test — verify patches apply ───────────────────────────────
echo "Running patch smoke test ..." >&2
if ! gmake checkouts patches; then
echo "Patches failed to apply!" >&2
gmake checkouts-clean 2>/dev/null || true
echo "patch_failed=true"
exit 0
fi
gmake checkouts-clean
# ── Generate tag ────────────────────────────────────────────────────
TALOS_VER=$(grep '^TALOS_VERSION' "$MAKEFILE" | awk '{print $NF}')
RPI_TAG=$(grep '+ linux_version:' "$PATCH_FILE" | awk '{print $NF}')
KERNEL_VER=$(get_kernel_version "$RPI_TAG")
# Find next build number for this component combination
TAG_PREFIX="${TALOS_VER}-k${KERNEL_VER}"
LAST_BUILD=$(git tag -l "${TAG_PREFIX}-*" \
| sed "s|${TAG_PREFIX}-||" \
| sort -n \
| tail -1)
NEXT_BUILD=$(( ${LAST_BUILD:-0} + 1 ))
NEW_TAG="${TAG_PREFIX}-${NEXT_BUILD}"
echo "Generated tag: $NEW_TAG" >&2
echo "new_tag=$NEW_TAG"
+32 -29
View File
@@ -1,54 +1,57 @@
#!/usr/bin/env bash
# Check for upstream Talos and RPi kernel updates
#
# Compares current versions in Makefile against the latest GitHub releases.
# Outputs GitHub Actions-compatible variables for use in CI workflows.
# Compares current versions (from Makefile + pkgs patch) against the
# latest GitHub releases/tags. Outputs GitHub Actions-compatible variables.
#
# Usage:
# ./scripts/check-upstream.sh # Print results
# ./scripts/check-upstream.sh # Print results to stdout/stderr
# ./scripts/check-upstream.sh >> "$GITHUB_OUTPUT" # For CI
set -euo pipefail
MAKEFILE="${MAKEFILE:-Makefile}"
PATCH_FILE="${PATCH_FILE:-patches/siderolabs/pkgs/0001-Patched-for-Raspberry-Pi-5.patch}"
# Extract current versions from Makefile
CURRENT_TALOS=$(grep '^TALOS_VERSION' "$MAKEFILE" | head -1 | awk '{print $NF}')
CURRENT_PKG=$(grep '^PKG_VERSION' "$MAKEFILE" | head -1 | awk '{print $NF}')
# ── Current versions ────────────────────────────────────────────────
CURRENT_TALOS=$(grep '^TALOS_VERSION' "$MAKEFILE" | awk '{print $NF}')
CURRENT_RPI_TAG=$(grep '+ linux_version:' "$PATCH_FILE" | awk '{print $NF}')
echo "Current Talos version: $CURRENT_TALOS"
echo "Current PKG version: $CURRENT_PKG"
echo "Current Talos version: $CURRENT_TALOS" >&2
echo "Current RPi kernel tag: $CURRENT_RPI_TAG" >&2
# Check latest Talos stable release
# ── Latest versions from GitHub API ─────────────────────────────────
LATEST_TALOS=$(curl -sf "https://api.github.com/repos/siderolabs/talos/releases/latest" \
| grep '"tag_name"' | sed -E 's/.*"tag_name": *"([^"]+)".*/\1/')
| jq -r '.tag_name')
echo "Latest Talos release: $LATEST_TALOS"
LATEST_RPI_TAG=$(curl -sf "https://api.github.com/repos/raspberrypi/linux/tags?per_page=20" \
| jq -r '[.[] | select(.name | startswith("stable_"))][0].name')
# Check latest RPi kernel stable tag (format: stable_YYYYMMDD)
LATEST_RPI_KERNEL=$(curl -sf "https://api.github.com/repos/raspberrypi/linux/tags?per_page=10" \
| grep '"name"' | grep 'stable_' | head -1 | sed -E 's/.*"name": *"([^"]+)".*/\1/')
echo "Latest Talos release: $LATEST_TALOS" >&2
echo "Latest RPi kernel tag: $LATEST_RPI_TAG" >&2
echo "Latest RPi kernel tag: $LATEST_RPI_KERNEL"
# Output for GitHub Actions
echo "talos_current=$CURRENT_TALOS"
echo "talos_latest=$LATEST_TALOS"
# ── Determine what needs updating ───────────────────────────────────
TALOS_UPDATE=false
RPI_UPDATE=false
if [ "$CURRENT_TALOS" != "$LATEST_TALOS" ]; then
echo "talos_update=true"
TALOS_UPDATE=true
echo ">> Talos update available: $CURRENT_TALOS -> $LATEST_TALOS" >&2
else
echo "talos_update=false"
echo ">> Talos is up to date" >&2
fi
# For RPi kernel, we output what we found — the actual version tracking
# depends on the pkgs patch content which references a specific kernel tag
echo "rpi_current=check-patch"
echo "rpi_latest=$LATEST_RPI_KERNEL"
if [ "$CURRENT_RPI_TAG" != "$LATEST_RPI_TAG" ]; then
RPI_UPDATE=true
echo ">> RPi kernel update available: $CURRENT_RPI_TAG -> $LATEST_RPI_TAG" >&2
else
echo ">> RPi kernel is up to date" >&2
fi
# We always flag RPi kernel for review since we can't easily parse the
# patch to extract the exact pinned version
echo "rpi_update=true"
echo ">> RPi kernel latest stable: $LATEST_RPI_KERNEL (review patch manually)" >&2
# ── Output for GitHub Actions ───────────────────────────────────────
echo "talos_current=$CURRENT_TALOS"
echo "talos_latest=$LATEST_TALOS"
echo "talos_update=$TALOS_UPDATE"
echo "rpi_current=$CURRENT_RPI_TAG"
echo "rpi_latest=$LATEST_RPI_TAG"
echo "rpi_update=$RPI_UPDATE"