Replace the GRUB/efi-raw + prepare-rpi-image.sh post-processing approach with a declarative SD image: - rpi4-image.scm: MBR image with FAT "RPI-BOOT" (start4.elf, u-boot.bin, config.txt, overlays, DTB) and ext4 "Guix" root. - rpi4.scm: u-boot-bootloader variant with no raw-disk installer, so reconfigure only rewrites extlinux.conf; serial console on ttyS1; linux-rpi4 kernel; root account with uid 0. - packages/rpi4-linux.scm: nonguix linux + CLK_BCM2835, SD (sdhci-iproc), GENET built in. - packages/u-boot-rpi-arm64-guix-router.scm + rpi-env-layout.patch: move load addresses so a 36 MB distro kernel doesn't overlap FDT/initrd. - run-qemu-rpi4.sh: direct-kernel QEMU raspi4b smoke test. - Docs: PITFALLS #16-21, README boot flow; Phase 1 confirmed on hardware. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
28 lines
812 B
Diff
28 lines
812 B
Diff
--- a/board/raspberrypi/rpi/rpi.env
|
|
+++ b/board/raspberrypi/rpi/rpi.env
|
|
@@ -68,10 +68,19 @@
|
|
fdt_high=ffffffff
|
|
initrd_high=ffffffff
|
|
#endif
|
|
-kernel_addr_r=0x00080000
|
|
-scriptaddr=0x02400000
|
|
-pxefile_addr_r=0x02500000
|
|
-fdt_addr_r=0x02600000
|
|
-ramdisk_addr_r=0x02700000
|
|
+/*
|
|
+ * Guix router: generic distro kernels are far bigger than 36M once booti
|
|
+ * relocates them to the 2M boundary (and adds BSS), so the stock layout puts
|
|
+ * the FDT and initrd inside the kernel's footprint. Keep the kernel alone in
|
|
+ * the low 128M and stack everything else above it.
|
|
+ */
|
|
+kernel_addr_r=0x00200000
|
|
+scriptaddr=0x08000000
|
|
+pxefile_addr_r=0x08100000
|
|
+fdt_addr_r=0x08200000
|
|
+fdtoverlay_addr_r=0x08300000
|
|
+kernel_comp_addr_r=0x0a000000
|
|
+kernel_comp_size=0x06000000
|
|
+ramdisk_addr_r=0x10000000
|
|
|
|
boot_targets=mmc usb pxe dhcp
|