fix: add config.txt and DTBs to RPi boot control partition
Some checks failed
CI / Go Tests (push) Has been cancelled
CI / Build Go Binaries (amd64, linux, linux-amd64) (push) Has been cancelled
CI / Build Go Binaries (arm64, linux, linux-arm64) (push) Has been cancelled
CI / Shellcheck (push) Has been cancelled
Release / Test (push) Has been cancelled
Release / Build Binaries (amd64, linux, linux-amd64) (push) Has been cancelled
Release / Build Binaries (arm64, linux, linux-arm64) (push) Has been cancelled
Release / Build ISO (amd64) (push) Has been cancelled
Release / Create Release (push) Has been cancelled

The Raspberry Pi firmware reads config.txt from partition 1 BEFORE
processing autoboot.txt. Without arm_64bit=1 on the boot control
partition, the firmware defaults to 32-bit mode and shows only a
rainbow square. Add minimal config.txt, device tree blobs, and
overlays to partition 1 so the firmware can initialize correctly
before redirecting to the A/B boot partitions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-12 18:29:28 -06:00
parent 65dcddb47e
commit 2ba816bf6e

View File

@@ -161,6 +161,15 @@ boot_partition=2
boot_partition=3
AUTOBOOT
# Minimal config.txt on partition 1 — firmware reads this BEFORE autoboot.txt
# to determine arm_64bit mode and GPU settings. Without arm_64bit=1 here,
# the firmware defaults to 32-bit and can't load our 64-bit kernel.
cat > "$MNT_CTL/config.txt" << 'CFGTXT'
arm_64bit=1
enable_uart=1
gpu_mem=16
CFGTXT
# Copy firmware blobs — REQUIRED on partition 1 for EEPROM to boot
if ls "$RPI_FIRMWARE_DIR"/start*.elf 1>/dev/null 2>&1; then
cp "$RPI_FIRMWARE_DIR"/start*.elf "$MNT_CTL/"
@@ -172,6 +181,14 @@ if [ -f "$RPI_FIRMWARE_DIR/bootcode.bin" ]; then
cp "$RPI_FIRMWARE_DIR/bootcode.bin" "$MNT_CTL/"
fi
# Copy DTBs to partition 1 — firmware may need them before redirecting
if ls "$RPI_FIRMWARE_DIR"/bcm27*.dtb 1>/dev/null 2>&1; then
cp "$RPI_FIRMWARE_DIR"/bcm27*.dtb "$MNT_CTL/"
fi
if [ -d "$RPI_FIRMWARE_DIR/overlays" ]; then
cp -r "$RPI_FIRMWARE_DIR/overlays" "$MNT_CTL/"
fi
# --- Helper: populate a boot partition ---
populate_boot_partition() {
local MNT="$1"