# Yocto 2.7 - Warrior support

**URL:** <https://hub.mender.io/t/yocto-2-7-warrior-support/859>\
**Category:** General Discussions\
**Created:** [July 26, 2019, 9:57pm UTC](https://hub.mender.io/t/yocto-2-7-warrior-support/859 "2019-07-26T21:57:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cveilleux](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/cveilleux/32/307_2.png) [@cveilleux](https://hub.mender.io/u/cveilleux)\
**Post date:** [July 26, 2019, 9:57pm UTC](https://hub.mender.io/t/yocto-2-7-warrior-support/859/1 "2019-07-26T21:57:49Z")

</div>

I am trying to upgrade to Yocto Warrior using the master branch of meta-mender.

I have it fully working on both grub (x86) and u-boot (raspberrypi).

There is only one problem with the `mender -commit` when booting in the warrior version:

```auto
time="2019-07-26T21:31:07Z" level=info msg="Loaded configuration file: /etc/mender/mender.conf" module=config
time="2019-07-26T21:31:07Z" level=info msg="No dual rootfs configuration present" module=main
time="2019-07-26T21:31:07Z" level=info msg="Update Module path \"/usr/share/mender/modules/v3\" could not be opened (open /usr/share/mender/modules/v3: no such file or directory). Update modules will not be available" module=modules
time="2019-07-26T21:31:07Z" level=error msg="Dual rootfs configuration not found when resuming update. Recovery may fail." module=installer
Committing Artifact...
time="2019-07-26T21:31:07Z" level=error msg="Commit failed: Stub module: Cannot execute ArtifactCommit" module=standalone
time="2019-07-26T21:31:07Z" level=error msg="Pretending to support rollback so that host can reboot and try to restore state" module="stub_installer"
Rolling back Artifact...
time="2019-07-26T21:31:07Z" level=error msg="Unable to roll back with a stub module, but will try to reboot to restore state" module="stub_installer"
time="2019-07-26T21:31:07Z" level=error msg="Error when executing ArtifactFailure state: Stub module: Cannot execute ArtifactFailure" module=standalone
time="2019-07-26T21:31:07Z" level=error msg="Error when executing Cleanup state: Stub module: Cannot execute Cleanup" module=standalone
time="2019-07-26T21:31:07Z" level=error msg="Stub module: Cannot execute ArtifactCommit" module=main

```

I’ve traced the problem to simply the /etc/mender/mender.conf file missing the following lines:

```auto
    "RootfsPartA": "/dev/mmcblk0p2",
    "RootfsPartB": "/dev/mmcblk0p3"

```

If I add these config manually, `mender -commit` works. I can upgrade and downgrade from Yocto thud without any errors.

These configuration seems to be generated from mender.inc or mender-setup.bbclass. I am not sure why under the master branch they are not getting added to the mender.conf file.

---

<div class="post-metadata">

**Author:** ![davidknezic](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/davidknezic/32/305_2.png) [@davidknezic](https://hub.mender.io/u/davidknezic)\
**Post date:** [July 27, 2019, 12:47pm UTC](https://hub.mender.io/t/yocto-2-7-warrior-support/859/2 "2019-07-27T12:47:25Z")

</div>

Hi @cveilleux

It’s great that you got it working based on warrior with a raspberry pi! I’m trying the same but am having some trouble. Is your project open-source so I could look at how you did it?

Regarding your question, could you look into your /data parition. There you should also find a set of config files, for me it’s in /data/mender/mender.conf.

So whenever I run mender, I always add the `-data /data/mender -config /data/mender/mender.conf` args.

---

<div class="post-metadata">

**Author:** ![cveilleux](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/cveilleux/32/307_2.png) [@cveilleux](https://hub.mender.io/u/cveilleux)\
**Post date:** [July 28, 2019, 3:54pm UTC](https://hub.mender.io/t/yocto-2-7-warrior-support/859/3 "2019-07-28T15:54:11Z")

</div>

Hi,

Thanks for the tip. Yes, I could point to a custom mender.conf.

Previous builds would automatically set the RootfsPart settings, so something must have changed with warrior.

Please find attached my patch to make meta-mender build with poky and meta-raspberrypy warrior branches.

I am applying it on top of meta-mender master.

I simply declared layer compatibility and removed a u-boot patch that is no longer required (upstreamed).

```auto
diff --git a/meta-mender-core/conf/layer.conf b/meta-mender-core/conf/layer.conf
index 855dc21..41a74f0 100644
--- a/meta-mender-core/conf/layer.conf
+++ b/meta-mender-core/conf/layer.conf
@@ -17,5 +17,5 @@ BBFILE_PRIORITY_mender = "6"
 
 INHERIT += "mender-setup"
 
-LAYERSERIES_COMPAT_mender = "thud"
+LAYERSERIES_COMPAT_mender = "thud warrior"
 LAYERDEPENDS_mender = "core"
diff --git a/meta-mender-core/recipes-bsp/u-boot/u-boot-mender-common.inc b/meta-mender-core/recipes-bsp/u-boot/u-boot-mender-common.inc
index f4f17df..3c1f08d 100644
--- a/meta-mender-core/recipes-bsp/u-boot/u-boot-mender-common.inc
+++ b/meta-mender-core/recipes-bsp/u-boot/u-boot-mender-common.inc
@@ -17,7 +17,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/patches:${THISDIR}/files:"
 SRC_URI_append_mender-uboot = " file://0001-Add-missing-header-which-fails-on-recent-GCC.patch"
 SRC_URI_append_mender-uboot = " file://0002-Generic-boot-code-for-Mender.patch"
 SRC_URI_append_mender-uboot = " file://0003-Integration-of-Mender-boot-code-into-U-Boot.patch"
-SRC_URI_append_mender-uboot = " file://0006-env-Kconfig-Add-descriptions-so-environment-options-.patch"
 
 SRC_URI_append_mender-uboot = "${@bb.utils.contains('MENDER_UBOOT_AUTO_CONFIGURE', \
                                                     '1', \
diff --git a/meta-mender-raspberrypi/conf/layer.conf b/meta-mender-raspberrypi/conf/layer.conf
index ed4626e..750fef0 100644
--- a/meta-mender-raspberrypi/conf/layer.conf
+++ b/meta-mender-raspberrypi/conf/layer.conf
@@ -14,7 +14,7 @@ BBFILE_PRIORITY_mender-raspberrypi = "10"
 
 LAYERDEPENDS_mender-raspberrypi = "mender raspberrypi"
 
-LAYERSERIES_COMPAT_mender-raspberrypi = "thud"
+LAYERSERIES_COMPAT_mender-raspberrypi = "thud warrior"
 
 # Raspberry Pi doesn't work with GRUB currently.
 _MENDER_IMAGE_TYPE_DEFAULT_rpi = "mender-image-sd"

```

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [July 31, 2019, 10:35am UTC](https://hub.mender.io/t/yocto-2-7-warrior-support/859/4 "2019-07-31T10:35:53Z")

</div>

As far as I know the mender client should automatically “probe” a couple of default locations for the `mender.conf` file, e.g

`/etc/mender/mender.conf`  
`/var/lib/mender/mender.conf` (same as /data/mender/mender.conf by default in Yocto)

And the additional args should not be needed.

Can you check if these files are in place?

Can you also share which version of the Mender client you are running?
