Mender with Yocto, RPI3 and No match between root & boot partitions

I’m now trying to set up mender and make use of the features. I’m experiencing an error that seems to have occurred for other people.

To summarise, I created a set up in Yocto which is similar to the script Drew Moseley created here.

The main differences are:

  1. I’m using Dunfell instead of Rocko
  2. I have added an extra layer which is a copy of the stargazer recipe here to add recipes for systemd as a service and additional networking.
  3. I’ve modified local.conf as to be as shown below. The key points are the use of U-boot.

IMAGE_FEATURES_remove += “splash”
MENDER_STORAGE_DEVICE = “/dev/mmcblk0”
INHERIT += “mender-full”
MACHINE = “raspberrypi3”
IMAGE_INSTALL_append = " kernel-image kernel-devicetree"
IMAGE_FSTYPES_remove += " rpi-sdimg"
IMAGE_BOOT_FILES_append = " boot.scr u-boot.bin;${SDIMG_KERNELIMAGE}"
INHERIT += “rpi-update-firmware”
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = “systemd”
VIRTUAL-RUNTIME_initscripts = “”

When I run bitbake core-image-full-cmdline, the build configuration output is:

Build Configuration:
BB_VERSION = “1.46.0”
BUILD_SYS = “x86_64-linux”
TARGET_SYS = “arm-poky-linux-gnueabi”
MACHINE = “raspberrypi3”
DISTRO = “poky”
TUNE_FEATURES = “arm vfp cortexa7 neon vfpv4 thumb callconvention-hard”
TARGET_FPU = “hard”
meta-yocto-bsp = “dunfell:e79ccaa277d8a67429e5b5693236e2c98e395f24”
meta-networking = “dunfell:f2d02cb71eaff8eb285a1997b30be52486c160ae”
meta-raspberrypi = “dunfell:987993209716302eb8f314f69a2a3340555f94d8”
meta-mender-raspberrypi = “dunfell:cc1fdd90820bf8912007b399217bdc3278473165”
meta-stargazer = “:”

I flashed an SD card using the command

sudo dd if=core-image-full-cmdline-raspberrypi3.sdimg of=/dev/sdb bs=4M

I then booted the RPI3 and logged in. When I run the command

mender show-artifact

I get

ERRO[0000] Failed to read the current active partition: No match between boot and root partitions. : exit status 243.

If I type cat /etc/fw_env.config the output is:

/dev/mmcblk0 0x400000 0x4000
/dev/mmcblk0 0x800000 0x4000

From my understanding this looks correct. However, I suspect the problem because of a mismatch between U-Boot and the kernel. To investigate, I’ve gone into U-boot and typed printenv but I’m not sure which variables I should check.

I’m not completely wedded to using U-Boot. If there’s a simpler solution without it then I’d be happy to follow a recommendation either way.

My goal is to have an operational system where I can more recipes for a Qt touchscreen application and make use of mender updates.

I did further troubleshooting with fw_printenv mender_boot_part and I get the same error described here in the issue MEN-3834

I’m not sure if I should update the conf/local.conf settings.

I decided to swap to the earlier Yocto version Zeus. It wouldn’t build with these two lines in my local.conf

IMAGE_BOOT_FILES_append = " boot.scr u-boot.bin;${SDIMG_KERNELIMAGE}"
INHERIT += “rpi-update-firmware”

I removed those since it’s not essential for me now. I don’t have the same problems now.

FYI. I did a git pull on the dunfell branch of meta-mender last week after originally posting my question. I noticed there were some changes. I still had the problem with dunfell after this. I’ll investigate further.