I haven’t quite got to the bottom of this, but it appears the default community RPi Yocto integration fails on the CM4 because the eMMC device number is 1, rather than 0. On boot:
U-Boot> boot
Card did not respond to voltage select! : -110
** Booting bootflow 'mmc@7e340000.bootdev.part_1' with script
Working FDT set to 2eff6200
Card did not respond to voltage select! : -110
Card did not respond to voltage select! : -110
** Bad device specification mmc 0 **
Couldn't find partition mmc 0:2
Can't set block device
Bad Linux ARM64 Image magic!
Boot failed (err=-14)
If I hand-modify mender_setup
from the U-Boot console so that it sets mender_uboot_root
to mmc 1:${mender_boot_part_hex}
then the kernel boots.
So you would think I just needed to set MENDER_STORAGE_DEVICE
to /dev/mmcblk1
, so MENDER_UBOOT_STORAGE_DEVICE
would be 1
. However when I do this:
ERROR: u-boot-1_2024.01-r0 do_configure: U-Boot configuration rpi_arm64_config has setting:
CONFIG_SYS_MMC_ENV_DEV=0
but Mender expects:
CONFIG_SYS_MMC_ENV_DEV=1
Please fix U-Boot's configuration file.
ERROR: u-boot-1_2024.01-r0 do_configure: ExecutionError('/BuildRoot/build/tmp-glibc/work/xebra_cm4-oe-linux/u-boot/2024.01/temp/run.do_configure.1549453', 1, None, None)
ERROR: Logfile of failure stored in: /BuildRoot/build/tmp-glibc/work/xebra_cm4-oe-linux/u-boot/2024.01/temp/log.do_configure.1549453
ERROR: Task (/BuildRoot/meta/recipes-bsp/u-boot/u-boot_2024.01.bb:do_configure) failed with exit code '1'
Pre-Mender integration, the CM4 booted fine with U-Boot.