Partition switch not happening on Raspberry Pi

I actually have a problem with mender NOT modifying cmdline and I am stuck on the same partition after update…

Hi @emilm,

I’m currently investigating the problem too, but don’t have a grip on it yet. Could you trace it down to the cmdline creation?

Greets,
Josef

Hello!

I figured it out. Seems like it was not enough to INHERIT += “mender-full” …

I needed to add:
MENDER_FEATURES_ENABLE:append = " mender-update-install"

Just want to note that I’ve ran into this as well, even with the latest tag I should use according to this other thread that mentions it too. Instead of adding mender-update-install I needed to do mender-client-install. Will report back tomorrow if that fixes the switching issue

Hm how can it be different for you ? It includes the file if that feature is detected

I’m not too sure right now, but it’s the same setup as yours in my local.conf with INHERIT += “mender-full” but the switch just doesn’t happen. Mostly just experimentation right now as the v2023.12 kirkstone tag checks for mender-client-install instead of mender-update-install

Just tried this (v2023.12 Kirkstone Tag) and it still fails to perform the partition switch, with or without MENDER_FEATURES_ENABLE:append = " mender-client-install" (mender-update-install threw loads of errors claiming it’s not a valid mender feature).

Weirdly, the web UI reports the update as a success, even though it never boots into the new rootfs?

Edit: using the kirkstone branch (no tag) with mender-update-install specified also didn’t perform the partition switch.

I am on commit 4047149055f8dd6db59412c9e802e94a3ba7c85d

Double check the remote / local branch and commit. And post the errors after confirming

I did manage to get that resolved over the weekend, using 2023.12 kirkstone. Adds everything it needs now but will complain about fuzz in uboot and when I flash the image I get stuck on a blinking cursor.

Log:

Sstate summary: Wanted 2323 Local 0 Mirrors 0 Missed 2323 Current 1 (0% match, 0% complete)
NOTE: Executing Tasks
WARNING: u-boot-1_2022.01-r0 do_patch: Fuzz detected:

Applying patch 0001-configs-rpi-enable-mender-requirements.patch
patching file configs/rpi_0_w_defconfig
Hunk #1 succeeded at 19 with fuzz 1 (offset 1 line).
Hunk #2 succeeded at 44 (offset 3 lines).
patching file configs/rpi_2_defconfig
Hunk #1 succeeded at 20 with fuzz 1 (offset 2 lines).
Hunk #2 succeeded at 44 (offset 4 lines).
patching file configs/rpi_3_32b_defconfig
Hunk #1 succeeded at 21 with fuzz 1 (offset 2 lines).
Hunk #2 succeeded at 47 (offset 4 lines).
patching file configs/rpi_3_b_plus_defconfig
Hunk #1 succeeded at 20 with fuzz 1 (offset 1 line).
Hunk #2 succeeded at 46 (offset 3 lines).
patching file configs/rpi_3_defconfig
Hunk #1 succeeded at 20 with fuzz 1 (offset 1 line).
Hunk #2 succeeded at 46 (offset 3 lines).
patching file configs/rpi_4_32b_defconfig
Hunk #1 succeeded at 20 with fuzz 1 (offset 1 line).
Hunk #2 succeeded at 62 (offset 4 lines).
patching file configs/rpi_4_defconfig
Hunk #1 succeeded at 20 with fuzz 1 (offset 1 line).
Hunk #2 succeeded at 60 (offset 4 lines).
patching file configs/rpi_arm64_defconfig
Hunk #1 succeeded at 19 with fuzz 2 (offset 1 line).
Hunk #2 succeeded at 52 (offset 2 lines).
patching file configs/rpi_defconfig
Hunk #1 succeeded at 19 with fuzz 1 (offset 1 line).
Hunk #2 succeeded at 44 (offset 3 lines).
patching file env/Kconfig
Hunk #1 succeeded at 57 (offset -4 lines).
patching file include/configs/rpi.h
Hunk #1 succeeded at 68 with fuzz 2 (offset -29 lines).


The context lines in the patches can be updated with devtool:

    devtool modify u-boot
    devtool finish --force-patch-refresh u-boot <layer_path>

Don't forget to review changes done by devtool!

WARNING: u-boot-1_2022.01-r0 do_patch: QA Issue: Patch log indicates that patches do not apply cleanly. [patch-fuzz]
WARNING: u-boot-1_2022.01-r0 do_provide_mender_defines: Found more than one dtb specified in KERNEL_DEVICETREE (          bcm2708-rpi-zero.dtb     bcm2708-rpi-zero-w.dtb     bcm2708-rpi-b.dtb     bcm2708-rpi-b-rev1.dtb     bcm2708-rpi-b-plus.dtb     bcm2709-rpi-2-b.dtb     bcm2710-rpi-2-b.dtb     bcm2710-rpi-3-b.dtb     bcm2710-rpi-3-b-plus.dtb     bcm2711-rpi-4-b.dtb     bcm2711-rpi-400.dtb     bcm2708-rpi-cm.dtb     bcm2710-rpi-cm3.dtb     bcm2711-rpi-cm4.dtb               overlays/overlay_map.dtb     overlays/at86rf233.dtbo     overlays/disable-bt.dtbo     overlays/dwc2.dtbo     overlays/gpio-ir.dtbo     overlays/gpio-ir-tx.dtbo     overlays/gpio-key.dtbo     overlays/gpio-poweroff.dtbo     overlays/gpio-shutdown.dtbo     overlays/hifiberry-amp.dtbo     overlays/hifiberry-dac.dtbo     overlays/hifiberry-dacplus.dtbo     overlays/hifiberry-digi.dtbo     overlays/justboom-both.dtbo     overlays/justboom-dac.dtbo     overlays/justboom-digi.dtbo     overlays/i2c-gpio.dtbo     overlays/i2c-rtc.dtbo     overlays/imx219.dtbo     overlays/imx477.dtbo     overlays/iqaudio-dac.dtbo     overlays/iqaudio-dacplus.dtbo     overlays/mcp2515-can0.dtbo     overlays/mcp2515-can1.dtbo     overlays/mcp3008.dtbo     overlays/miniuart-bt.dtbo     overlays/pitft22.dtbo     overlays/pitft28-capacitive.dtbo     overlays/pitft28-resistive.dtbo     overlays/pitft35-resistive.dtbo     overlays/pps-gpio.dtbo     overlays/rpi-ft5406.dtbo     overlays/rpi-poe.dtbo     overlays/vc4-fkms-v3d.dtbo     overlays/vc4-fkms-v3d-pi4.dtbo     overlays/vc4-kms-v3d.dtbo     overlays/vc4-kms-v3d-pi4.dtbo     overlays/vc4-kms-dsi-7inch.dtbo     overlays/w1-gpio.dtbo     overlays/w1-gpio-pullup.dtbo     overlays/wm8960-soundcard.dtbo          ). Only one should be specified. Choosing the last one: overlays/overlay_map.dtb. Set KERNEL_DEVICETREE to the desired dtb file to silence this warning.

Local.conf:

## MENDER CONFIG
MENDER_ARTIFACT_NAME = "os-img"
INHERIT += "mender-full"
ARTIFACTIMG_FSSTYPE = "ext4"

MENDER_SERVER_URL = "<redacted>"
MENDER_STORAGE_TOTAL_SIZE_MB = "16000"
MENDER_BOOT_PART_SIZE_MB = "500"
MENDER_DATA_PART_SIZE_MB = "2500"
MENDER_FEATURES_ENABLE:append = " mender-uboot mender-image-sd"
MENDER_FEATURES_DISABLE:append = " mender-grub mender-image-uefi"

## Raspberry Pi Config

RPI_USE_UBOOT = "1"
ENABLE_UART = "1"
IMAGE_INSTALL:append = " kernel-image kernel-devicetree"
IMAGE_FSTYPES:remove = " rpi-sdimg"
VIDEO_CAMERA = "1"
ENABLE_I2C = "1"
KERNEL_MODULE_AUTOLOAD:rpi += "i2c-dev i2c-bcm2708"
GPU_MEM = "128"

EDIT: Seems to boot now. Think adding SDIMG_ROOTFS_TYPE = "ext4" to my local.conf did the trick.

1 Like

Hi @pyxlwuff,

Glad to hear you’re making good progress. Yeah we know about the patch fuzz, and while it’s not super pretty it is harmless.
One thing I could spot, ARTIFACTIMG_FSSTYPE is a typo, there’s one extra S. If you take that out, I’d expect the SDIMG_ROOTFS_TYPE assignment to be not required anymore.

Greets,
Josef

1 Like

Ah good catch, didn’t notice that :smile: done quite a few test rootfs updates now without issues so all seems to be resolved for me. Thanks!

1 Like