Epic: #113 · Milestone: MC2 — Pi 5 bring-up
Why
~7,000 duplicated lines with divergent register maps: devicetree.home ×2, gic400.home ×2, bcm2711.home in two places, bcm2836/2837.home 15-line stubs, rpi/boot.home (828) vs arch/arm64/boot.home (174), mailbox ×3 (rpi/mailbox.home, mailbox_vc6.home, mailbox_vc7.home), platform.home that knows Pi 1–4 but not 2712. None of it has compiled; carrying three copies through the aarch64 ratchet triples the work.
Proposed layout
kernel/src/arch/arm64/ # arch-only: boot.s, boot.home, mmu, exceptions, gic (v3; v2 only if Pi 4 kept), timer, smp, devicetree, arm64.home
kernel/src/platform/bcm2712/ # SoC: mailbox (vc7), power/clock/thermal, sdhci, pcie host, hvs/hdmi/cec, hevc, dma
kernel/src/platform/rp1/ # southbridge: rp1.home (BAR/IRQ), gpio, uart (GPIO header uarts), i2c, spi, i2s, pwm, xhci glue, gem eth
kernel/src/platform/virt/ # QEMU virt: pl011, gicv3, virtio glue
kernel/src/platform/legacy-pi/ # (optional, frozen) bcm2711/2835 material if Pi 4 remains a stated target; otherwise deletedTasks
- Decide Pi 4 fate in this issue (recommendation: drop Pi 3/4 from the plan; the media center is a Pi 5 product, and Pi 4 lacks the HEVC 4K path and RP1). Record in the ADR.
- Move/merge files per layout; one mailbox, one FDT parser, one GIC; delete
rpi3.home,rpi3_minimal.home,pi3-minimalbuild profile,bcm2836/2837. - Update
IMPLEMENTATION_STATUS.mdgenerator paths; keep parse-rate at 100 %. - Freeze
kernel/src/iot/,industrial/per D5 — untouched.
Acceptance
Parse-rate 100 % after the move; no file in kernel/src duplicates another's responsibility (checked by a short static-checks/pi-layout.sh listing allowed dirs).
Size: M · Depends on: — (can start now) · Blocks: #61, MC3