07-09-2021, 08:45 AM
(07-08-2021, 05:23 PM)James Good Wrote: Messing with the partition layout is a bit dangerous, because the start of the eMMC/SD card is layed out in a specific way.
The RK3399 SoC will read it's idbloader.img from byte 32768 (from the start of the device, sector 0x40).
After that is the u-boot at the magic offset byte 8388608 (sector 0x4000).
That's the reason why partitions are starting rather far into the device on the stock images, to make space for the bootloader and SPL.
You can find more information about the boot process in this wiki article from Rockchip:
http://opensource.rock-chips.com/wiki_Boot_option
In short: Don't touch the first ~16-32 MiB of the device and you'll be fine.
U-boot is restricted to just 16MiB. In practice it uses much less than that, but to be safe - make sure the very first actual partition starts at exactly 16MiB mark (32768 count of 512 byte sectors) and you'll be perfectly fine. No need to go all the way to 32MiB.
This message was created with 100% recycled electrons