revise: by-the-book Rockchip user-area boot approach (fixes bootloader) #4

Merged
jez merged 1 commit from by-the-book-emmc-boot into main 2026-06-03 00:49:04 +00:00
Owner

Complete rewrite of docs/emmc-multiboot.md based on experimental findings and Rockchip documentation.

Why the change

The first approach (eMMC hardware boot partition) failed because SPL looks for u-boot.itb at sector 16384 of the same device — but the boot partition is only 4MB (8192 sectors), so sector 16384 is out of bounds. The BootROM loaded idbloader, SPL couldn't continue.

What's new

  • User-area boot: PARTITION_CONFIG = 0x78, not 0x48
  • Bootloader at Rockchip-standard offsets: idbloader at sector 64, u-boot.itb at sector 16384 of /dev/mmcblk0 (user data area)
  • Partition 1 starts at sector 32768 (16MB alignment) — leaves the entire 0-32767 gap for the bootloader chain
  • Verification steps: hexdump to confirm "RKNS" magic at sector 64, PARTITION_CONFIG readback
  • Experimental findings documented: explains exactly why the hardware boot partition approach can't work

Key sources

Complete rewrite of `docs/emmc-multiboot.md` based on experimental findings and Rockchip documentation. ### Why the change The first approach (eMMC hardware boot partition) failed because SPL looks for u-boot.itb at sector 16384 of the **same device** — but the boot partition is only 4MB (8192 sectors), so sector 16384 is out of bounds. The BootROM loaded idbloader, SPL couldn't continue. ### What's new - **User-area boot**: PARTITION_CONFIG = 0x78, not 0x48 - **Bootloader at Rockchip-standard offsets**: idbloader at sector 64, u-boot.itb at sector 16384 of `/dev/mmcblk0` (user data area) - **Partition 1 starts at sector 32768** (16MB alignment) — leaves the entire 0-32767 gap for the bootloader chain - **Verification steps**: hexdump to confirm "RKNS" magic at sector 64, PARTITION_CONFIG readback - **Experimental findings documented**: explains exactly why the hardware boot partition approach can't work ### Key sources - <https://opensource.rock-chips.com/wiki_Boot_option> — Rockchip standard offsets - <https://wiki.pine64.org/wiki/RK3399_boot_sequence> — BootROM search pattern at sectors 64+1024n - <https://wiki.gentoo.org/wiki/User:Brendlefly62/Rockchip_RK3588S_Rock_5c/Build-Install-U-Boot> — confirms 32768 start sector
BarnacleBoy added 1 commit 2026-06-03 00:34:29 +00:00
- Switch from eMMC hardware boot partition (0x48) to user area (0x78)
- p1 starts at sector 32768 to leave room for bootloader in GPT gap
- Write idbloader at sector 64, u-boot.itb at sector 16384
- Add experimental findings explaining why first approach failed
- Add verification steps (hexdump RKNS check, PARTITION_CONFIG check)
- All references from actual docs (Rockchip wiki, Gentoo, Khadas, PINE64)
jez merged commit 86bc15579d into main 2026-06-03 00:49:04 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: KrustyPlanet/cyberdeck#4
No description provided.