diff --git a/RESEARCH.md b/RESEARCH.md index 2995847..25ef674 100644 --- a/RESEARCH.md +++ b/RESEARCH.md @@ -608,3 +608,20 @@ post-relocation one): Read: last paint reached = code survived through that checkpoint; the crash/hang is in the next window. Success = banner on black. + +## Round 14 — all green decoded: U-Boot's 4K-alignment requirement + +Reboot with `fc48d83b…`: **all green, no bands** — U-Boot hung before +`board_early_init_f`. Root cause found in start.S: with +CONFIG_POSITION_INDEPENDENT, U-Boot verifies `adr _start` & 0xfff == 0 +(it uses ADRP+ADD with lo12 relocations during the PIE fixup) and +otherwise loops in `wfi` forever — a silent hang, no exception. Our +wrapper pushed U-Boot's entry to load_base+0xB4: misaligned by +construction. + +### Fix (payload `faee130f…`) + +`build-uboot-payload.sh` now pads the wrapper so U-Boot starts at the +next 4 KiB boundary (0x1000) inside the 2 MiB-aligned image; wrapper +tail branch patched accordingly (0x140003d4 → 0x1000, verified by +disassembly). Keep this invariant for every future layout change. diff --git a/build-uboot-payload.sh b/build-uboot-payload.sh index 43bcbc0..e11493f 100755 --- a/build-uboot-payload.sh +++ b/build-uboot-payload.sh @@ -40,8 +40,12 @@ hdr = bytearray(64) hdr[0:4] = struct.pack('> 2) | 0x14000000) # code0: b +0x40 struct.pack_into('