Hello,
Thank you for the answer.
And is there a yocto recipe, that creates the bootable eMMC image?
(seems like imx-boot or virtual/bootloader targets are creating imx-boot-imx8mmevk-sd.bin-flash_evk file in deploy folder)
The second question remains:
How to flash a bootloader image into eMMC when booted from the SDCard, and not using the UUU tool?
And I have an answer for this too:
the bootable image imx-boot-imx8mmevk-sd.bin-flash_evk has to be located at /dev/mmcblkXboot0 with offset of 0x8400 (33K) as stated in IMX8MMRM Table 6-25.
The command sequence is, assuming that the board has booted from the SDCard:
echo 0 > /sys/block/mmcblk2boot0/force_ro
dd if=imx-boot-imx8mmevk-sd.bin-flash_evk of /dev/mmcblk2boot0 bs=1K seek=33
echo 1 > /sys/block/mmcblk2boot0/force_ro
-Pauli