All checks were successful
Build Talos CM5 Image / build (push) Successful in 1h4m48s
Force GRUB instead of sd-boot on arm64 and pass --no-nvram to grub-install, working around the SetVariableRT firmware limitation that prevents in-place upgrades on RPi5/CM5 hardware. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
48 lines
1.7 KiB
Diff
48 lines
1.7 KiB
Diff
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)
|
|
|