Troubleshooting Rootfs-image Updates on a Compulab Iot-Link Device (nxp imx93)

Hi all,

I’m currently trying to get rootfs-image updates working on a Compulab IoT Link device [1]. Which uses a NXP Imx93.

[1] IOT-LINK Industrial IoT Gateway | Compulab

The vendor has a mender repo [2] which I’m using as a starting point, it uses this bsp [3], which is based on NXP’s imx bsp.

[2] GitHub - compulab-yokneam/meta-mender-compulab: Mender Layer for CompuLab Boards

[3] GitHub - compulab-yokneam/meta-bsp-imx9 at iot-link-1.0

The device chain loads from uboot into Grub. Mender is configured to use Grub.

When I install a rootfs-image update:

  • The device successfully downloads this into the passive partition.

  • Then reboots, but after rebooting remains in the original partition.

So the update fails with:

“Update Module output (stderr): Mounted root does not match boot loader environment (/dev/mmcblk0p3)!”

I think the rootfs-image script is working correctly, and detecting the problem, which is that the device doesn’t boot into the new partition. I’ve verified this by adding extra logging to the rootfs-image update script.

I’ve checked that grub-mender-grubenv-set and grub-mender-grubenv-print persist the values across a reboot.

So I suspect there’s a problem in the Yocto build with the mender grub integration. It’s not respecting the mender grub boot variables.

I’d really appreciate any ideas on where to look to help track this down. Which yocto recipes/packages/repos should I be looking at? Are there any docs I’ve missed?

Cheers,
Greg

Hi @greg-blackcurrent,

Thanks for reaching out!
This sounds like persisting the variables works, but they are not actually taken into account in the booting process.
For a very high level test, can you try to follow the integration checklist at Integration checklist | Mender documentation? If you feel like it, there is also an automated version of it provided at meta-mender-community/meta-mender-validation/recipes-mender/bootloader-validation/bootloader-validation_0.1.bb at scarthgap · mendersoftware/meta-mender-community · GitHub, documented at Mender-validation: automatic integration checking.

Which MENDER_FEATURES are set in the build? Do you have a way to inspect the GRUB boot process to check if the Mender integration gets used correctly?

Greetz,
Josef

Cheers! The integration checklist is really helpful.

It looks like the bootloader is misconfigured in the vendors example build. They’ve configured Mender to use grub. But their u-boot bootloader is skipping grub and booting straight into the rootfs partition.

I’ve reached out to their support. Hopefully they’ll be able to shed some more light on the situation.