06-03-2020, 02:31 AM
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.
Otherwise, you'll need to dd the bootloader and idbloader back onto the partition after your actions:
(as root, these files are probably in /boot)
Tobias
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.
Otherwise, you'll need to dd the bootloader and idbloader back onto the partition after your actions:
Code:
dd if=idbloader.img of=/dev/sdb seek=64
dd if=u-boot.itb of=/dev/sdb seek=16384
Tobias