fix: use kernel-built DTBs for RPi SD card driver probe
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
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 sdhci-iproc driver (RPi 4 SD card controller) probes via Device Tree matching. Using DTBs from the firmware repo instead of the kernel build caused a mismatch — the driver silently failed to probe, resulting in zero block devices after boot. Changes: - Use DTBs from custom-kernel-arm64/dtbs/ (matches the kernel) - Firmware blobs (start4.elf, fixup4.dat) still from firmware repo - Also includes prior fix for LABEL= resolution in persistent mount Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -34,6 +34,9 @@ IMG_SIZE_MB="${IMG_SIZE_MB:-2048}" # 2 GB default
|
||||
KERNEL="${CACHE_DIR}/custom-kernel-arm64/Image"
|
||||
INITRAMFS="${ROOTFS_DIR}/kubesolo-os.gz"
|
||||
RPI_FIRMWARE_DIR="${CACHE_DIR}/rpi-firmware"
|
||||
# DTBs MUST come from the kernel build (not firmware repo) to match the kernel.
|
||||
# A DTB mismatch causes sdhci-iproc to silently fail — zero block devices.
|
||||
KERNEL_DTBS_DIR="${CACHE_DIR}/custom-kernel-arm64/dtbs"
|
||||
|
||||
echo "==> Creating ${IMG_SIZE_MB}MB Raspberry Pi disk image..."
|
||||
|
||||
@@ -178,14 +181,15 @@ CFGTXT
|
||||
# Copy initramfs
|
||||
cp "$INITRAMFS" "$MNT/kubesolo-os.gz"
|
||||
|
||||
# Copy DTB overlays
|
||||
if [ -d "$RPI_FIRMWARE_DIR/overlays" ]; then
|
||||
cp -r "$RPI_FIRMWARE_DIR/overlays" "$MNT/"
|
||||
# Copy DTBs from kernel build (MUST match kernel to avoid driver probe failures)
|
||||
if ls "$KERNEL_DTBS_DIR"/bcm27*.dtb 1>/dev/null 2>&1; then
|
||||
cp "$KERNEL_DTBS_DIR"/bcm27*.dtb "$MNT/"
|
||||
fi
|
||||
|
||||
# Copy base DTBs (bcm2710-*, bcm2711-*, bcm2712-*)
|
||||
if ls "$RPI_FIRMWARE_DIR"/bcm27*.dtb 1>/dev/null 2>&1; then
|
||||
cp "$RPI_FIRMWARE_DIR"/bcm27*.dtb "$MNT/"
|
||||
# Copy overlays — prefer kernel-built, fall back to firmware repo
|
||||
if [ -d "$KERNEL_DTBS_DIR/overlays" ]; then
|
||||
cp -r "$KERNEL_DTBS_DIR/overlays" "$MNT/"
|
||||
elif [ -d "$RPI_FIRMWARE_DIR/overlays" ]; then
|
||||
cp -r "$RPI_FIRMWARE_DIR/overlays" "$MNT/"
|
||||
fi
|
||||
|
||||
# Write version marker
|
||||
|
||||
Reference in New Issue
Block a user