Epic: #113 · Milestone: MC1 — Toolchain: aarch64
Why
scripts/build.sh rpi5 (cmd_rpi5, L477–568) assembles boot.s from the compiler repo, then hits an unconditional exit 1 ("no entry point yet"); the objcopy/firmware staging after it is unreachable. cmd_all's compile_module() is printf 'OK (pending compiler)' and its "Linking Kernel" step links nothing; unified arm64 copies boot.s and prints "configured". The Pi CI workflow calls these and swallows the failures with || true. Also: the staging expects start4.elf/fixup4.dat, which are Pi 4 files — the Pi 5 bootloader lives in EEPROM and loads the kernel image directly; only the DTB (bcm2712-rpi-5-b.dtb, plus the bcm2712d0 variant) and config.txt are needed.
Tasks
cmd_rpi5: compile the Pi entry (kernel/src/arch/arm64/boot.homechain, see #57) with"$HOME_COMPILER" build --kernel --target=aarch64-freestandingfor every file in a newscripts/pi5-file-set.txt; assemblekernel/src/arch/arm64/boot.swithzig cc -target aarch64-freestanding; link withkernel/linker-rpi5.ld(load address 0x80000,.text.bootfirst);zig objcopy -O binary→build/rpi5/boot/kernel_2712.img.- Stage
config.txt(from #57's corrected version), DTBs fetched byscripts/pi/fetch-firmware-dtb.sh(pinned firmware tag, checksum), and anoverlays/dir if needed. --profile=tvselects the media-center file set and initramfs contents;--profile=serialbuilds the bring-up kernel.- Delete the theatre: remove
compile_modulefakery incmd_all, makeunified arm64callcmd_rpi5, and make every failure exit nonzero naming the blocker (S1 discipline). - Toolchain check: prefer
zigfor assembler/linker/objcopy (already the x86 pattern) so noaarch64-linux-gnu-*binutils are required; documentbrew install zig qemu.
Acceptance
./scripts/build.sh rpi5 --profile=serial produces build/rpi5/boot/{kernel_2712.img,config.txt,bcm2712-rpi-5-b.dtb} from a clean checkout on macOS and on the x86 CI runner; build.sh all no longer prints success without compiling.