# Failure to commit update with u-boot on mender 3.5

**URL:** <https://hub.mender.io/t/failure-to-commit-update-with-u-boot-on-mender-3-5/3531>\
**Category:** General Discussions\
**Tags:** yocto, nxp, dunfell\
**Created:** [April 20, 2021, 5:41pm UTC](https://hub.mender.io/t/failure-to-commit-update-with-u-boot-on-mender-3-5/3531 "2021-04-20T17:41:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevlan](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kevlan/32/695_2.png) [@kevlan](https://hub.mender.io/u/kevlan)\
**Post date:** [April 20, 2021, 5:41pm UTC](https://hub.mender.io/t/failure-to-commit-update-with-u-boot-on-mender-3-5/3531/1 "2021-04-20T17:41:24Z")

</div>

Hi,

System information: compulab cl-som-imx8 (imx8mq)  
Linux: linux-imx 5.4  
U-boot: u-boot-imx 2019.04  
Yocto: dunfell

I am working to update our system from mender 3.3 to mender 3.5. When I switched to 3.5 and tried to push the update, the mender web interface indicated that the update succeeded. However, the from looking at the console logs while the device rebooted it is showing that the bootcount was exceeded on a subsequent boot so the update available flag must have not been reset to 0.

Is there something that would have changed between 3.3 and 3.5 with regards to how mender updates the u-boot environment that would cause this to fail to be set?

Thanks,

Kevin

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [April 20, 2021, 8:27pm UTC](https://hub.mender.io/t/failure-to-commit-update-with-u-boot-on-mender-3-5/3531/2 "2021-04-20T20:27:40Z")

</div>

There was a change to use libubootenv at some point to alter the uboot env variables. Might be worth checking the mender-client and meta-mender repos to see if that change falls with your versions

> [@Libubootenv: New library to access U-Boot environment](https://hub.mender.io/t/libubootenv-new-library-to-access-u-boot-environment/297):
>
> Hi Folks, For anyone who isn’t on the swupdate mailing list I noticed an interesting post yesterday about a new option for U-Boot environment configuration in software. See the announcement post at [https://groups.google.com/forum/#!searchin/swupdate/libubootenv%7Csort:date/swupdate/2wcIyfexOro/iADiuQRtBQAJ.](https://groups.google.com/forum/#!searchin/swupdate/libubootenv%7Csort:date/swupdate/2wcIyfexOro/iADiuQRtBQAJ)

> [@Meta-mender dunfell -\> libubootenv issue](https://hub.mender.io/t/meta-mender-dunfell-libubootenv-issue/2426):
>
> I’m using latest dunfell poky and I’m hitting following issue: ERROR: No recipes available for: /home/user/project/meta-mender/meta-mender-core/recipes-bsp/u-boot/libubootenv\_0.2.bbappend Seems that libubootenv was bumped to 0.3 in latest dunfell 022affe4592c1a21d6abb00619e5927865748819 and thus an error. Renaming recipe to x\_0.3.bbappend resolve an issue but I’m not sure if patches are still valid. I can post PR if necessary. Thanks.

> [@Update not working](https://hub.mender.io/t/update-not-working/2715/20):
>
> I couldn’t get fw\_setenv to work using stdin echo test1=test1 \> /var/run/test root@octave-imx8mnevk:~# fw\_setenv -s - \< /var/run/test root@octave-imx8mnevk:~# fw\_printenv | grep test1 root@octave-imx8mnevk:~# root@octave-imx8mnevk:~# fw\_setenv -s /var/run/test root@octave-imx8mnevk:~# fw\_printenv | grep test1 test1=test1 I looked through the libubootenv code and can’t see how it processes - for stdin, in the u-boot version you can see if (strcmp(fname, "-") == 0) fp = stdin; But I don’t…

---

<div class="post-metadata">

**Author:** ![kevlan](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kevlan/32/695_2.png) [@kevlan](https://hub.mender.io/u/kevlan)\
**Post date:** [April 20, 2021, 8:54pm UTC](https://hub.mender.io/t/failure-to-commit-update-with-u-boot-on-mender-3-5/3531/3 "2021-04-20T20:54:25Z")

</div>

Thanks,

It looks like from the third issue you posted that libubootenv requires version 0.3 or greater and we are using 0.2 at the moment. I will look into updating that to see if it is possible for us.

---

<div class="post-metadata">

**Author:** ![kevlan](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kevlan/32/695_2.png) [@kevlan](https://hub.mender.io/u/kevlan)\
**Post date:** [April 21, 2021, 4:21pm UTC](https://hub.mender.io/t/failure-to-commit-update-with-u-boot-on-mender-3-5/3531/4 "2021-04-21T16:21:17Z")

</div>

I was able to upgrade to libubootenv and the updates now work.
