RootFS switch in cmdline.txt not happening on Pi 4

I seem to be currently having an issue with Mender on Kirkstone where the RootFS switch after an update doesn’t seem to be happening. Initially I thought this was part of the problem a few others were experiencing with the kirkstone branch, but after testing known good versions of meta-mender, this doesn’t seem to be the case and is likely something that I’m doing wrong instead (hence the separate thread). The WebUI also falsely reports the update as being a success too, updating the current software field, despite no switch taking place.

Versions i’ve tested:

  • This PR
  • Kirkstone (latest branch)
  • Kirkstone v2023.12
  • Kirkstone v2023.10
  • Kirkstone v2023.08

This is what my local.conf looks like which inherits MENDER_FULL that uses uboot_uefi_grub as the mender_bootloader_integration:

MACHINE = "raspberrypi4"

MENDER_ARTIFACT_NAME = "testimageartifact"
INHERIT += "mender-full"

MENDER_SERVER_URL = "https://hosted-mender-instance"

## Raspberry Pi Config

ENABLE_I2C = "1"
KERNEL_MODULE_AUTOLOAD:rpi += "i2c-dev i2c-bcm2708"
GPU_MEM = "128"

PREFERRED_PROVIDER_virtual/psplash = "plymouth"

Output of grub-mender-grubenv-print before an attempted rootFS update:


After an attempted rootFS update:


My cmdline.txt (stays the same after a rootfs update):
dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait loglevel=1

Any ideas?

Found in meta-mender-raspberrypi/recipes-bsp/bootfiles/ that the CMDLINE is meant to be replaced on image creation from root=/dev/mmcblk0p2 to root=${mender_kernel_root}. Seems that for some reason this change isn’t happening. Manually setting it in my cmdline.txt however causes a Waiting for root device ${mender_kernel_root}.... So it seems like something within the bootloader isn’t being set / happening that’s meant to handle the switching

Some googling seems to suggest this is u-boot specific though so I’m not sure if it wholly applies to the default uboot grub hybrid that ships by default in meta-mender Seems like ${mender_kernel_root} is also for the uboot-grub hybrid as well, just a bit different. This README on grub-mender-env also suggests there should be two copies of a cfg file but all I’ve been able to find with mine is one in /boot/EFI/BOOT/grub.cfg?

It seems that in a tremendous moment of sheer brainfart over the past few days, I never realised that meta-mender-raspberrypi is in fact its own Yocto layer that needs to be imported :melting_face: :melting_face:. ${mender_kernel_root} shows up in cmdline.txt like it should after importing it.