# Application update in i.MX8M Mini

**URL:** <https://hub.mender.io/t/application-update-in-i-mx8m-mini/2457>\
**Category:** General Discussions\
**Created:** [September 17, 2020, 8:33am UTC](https://hub.mender.io/t/application-update-in-i-mx8m-mini/2457 "2020-09-17T08:33:16Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kunal](https://avatars.discourse-cdn.com/v4/letter/k/dec6dc/32.png) [@Kunal](https://hub.mender.io/u/Kunal)\
**Post date:** [September 17, 2020, 8:33am UTC](https://hub.mender.io/t/application-update-in-i-mx8m-mini/2457/1 "2020-09-17T08:33:16Z")

</div>

Hi Mender Team,

I was validating and going through the mender update module in i.MX8M Mini EVK. I am following [https://docs.mender.io/artifact-creation/create-a-custom-update-module](https://docs.mender.io/artifact-creation/create-a-custom-update-module) for an application update. I have uploaded the artifact in the hosted server and then I got below error in the Update stage.

“error: update install failed: installer: failed to read and install update: reader: unsupported version: 3”

Can anyone help me with this?

Regards,  
Kunal

---

<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:** [September 17, 2020, 2:06pm UTC](https://hub.mender.io/t/application-update-in-i-mx8m-mini/2457/2 "2020-09-17T14:06:23Z")

</div>

Hi @Kunal, what module type did you create? Do you have an appropriate [update module](https://hub.mender.io/c/update-modules/13) installed in your EVK board to handle the chosen payload type?

What Mender client version do you have running on the target?

What OS/Distro are you running?

Drew

---

<div class="post-metadata">

**Author:** ![Kunal](https://avatars.discourse-cdn.com/v4/letter/k/dec6dc/32.png) [@Kunal](https://hub.mender.io/u/Kunal)\
**Post date:** [September 17, 2020, 2:30pm UTC](https://hub.mender.io/t/application-update-in-i-mx8m-mini/2457/3 "2020-09-17T14:30:29Z")

</div>

Hi @drewmoseley,

I have used this [link](https://docs.mender.io/artifact-creation/create-a-custom-update-module) to create a web-file type module. I have done the setup from this [link](https://hub.mender.io/t/nxp-i-mx-8m-mini-evaluation-kit/659). Do I explicitly need to install the update module after doing the yocto setup?

Below is the mender client version output in my imx8mmevk.  
"root@imx8mmevk:~# mender --version  
INFO[0000] Configuration file does not exist: /var/lib/mender/mender.conf module=config  
INFO[0000] Loaded configuration file: /etc/mender/mender.conf module=config  
INFO[0000] Mender running on partition: /dev/mmcblk1p3 module=main  
1.7.1  
runtime: go1.9.7  
"

Regards,  
Kunal

---

<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:** [September 17, 2020, 3:44pm UTC](https://hub.mender.io/t/application-update-in-i-mx8m-mini/2457/4 "2020-09-17T15:44:30Z")

</div>

Yes, you need to ensure that the `/usr/share/mender/modules/v3/web-file` file exists on your target and is executable.

However, in your case the first issue is that you are using Mender v1.7 which does not have support for Update modules. The sumo branch was released before Mender v2.0 so the default version of Mender in that branch is still 1.7. You need to add the following to your local.conf to build with newer versions:

> PREFERRED\_VERSION\_pn-mender-client = “2.2.1”  
> PREFERRED\_VERSION\_pn-mender-artifact = “3.3.1”  
> PREFERRED\_VERSION\_pn-mender-artifact-native = “3.3.1”

Drew

---

<div class="post-metadata">

**Author:** ![Kunal](https://avatars.discourse-cdn.com/v4/letter/k/dec6dc/32.png) [@Kunal](https://hub.mender.io/u/Kunal)\
**Post date:** [September 21, 2020, 6:22am UTC](https://hub.mender.io/t/application-update-in-i-mx8m-mini/2457/5 "2020-09-21T06:22:37Z")

</div>

Yes, I have already added **/usr/share/mender/modules/v3/web-file** and made it executable as mentioned in mender steps.

Regarding the mender client version, I found that i.MX8M Mini has a `mender_version.bb` recipe file for a mender client. So, I added PREFERRED\_VERSION\_pn-mender = “2.1.2”.

Similarly, for mender-artifact the I added 3.1.1 version, as it is the latest available, I added PREFERRED\_VERSION\_pn-mender-artifact = “3.1.1”.

But while compiling there is an error. I don’t understand why there is a difference of names in mender and mender client and why the compilation is showing error. Below are the error logs that might be helpful.  
"  
ERROR: ExpansionError during parsing /home/ota/mender-imx/sources/meta-mender/meta-mender-core/recipes-mender/mender-artifact/mender-artifact\_git.bb

Traceback (most recent call last):  
File “/home/ota/mender-imx/sources/poky/bitbake/lib/bb/data\_smart.py”, line 412, in DataSmart.expandWithRefs(s="{@mender\_version\_from\_preferred\_version(d, '{SRCPV}’)}", varname=‘PV’):  
try:  
\> s = **expand\_var\_regexp**.sub(varparse.var\_sub, s)  
try:  
File “/home/ota/mender-imx/sources/poky/bitbake/lib/bb/data\_smart.py”, line 111, in VariableParse.var\_sub(match=\<\_sre.SRE\_Match object; span=(45, 53), match=’${SRCPV}’\>):  
else:  
\> var = self.d.getVarFlag(key, “\_content”)  
self.references.add(key)  
File “/home/ota/mender-imx/sources/poky/bitbake/lib/bb/data\_smart.py”, line 794, in DataSmart.getVarFlag(var=‘SRCPV’, flag=’\_content’, expand=True, noweakdefault=False, parsing=False):  
cachename = var + “[” + flag + “]”  
\> value = self.expand(value, cachename)

File “/home/ota/mender-imx/sources/poky/bitbake/lib/bb/data\_smart.py”, line 436, in DataSmart.expand(s=’${@bb.fetch2.get\_srcrev(d)}’, varname=‘SRCPV’):  
def expand(self, s, varname = None):  
\> return self.expandWithRefs(s, varname).value

File “/home/ota/mender-imx/sources/poky/bitbake/lib/bb/data\_smart.py”, line 426, in DataSmart.expandWithRefs(s=’${@bb.fetch2.get\_srcrev(d)}’, varname=‘SRCPV’):  
except Exception as exc:  
\> raise ExpansionError(varname, s, exc) from exc

bb.data\_smart.ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get\_srcrev(d)} which triggered exception FetchError: Fetcher failure: The SRCREV\_FORMAT variable must be set when multiple SCMs are used.  
"

Regards,  
Kunal

---

<div class="post-metadata">

**Author:** ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)\
**Post date:** [September 21, 2020, 6:36am UTC](https://hub.mender.io/t/application-update-in-i-mx8m-mini/2457/6 "2020-09-21T06:36:36Z")

</div>

> [@Kunal](#):
>
> Similarly, for mender-artifact the I added 3.1.1 version, as it is the latest available, I added PREFERRED\_VERSION\_pn-mender-artifact = “3.1.1”.

You need to add `PREFERRED_VERSION_pn-mender-artifact-native = “3.1.1”` as well.

---

<div class="post-metadata">

**Author:** ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)\
**Post date:** [September 21, 2020, 6:38am UTC](https://hub.mender.io/t/application-update-in-i-mx8m-mini/2457/7 "2020-09-21T06:38:23Z")

</div>

Also, make sure the quotes are regular `"` quotes, it looks like here on Mender Hub some fancy `“”` style quotes have been used.

---

<div class="post-metadata">

**Author:** ![Kunal](https://avatars.discourse-cdn.com/v4/letter/k/dec6dc/32.png) [@Kunal](https://hub.mender.io/u/Kunal)\
**Post date:** [September 22, 2020, 10:14am UTC](https://hub.mender.io/t/application-update-in-i-mx8m-mini/2457/8 "2020-09-22T10:14:06Z")

</div>

Yes, Thank you. I was writing the native artifact with a different versions and so is the version difference gives error. I verified a simple application update.

I have more query with partition layout. Why we have a bootloader image in the first partition? I mean updating bootloader is not possible,so why have we kept the binary of bootloader in 1st partition and removed the zImage and dtb from that partition?

Thank you very much in advance.

Regards,  
Kunal

---

<div class="post-metadata">

**Author:** ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)\
**Post date:** [September 23, 2020, 6:32am UTC](https://hub.mender.io/t/application-update-in-i-mx8m-mini/2457/9 "2020-09-23T06:32:03Z")

</div>

Indeed, updating the bootloader is not possible. Mender never updates anything on the 1st partition, that’s why it’s a good place for the bootloader. The kernel, on the other hand, is stored on the dual rootfs partitions, the 2nd and 3rd partitions, and hence can be updated by Mender.

---

<div class="post-metadata">

**Author:** ![Kunal](https://avatars.discourse-cdn.com/v4/letter/k/dec6dc/32.png) [@Kunal](https://hub.mender.io/u/Kunal)\
**Post date:** [September 24, 2020, 9:29am UTC](https://hub.mender.io/t/application-update-in-i-mx8m-mini/2457/10 "2020-09-24T09:29:11Z")

</div>

Understood. But I do believe it is not required to keep them in the first partition. Though it is again design choice. That is okay. I was facing an application update that you resolved earlier and I am thankful to that. So, the issue was version difference for mender client. Does this mean we won’t be able to update the mender client itself using OTA? I saw there is a version file in the artifact which is comparing the version of the mender in workstation with version mender in the device. Is it correct?

Regards,  
Kunal

---

<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:** [September 24, 2020, 9:59am UTC](https://hub.mender.io/t/application-update-in-i-mx8m-mini/2457/11 "2020-09-24T09:59:02Z")

</div>

If you have not already come across this, there is some useful information here on how to plan such upgrades.

> **[Compatibility | Mender documentation](https://docs.mender.io/2.5/overview/compatibility)**
