Flashing bootloader to /dev/mmcblk0boot0

Hi
I’d like to use /dev/mmcblk0boot0 to store the bootloader, does anyone know what offsets I’d need to flash the idbloader/u-boot/trust files?

This is exposed in the linux kernel via [1]

[1] https://www.kernel.org/doc/Documentation/mmc/mmc-dev-parts.txt

Hi,

You can just use it as how you use it on other platform. It’s an eMMC feature, not ROCK Pi 4. Basically configure the boot partition as the default partition with mmc-utils.

eMMC devices are partitioned into several hardware partitions but only one can be selected at a time:

  • BOOT - one or more small partitions intended for boot firmware (eMMC 4.3 spec requires 2 boot and 1 user partition)
  • RPMB - Replay Protected Memory Block - intended to store secure data (ie DRM content protection keys) (eMMC 4.4 spec adds the requirement of an RPMB partition)
  • USER - a large partition intended for general storage

Notes:

  • BOOT and RPMB partitions are configured as SLC while USER can be SLC or MLC.
  • Read / Write commands sent to an eMMC do not directly address the hardware partitions but instead a special command is used to select a partition.
  • A Card Specific Data (CSD) register (EXT_CSD[179]) is used to configure what partition is selected at power-up. This can be configured within Linux via the mmc-utils application, or within U-Boot via the mmc partconf command (see below).
  • It is up to the user to decide if and how to use each of the hardware partitions.