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

**URL:** <https://hub.mender.io/t/mender-with-yocto-rpi3-and-no-match-between-root-boot-partitions/3053>\
**Category:** General Discussions\
**Tags:** yocto, raspberry-pi-3, dunfell\
**Created:** [January 8, 2021, 3:17am UTC](https://hub.mender.io/t/mender-with-yocto-rpi3-and-no-match-between-root-boot-partitions/3053 "2021-01-08T03:17:24Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![simonboland](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@simonboland](https://hub.mender.io/u/simonboland)\
**Post date:** [January 8, 2021, 3:17am UTC](https://hub.mender.io/t/mender-with-yocto-rpi3-and-no-match-between-root-boot-partitions/3053/1 "2021-01-08T03:17:24Z")

</div>

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](https://gist.github.com/drewmoseley/816701ec0ca30d495786f03afea518dc).

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](https://hub.mender.io/t/how-to-create-your-first-recipe-and-enable-auto-start-using-systemd/1195) 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”  
MENDER\_ARTIFACT\_NAME = “release-1”  
INHERIT += “mender-full”  
MACHINE = “raspberrypi3”  
RPI\_USE\_U\_BOOT = “1”  
MENDER\_STORAGE\_TOTAL\_SIZE\_MB = “30000”  
MENDER\_BOOT\_PART\_SIZE\_MB = “40”  
MENDER\_DATA\_PART\_SIZE\_MB = “28000”  
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”  
DISABLE\_RPI\_BOOT\_LOGO = “1”  
DISABLE\_SPLASH = “1”  
MENDER\_SERVER\_URL = “[https://hosted.mender.io](https://hosted.mender.io)”  
MENDER\_TENANT\_TOKEN =   
DISTRO\_FEATURES\_append = " systemd"  
VIRTUAL-RUNTIME\_init\_manager = “systemd”  
DISTRO\_FEATURES\_BACKFILL\_CONSIDERED = “sysvinit”  
VIRTUAL-RUNTIME\_initscripts = “”  
IMAGE\_FSTYPES = “ext4”

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”  
NATIVELSBSTRING = “universal”  
TARGET\_SYS = “arm-poky-linux-gnueabi”  
MACHINE = “raspberrypi3”  
DISTRO = “poky”  
DISTRO\_VERSION = “3.1.4”  
TUNE\_FEATURES = “arm vfp cortexa7 neon vfpv4 thumb callconvention-hard”  
TARGET\_FPU = “hard”  
meta  
meta-poky  
meta-yocto-bsp = “dunfell:e79ccaa277d8a67429e5b5693236e2c98e395f24”  
meta-oe  
meta-python  
meta-multimedia  
meta-networking = “dunfell:f2d02cb71eaff8eb285a1997b30be52486c160ae”  
meta-raspberrypi = “dunfell:987993209716302eb8f314f69a2a3340555f94d8”  
meta-mender-core  
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.

---

<div class="post-metadata">

**Author:** ![simonboland](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@simonboland](https://hub.mender.io/u/simonboland)\
**Post date:** [January 9, 2021, 4:31am UTC](https://hub.mender.io/t/mender-with-yocto-rpi3-and-no-match-between-root-boot-partitions/3053/2 "2021-01-09T04:31:24Z")

</div>

I did further troubleshooting with fw\_printenv mender\_boot\_part and I get the same error described here in the issue [MEN-3834](https://tracker.mender.io/browse/MEN-3834?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel)

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

---

<div class="post-metadata">

**Author:** ![simonboland](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@simonboland](https://hub.mender.io/u/simonboland)\
**Post date:** [January 11, 2021, 1:00am UTC](https://hub.mender.io/t/mender-with-yocto-rpi3-and-no-match-between-root-boot-partitions/3053/3 "2021-01-11T01:00:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![joelguittet](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/joelguittet/32/1064_2.png) [@joelguittet](https://hub.mender.io/u/joelguittet)\
**Post date:** [February 20, 2021, 12:36am UTC](https://hub.mender.io/t/mender-with-yocto-rpi3-and-no-match-between-root-boot-partitions/3053/4 "2021-02-20T00:36:09Z")

</div>

Hello @simonboland

I experience the same issue right now, I’m using dunfell (commit f5864bfb32906b87cc24d5b84e74805994f0ef3e 25th of January 2021) and I have quite the same configuration.

Have you found a solution ? Or are yu stil on Zeus ? Seems the issue you reference above (MEN-3834) do not help here.

Dunfell is LTS so my preference at this time. If any body has a similar issue (just notice also [Mender integration of STM32MP157C on dunfell - #2 by mirzak](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/2) which is very similar, maybe identical issue).

Regards,  
Joel

---

<div class="post-metadata">

**Author:** ![simonboland](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@simonboland](https://hub.mender.io/u/simonboland)\
**Post date:** [February 20, 2021, 1:04am UTC](https://hub.mender.io/t/mender-with-yocto-rpi3-and-no-match-between-root-boot-partitions/3053/5 "2021-02-20T01:04:32Z")

</div>

I couldn’t find a solution. I simply switched to Zeus. It worked for me. I can supply the local.conf if that helps.

---

<div class="post-metadata">

**Author:** ![joelguittet](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/joelguittet/32/1064_2.png) [@joelguittet](https://hub.mender.io/u/joelguittet)\
**Post date:** [February 21, 2021, 9:35am UTC](https://hub.mender.io/t/mender-with-yocto-rpi3-and-no-match-between-root-boot-partitions/3053/6 "2021-02-21T09:35:59Z")

</div>

Thanks for the quick answer. Tried a little bit but not enough familiar with mender yet, so I switched to Zeus too.

Confirmed Zeus working and Dunfell doesn’t.

Joel

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [February 21, 2021, 7:33pm UTC](https://hub.mender.io/t/mender-with-yocto-rpi3-and-no-match-between-root-boot-partitions/3053/7 "2021-02-21T19:33:18Z")

</div>

Hi @joelguittet@simonboland I just ran a fresh build from the current HEAD of dunfell and could not reproduce this. Can you confirm what git hashes you are using on dunfell that exhibits the issue?  
Drew

---

<div class="post-metadata">

**Author:** ![simonboland](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@simonboland](https://hub.mender.io/u/simonboland)\
**Post date:** [February 22, 2021, 8:34am UTC](https://hub.mender.io/t/mender-with-yocto-rpi3-and-no-match-between-root-boot-partitions/3053/8 "2021-02-22T08:34:58Z")

</div>

I may not be able to try it again soon but I’ll let you know if I do.

---

<div class="post-metadata">

**Author:** ![joelguittet](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/joelguittet/32/1064_2.png) [@joelguittet](https://hub.mender.io/u/joelguittet)\
**Post date:** [February 22, 2021, 11:41pm UTC](https://hub.mender.io/t/mender-with-yocto-rpi3-and-no-match-between-root-boot-partitions/3053/9 "2021-02-22T23:41:52Z")

</div>

Hello @drewmoseley

f5864bfb32906b87cc24d5b84e74805994f0ef3e confirmed not working for me. RPi CM3 device.

Joel

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [February 23, 2021, 12:50am UTC](https://hub.mender.io/t/mender-with-yocto-rpi3-and-no-match-between-root-boot-partitions/3053/10 "2021-02-23T00:50:51Z")

</div>

@joelguittet any chance you can check on a standard RpI3? I don’t have a CM3 to check with. I doubt it would be specific to the hardware but it’s possible.

@lluiscampos do you have any ideas here?

---

<div class="post-metadata">

**Author:** ![joelguittet](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/joelguittet/32/1064_2.png) [@joelguittet](https://hub.mender.io/u/joelguittet)\
**Post date:** [February 23, 2021, 11:28am UTC](https://hub.mender.io/t/mender-with-yocto-rpi3-and-no-match-between-root-boot-partitions/3053/11 "2021-02-23T11:28:14Z")

</div>

@drewmoseley I have only CM3 available, sorry.  
I have seen plenty of differences on meta-mender between zeus and dunfell, particularly at u-boot level. Is it normal ?

Joel

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [February 23, 2021, 1:44pm UTC](https://hub.mender.io/t/mender-with-yocto-rpi3-and-no-match-between-root-boot-partitions/3053/12 "2021-02-23T13:44:46Z")

</div>

Yes, differences between the branches are expected.

---

<div class="post-metadata">

**Author:** ![jostor](https://avatars.discourse-cdn.com/v4/letter/j/dbc845/32.png) [@jostor](https://hub.mender.io/u/jostor)\
**Post date:** [March 2, 2021, 9:16pm UTC](https://hub.mender.io/t/mender-with-yocto-rpi3-and-no-match-between-root-boot-partitions/3053/13 "2021-03-02T21:16:23Z")

</div>

After upgrading from thud to dunfell, I am also experiencing the same problems. I am running on a Raspberry pi 3b+.

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [March 2, 2021, 10:03pm UTC](https://hub.mender.io/t/mender-with-yocto-rpi3-and-no-match-between-root-boot-partitions/3053/14 "2021-03-02T22:03:50Z")

</div>

@jostor I’ve not been able to reproduce this. Can you provide your sdimg file so I can try that directly? If you have Google Drive or Dropbox or some such you can probably share it directly with me there. [drew.moseley@gmail.com](mailto:drew.moseley@gmail.com)

---

<div class="post-metadata">

**Author:** ![jostor](https://avatars.discourse-cdn.com/v4/letter/j/dbc845/32.png) [@jostor](https://hub.mender.io/u/jostor)\
**Post date:** [March 3, 2021, 1:16pm UTC](https://hub.mender.io/t/mender-with-yocto-rpi3-and-no-match-between-root-boot-partitions/3053/15 "2021-03-03T13:16:17Z")

</div>

@drewmoseley Thanks for your reply! I think I solved it.

I saw that I got this warning when bitbaking u-boot:

`WARNING: u-boot-1_2020.01-r0 do_provide_mender_defines: Found more than one dtb specified in KERNEL_DEVICETREE ( bcm2708-rpi-zero-w.dtb bcm2708-rpi-b.dtb bcm2708-rpi-b-plus.dtb bcm2709-rpi-2-b.dtb bcm2710-rpi-3-b.dtb bcm2710-rpi-3-b-plus.dtb bcm2711-rpi-4-b.dtb bcm2708-rpi-cm.dtb bcm2710-rpi-cm3.dtb overlays/at86rf233.dtbo overlays/disable-bt.dtbo overlays/dwc2.dtbo overlays/gpio-key.dtbo overlays/hifiberry-amp.dtbo overlays/hifiberry-dac.dtbo overlays/hifiberry-dacplus.dtbo overlays/hifiberry-digi.dtbo overlays/i2c-rtc.dtbo overlays/iqaudio-dac.dtbo overlays/iqaudio-dacplus.dtbo overlays/miniuart-bt.dtbo overlays/mcp2515-can0.dtbo overlays/mcp2515-can1.dtbo overlays/pitft22.dtbo overlays/pitft28-resistive.dtbo overlays/pitft28-capacitive.dtbo overlays/pitft35-resistive.dtbo overlays/pps-gpio.dtbo overlays/rpi-ft5406.dtbo overlays/rpi-poe.dtbo overlays/vc4-kms-v3d.dtbo overlays/vc4-fkms-v3d.dtbo overlays/w1-gpio-pullup.dtbo overlays/w1-gpio.dtbo overlays/gpio-ir.dtbo overlays/gpio-ir-tx.dtbo ). Only one should be specified. Choosing the last one: bcm2710-rpi-cm3.dtb. Set KERNEL_DEVICETREE to the desired dtb file to silence this warning.`

I tried adding KERNEL\_DEVICETREE = “bcm2710-rpi-3-b-plus.dtb” to my local.conf. It looks like this fixed it. @joelguittet and @simonboland Maybe this will help you too?

---

<div class="post-metadata">

**Author:** ![joelguittet](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/joelguittet/32/1064_2.png) [@joelguittet](https://hub.mender.io/u/joelguittet)\
**Post date:** [March 3, 2021, 6:45pm UTC](https://hub.mender.io/t/mender-with-yocto-rpi3-and-no-match-between-root-boot-partitions/3053/16 "2021-03-03T18:45:20Z")

</div>

I have kept the default config and was not specifying a single device tree.  
@drewmoseley and you ? You were not able to reproduce the issue, do you specify a single dtb ?

Joel

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [March 3, 2021, 7:11pm UTC](https://hub.mender.io/t/mender-with-yocto-rpi3-and-no-match-between-root-boot-partitions/3053/17 "2021-03-03T19:11:38Z")

</div>

No, I just leave that at the default.

---

<div class="post-metadata">

**Author:** ![jostor](https://avatars.discourse-cdn.com/v4/letter/j/dbc845/32.png) [@jostor](https://hub.mender.io/u/jostor)\
**Post date:** [March 26, 2021, 9:14am UTC](https://hub.mender.io/t/mender-with-yocto-rpi3-and-no-match-between-root-boot-partitions/3053/18 "2021-03-26T09:14:01Z")

</div>

Hi,  
I realized that the “solution” with adding "KERNEL\_DEVICETREE = “bcm2710-rpi-3-b-plus.dtb” probably wasn’t ideal. I lost my overlays, and I guess it was not the correct way to solve this.

I tried setting up a new project following this guide: [Raspberry Pi 3 Model B/B+](https://hub.mender.io/t/raspberry-pi-3-model-b-b/57)  
The image I built this way worked, and I didn’t get these problems. I tried removing all my layers from my original project, but still got the " **No match between boot and root partitions**" and the “fw\_printenv” problems. I compared which git commit was currently checked out on the different layers and checked out the same versions on my originally project. That helped. I think the eroors disappeared after changing the git commit of poky and rebuilding the image.

Originally I cloned the poky project with: `git clone git://git.yoctoproject.org/poky --branch yocto-3.1.5 --single-branch`  
Now, when it is working, poky is on `9ee329c18fbe0c42eaf3d43657ea30591f79143b`
