# Mender integration of STM32MP157C on dunfell

**URL:** <https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829>\
**Category:** General Discussions\
**Created:** [November 13, 2020, 8:40am UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829 "2020-11-13T08:40:31Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ASerr](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@ASerr](https://hub.mender.io/u/ASerr)\
**Post date:** [November 13, 2020, 8:40am UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/1 "2020-11-13T08:40:31Z")

</div>

Hi, @mirzak

we’re trying to use yocto dunfell and mender on a STM32MP157C-DK2

Our ( probably bad ) idea is to replicate the mender-community layer for thud, creating the u-boot patches using devtool.

Now, we can build (obtaining the .mender and the .gptimg files) and start the board. The Mender server recognize the board as a pending device and it’s possible to accept it. But we have some problems with partitions.  
If we use the mender client we get this error:  
“Failed to read the current active partition: No match between boot and root partitions.: exit status 243”

Moreover, if we use fw\_printenv command we get:  
“fw\_printenv cannot read environment using default  
cannot read default environment from file”

So we miss something but we can’t say what.  
Have you any idea?

Thank you

---

<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:** [November 13, 2020, 11:34am UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/2 "2020-11-13T11:34:45Z")

</div>

> [@ASerr](#):
>
> Our ( probably bad ) idea is to replicate the mender-community layer for thud, creating the u-boot patches using devtool.

This is probably a good idea 🙂.

> “fw\_printenv cannot read environment using default  
> cannot read default environment from file”

It seems that you are missing the `/etc/fw_env.config` file. [This](https://github.com/mendersoftware/meta-mender/blob/master/meta-mender-core/recipes-bsp/u-boot/libubootenv_%25.bbappend) should install it, so would look in to why this is not happening.

---

<div class="post-metadata">

**Author:** ![ASerr](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@ASerr](https://hub.mender.io/u/ASerr)\
**Post date:** [November 13, 2020, 12:05pm UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/3 "2020-11-13T12:05:19Z")

</div>

Thanks for the reply @mirzak .

we have 4 files in /etc related to fw\_env :

fw\_env.config (symbolic link to /data/u-boot/fw\_env.config)  
fw\_env.config.mmc  
fw\_env.config.nand  
fw\_env.config.nor

the content of fw\_env.config file in /data/u-boot/ is:

> /dev/mmcblk0 0x800000 0x20000  
> /dev/mmcblk0 0x1000000 0x20000

Maybe the problem is that we have a symbolic link in /etc insted of the real file?  
We aren’t able to undestand if this file is correct. There are two refs to mmcblk0 is this correct?

thank you

---

<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:** [November 13, 2020, 1:00pm UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/4 "2020-11-13T13:00:51Z")

</div>

> [@ASerr](#):
>
> Maybe the problem is that we have a symbolic link in /etc insted of the real file?

This file should be a symbolic link.

> There are two refs to mmcblk0 is this correct?

This is correct, these are redundant environment for robustness.

I am curious, if you can halt U-Boot and share the output of `printenv` to start off.

---

<div class="post-metadata">

**Author:** ![ASerr](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@ASerr](https://hub.mender.io/u/ASerr)\
**Post date:** [November 13, 2020, 2:09pm UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/5 "2020-11-13T14:09:23Z")

</div>

How can i do that? It’s not the same as fw\_printenv command?

---

<div class="post-metadata">

**Author:** ![ASerr](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@ASerr](https://hub.mender.io/u/ASerr)\
**Post date:** [November 16, 2020, 11:01am UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/6 "2020-11-16T11:01:35Z")

</div>

Hi @mirzak,

Here our printenv

> altbootcmd=run bootcmd  
> android\_mmc\_boot=mmc dev ${devnum};run android\_mmc\_splash;run android\_mmc\_fdt;run android\_mmc\_kernel;bootm ${kernel\_addr\_r} - ${fdt\_addr\_r};  
> android\_mmc\_fdt=if part start mmc ${devnum} dt\_${suffix} dt\_start &&part size mmc ${devnum} dt\_${suffix} dt\_size;then mmc read ${dtimg\_addr} ${dt\_start} ${dt\_size};dtimg getindex ${dtimg\_addr} ${board\_id} ${board\_rev} dt\_index;dtimg start ${dtimg\_addr} ${dt\_index} fdt\_addr\_r;fi  
> android\_mmc\_kernel=if part start mmc ${devnum} boot\_${suffix} boot\_start &&part size mmc ${devnum} boot\_${suffix} boot\_size;then mmc read ${kernel\_addr\_r} ${boot\_start} ${boot\_size};part nb mmc ${devnum} system\_${suffix} rootpart\_nb;env set bootargsroot=/dev/mmcblk${devnum}p${rootpart\_nb} androidboot.serialno=${serial#} androidboot.slot\_suffix=_${suffix};fi  
> android\_mmc\_splash=if part start mmc ${devnum} splash splash\_start && part size mmc ${devnum} splash splash\_size;then mmc read ${splashimage} ${splash\_start} ${splash\_size};cls; bmp display ${splashimage} m m;fi  
> arch=arm  
> autoload=no  
> baudrate=115200  
> board=stm32mp1  
> board\_name=stm32mp157c-dk2  
> boot\_a\_script=load ${devtype} ${devnum}:${distro\_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}  
> boot\_device=mmc  
> boot\_efi\_binary=if fdt addr ${fdt\_addr\_r}; then bootefi bootmgr ${fdt\_addr\_r};else bootefi bootmgr ${fdtcontroladdr};fi;load ${devtype} ${devnum}:${distro\_bootpart} ${kernel\_addr\_r} efi/boot/bootarm.efi; if fdt addr ${fdt\_addr\_r}; then bootefi ${kernel\_addr\_r} ${fdt\_addr\_r};else bootefi ${kernel\_addr\_r} ${fdtcontroladdr};fi  
> boot\_extlinux=sysboot ${devtype} ${devnum}:${distro\_bootpart} any ${scriptaddr} ${prefix}${boot\_syslinux\_conf}  
> boot\_instance=0  
> boot\_m4fw=rproc init; rproc load 0 ${m4fw\_addr} ${filesize}; rproc load\_rsc 0 ${m4fw\_addr} ${filesize}; rproc start 0  
> boot\_net\_usb\_start=true  
> boot\_prefixes=/ /boot/  
> boot\_script\_dhcp=boot.scr.uimg  
> boot\_scripts=boot.scr.uimg boot.scr  
> boot\_syslinux\_conf=extlinux/extlinux.conf  
> boot\_targets=mmc0  
> bootargs=root=${mender\_kernel\_root} rootwait rw console=ttySTM0,115200  
> bootcmd=run bootcmd\_stm32mp  
> bootcmd\_android=env set mmc\_boot run android\_mmc\_boot;run bootcmd\_stm32mp  
> bootcmd\_mmc0=devnum=0; run mmc\_boot  
> bootcmd\_mmc1=devnum=1; run mmc\_boot  
> bootcmd\_mmc2=devnum=2; run mmc\_boot  
> bootcmd\_pxe=run boot\_net\_usb\_start; dhcp; if pxe get; then pxe boot; fi  
> bootcmd\_stm32mp=echo “Boot over ${boot\_device}${boot\_instance}!”;if test ${boot\_device} = serial || test ${boot\_device} = usb;then stm32prog ${boot\_device} ${boot\_instance}; else run env\_check;if test ${boot\_device} = mmc;then env set boot\_targets “mmc${boot\_instance}”; fi;if test ${boot\_device} = nand || test ${boot\_device} = spi-nand ;then env set boot\_targets ubifs0; fi;if test ${boot\_device} = nor;then env set boot\_targets mmc0; fi;run distro\_bootcmd;fi;  
> bootcmd\_ubifs0=devnum=0; run ubifs\_boot  
> bootcount=1  
> bootdelay=1  
> bootfstype=fat  
> bootlimit=1  
> cpu=armv7  
> devplist=4  
> distro\_bootcmd=for target in ${boot\_targets}; do run bootcmd_${target}; done  
> dtimg\_addr=0xc4500000  
> efi\_dtb\_prefixes=/ /dtb/ /dtb/current/  
> env\_check=env exists env\_ver || env set env\_ver ${ver};if env info -p -d -q; then env save; fi;if test “$env\_ver” != “$ver”; then echo “\*\*\* Warning: old environment ${env\_ver}”; echo ‘\* set default: env default -a; env save; reset’; echo ‘\* update current: env set env\_ver ${ver}; env save’;fi;  
> env\_ver=U-Boot 2020.01-stm32mp-r1 (Jan 06 2020 - 20:56:31 +0000)  
> ethaddr=00:80:e1:42:75:c6  
> fdt\_addr\_r=0xc4000000  
> fdtcontroladdr=d7aec960  
> fdtfile=stm32mp157c-dk2.dtb  
> fileaddr=c4100000  
> filesize=3ba  
> kernel\_addr\_r=0xc2000000  
> load\_efi\_dtb=load ${devtype} ${devnum}:${distro\_bootpart} ${fdt\_addr\_r} ${prefix}${efi\_fdtfile}  
> loadaddr=0xc2000000  
> m4fw\_addr=0xc2000000  
> m4fw\_name=rproc-m4-fw.elf  
> mender\_altbootcmd=if test ${mender\_boot\_part} = 5; then setenv mender\_boot\_part 6; setenv mender\_boot\_part\_hex 6; else setenv mender\_boot\_part 5; setenv mender\_boot\_part\_hex 5; fi; setenv upgrade\_available 0; saveenv; run mender\_setup  
> mender\_boot\_kernel\_type=bootm  
> mender\_boot\_part=5  
> mender\_boot\_part\_hex=5  
> mender\_check\_saveenv\_canary=1  
> mender\_dtb\_name=stm32mp157c-dk2-a7-examples.dtb  
> mender\_kernel\_name=uImage  
> mender\_saveenv\_canary=1  
> mender\_setup=if test “${mender\_saveenv\_canary}” != “1”; then setenv mender\_saveenv\_canary 1; saveenv; fi; if test “${mender\_pre\_setup\_commands}” != “”; then run mender\_pre\_setup\_commands; fi; if test “${mender\_systemd\_machine\_id}” != “”; then setenv bootargs systemd.machine\_id=${mender\_systemd\_machine\_id} ${bootargs}; fi; setenv mender\_kernel\_root /dev/mmcblk0p${mender\_boot\_part}; if test ${mender\_boot\_part} = 5; then setenv mender\_boot\_part\_name /dev/mmcblk0p5; else setenv mender\_boot\_part\_name /dev/mmcblk0p6; fi; setenv mender\_kernel\_root\_name ${mender\_boot\_part\_name}; setenv mender\_uboot\_root mmc 0:${mender\_boot\_part\_hex}; setenv mender\_uboot\_root\_name ${mender\_boot\_part\_name}; setenv expand\_bootargs “setenv bootargs \”${bootargs}\“”; run expand\_bootargs; setenv expand\_bootargs; if test “${mender\_post\_setup\_commands}” != “”; then run mender\_post\_setup\_commands; fi  
> mender\_try\_to\_recover=if test ${upgrade\_available} = 1; then reset; fi  
> mender\_uboot\_boot=mmc 0:4  
> mender\_uboot\_dev=0  
> mender\_uboot\_if=mmc  
> mmc\_boot=if mmc dev ${devnum}; then devtype=mmc; run scan\_dev\_for\_boot\_part; fi  
> partitions=name=ssbl,size=2M;name=bootfs,size=64MB,bootable;name=vendorfs,size=16M;name=rootfs,size=746M;name=userfs,size=-  
> pxefile\_addr\_r=0xc4200000  
> ramdisk\_addr\_r=0xc4400000  
> scan\_dev\_for\_boot=echo Scanning ${devtype} ${devnum}:${distro\_bootpart}…; for prefix in ${boot\_prefixes}; do run scan\_dev\_for\_extlinux; run scan\_dev\_for\_scripts; done;run scan\_dev\_for\_efi;  
> scan\_dev\_for\_boot\_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro\_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro\_bootpart} bootfstype; then run scan\_dev\_for\_boot; fi; done; setenv devplist  
> scan\_dev\_for\_efi=setenv efi\_fdtfile ${fdtfile}; if test -z “${fdtfile}” -a -n “${soc}”; then setenv efi\_fdtfile ${soc}-${board}${boardver}.dtb; fi; for prefix in ${efi\_dtb\_prefixes}; do if test -e ${devtype} ${devnum}:${distro\_bootpart} ${prefix}${efi\_fdtfile}; then run load\_efi\_dtb; fi;done;if test -e ${devtype} ${devnum}:${distro\_bootpart} efi/boot/bootarm.efi; then echo Found EFI removable media binary efi/boot/bootarm.efi; run boot\_efi\_binary; echo EFI LOAD FAILED: continuing…; fi; setenv efi\_fdtfile  
> scan\_dev\_for\_extlinux=if test -e ${devtype} ${devnum}:${distro\_bootpart} ${prefix}${boot\_syslinux\_conf}; then echo Found ${prefix}${boot\_syslinux\_conf}; run boot\_extlinux; echo SCRIPT FAILED: continuing…; fi  
> scan\_dev\_for\_scripts=for script in ${boot\_scripts}; do if test -e ${devtype} ${devnum}:${distro\_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot\_a\_script; echo SCRIPT FAILED: continuing…; fi; done  
> scan\_m4fw=if test -e ${mender\_kernel\_root} /boot/${m4fw\_name};then echo Found M4 FW $m4fw\_name; if load ${mender\_uboot\_boot} ${m4fw\_addr} /boot/${m4fw\_name}; then run boot\_m4fw; fi; fi;  
> scriptaddr=0xc4100000  
> serial#=0041003D3338510B39303435  
> serverip=192.168.1.1  
> soc=stm32mp  
> splashimage=0xc4300000  
> suffix=a  
> ubifs\_boot=env exists bootubipart || env set bootubipart UBI; env exists bootubivol || env set bootubivol boot; if ubi part ${bootubipart} && ubifsmount ubi${devnum}:${bootubivol}; then devtype=ubi; run scan\_dev\_for\_boot; fi  
> upgrade\_available=0  
> usb\_boot=usb start; if usb dev ${devnum}; then devtype=usb; run scan\_dev\_for\_boot\_part; fi  
> vendor=st  
> ver=U-Boot 2020.01-stm32mp-r1 (Jan 06 2020 - 20:56:31 +0000)  
> Environment size: 7560/8187 bytes

Edit :  
Looking at our boot process we get an error related to a mender service : mender-grow-data  
Going in deep we get the failure:

> root@stm32mp1-disco:~# systemctl status mender-grow-data  
> mender-grow-data.service - Mender service to grow data partition size  
> Loaded: loaded (/lib/systemd/system/mender-grow-data.service; disabled; vendor preset: disabled)  
> Active: failed (Result: exit-code) since Mon 2020-11-16 12:35:13 UTC; 1min 3s ago  
> Process: 425 ExecStart=/usr/bin/mender-client-resize-data-part (code=exited, status=1/FAILURE)  
> Main PID: 425 (code=exited, status=1/FAILURE)  
> Nov 16 12:35:12 stm32mp1-disco systemd[1]: Starting Mender service to grow data partition size…  
> Nov 16 12:35:13 stm32mp1-disco mender-client-resize-data-part[444]: Warning: Partition /dev/mmcblk0p4 is being used. Are you sure you want to continue?  
> Nov 16 12:35:13 stm32mp1-disco systemd[1]: mender-grow-data.service: Main process exited, code=exited, status=1/FAILURE  
> Nov 16 12:35:13 stm32mp1-disco systemd[1]: mender-grow-data.service: Failed with result ‘exit-code’.  
> Nov 16 12:35:13 stm32mp1-disco systemd[1]: Failed to start Mender service to grow data partition size.

Edit 2 :  
We fix the mender-grow-data error changing the partition number from 4 (p4 is our boot partition) to 7 (p7 is our data partition). We aren’t getting anymore the mender-grow-data fail and the data partition size is now 4Gb instead of 1Gb.  
However we still have the real problem with mender and fw\_env.

Hope this can help us,  
Thank you

---

<div class="post-metadata">

**Author:** ![ASerr](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@ASerr](https://hub.mender.io/u/ASerr)\
**Post date:** [November 19, 2020, 2:45pm UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/7 "2020-11-19T14:45:50Z")

</div>

Hi @mirzak,  
have you any idea for our problem? We are literally stucked

Thank You

---

<div class="post-metadata">

**Author:** ![ASerr](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@ASerr](https://hub.mender.io/u/ASerr)\
**Post date:** [December 4, 2020, 4:18pm UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/8 "2020-12-04T16:18:09Z")

</div>

Hi @mirzak,

we managed to get fw\_printenv correctly working.

However the updated fails for : Expected “upgrade\_available” flag to be true but it was false. Either the switch to the new partition was unsuccessful, or the bootloader rolled back

This is the full log :

> 2020-12-04 15:25:56 +0000 UTC info: Running Mender client version: 2.4.0  
> 2020-12-04 15:25:57 +0000 UTC info: State transition: update-fetch [Download\_Enter] → update-store [Download\_Enter]  
> 2020-12-04 15:25:57 +0000 UTC info: 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  
> 2020-12-04 15:25:57 +0000 UTC info: Installer: authenticated digital signature of artifact  
> 2020-12-04 15:25:57 +0000 UTC info: Opening device “/dev/mmcblk0p6” for writing  
> 2020-12-04 15:25:57 +0000 UTC info: Native sector size of block device /dev/mmcblk0p6 is 512 bytes. Mender will write in chunks of 1048576 bytes  
> 2020-12-04 16:03:05 +0000 UTC info: All bytes were successfully written to the new partition  
> 2020-12-04 16:03:05 +0000 UTC info: The optimized block-device writer wrote a total of 5112 frames, where 1010 frames did need to be rewritten (i.e., skipped)  
> 2020-12-04 16:03:05 +0000 UTC info: Wrote 5360316416/5360316416 bytes to the inactive partition  
> 2020-12-04 16:03:06 +0000 UTC info: State transition: update-store [Download\_Enter] → update-after-store [Download\_Leave]  
> 2020-12-04 16:03:06 +0000 UTC info: State transition: update-after-store [Download\_Leave] → update-install [ArtifactInstall]  
> 2020-12-04 16:03:06 +0000 UTC info: Enabling partition with new image installed to be a boot candidate: 6  
> 2020-12-04 16:03:06 +0000 UTC info: State transition: update-install [ArtifactInstall] → reboot [ArtifactReboot\_Enter]  
> 2020-12-04 16:03:07 +0000 UTC info: Rebooting device(s)  
> 2020-12-04 16:03:07 +0000 UTC info: Mender rebooting from active partition: /dev/mmcblk0p5  
> 2020-12-04 16:05:38 +0000 UTC info: Running Mender client version: 2.4.0  
> 2020-12-04 16:05:38 +0000 UTC info: 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  
> 2020-12-04 16:05:38 +0000 UTC info: State transition: init [none] → after-reboot [ArtifactReboot\_Leave]  
> 2020-12-04 16:05:38 +0000 UTC error: transient error: Reboot to the new update failed. Expected “upgrade\_available” flag to be true but it was false. Either the switch to the new partition was unsuccessful, or the bootloader rolled back  
> 2020-12-04 16:05:38 +0000 UTC info: State transition: after-reboot [ArtifactReboot\_Leave] → rollback [ArtifactRollback]  
> 2020-12-04 16:05:38 +0000 UTC info: Performing rollback  
> 2020-12-04 16:05:38 +0000 UTC info: State transition: rollback [ArtifactRollback] → rollback-reboot [ArtifactRollbackReboot\_Enter]  
> 2020-12-04 16:05:38 +0000 UTC info: Rebooting device(s) after rollback  
> 2020-12-04 16:05:38 +0000 UTC info: Mender rebooting from inactive partition: /dev/mmcblk0p5  
> 2020-12-04 16:08:09 +0000 UTC info: Running Mender client version: 2.4.0  
> 2020-12-04 16:08:09 +0000 UTC info: Mender shut down in state: rollback-reboot  
> 2020-12-04 16:08:09 +0000 UTC info: 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  
> 2020-12-04 16:08:09 +0000 UTC info: State transition: init [none] → verify-rollback-reboot [ArtifactRollbackReboot\_Leave]  
> 2020-12-04 16:08:09 +0000 UTC info: State transition: verify-rollback-reboot [ArtifactRollbackReboot\_Leave] → after-rollback-reboot [ArtifactRollbackReboot\_Leave]  
> 2020-12-04 16:08:09 +0000 UTC info: State transition: after-rollback-reboot [ArtifactRollbackReboot\_Leave] → update-error [ArtifactFailure]  
> 2020-12-04 16:08:09 +0000 UTC info: State transition: update-error [ArtifactFailure] → cleanup [Error]  
> 2020-12-04 16:08:09 +0000 UTC info: State transition: cleanup [Error] → update-status-report [none]

Any idea?

Thank you

---

<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:37am UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/9 "2021-02-20T00:37:12Z")

</div>

Hello @ASerr @mirzak

I experience the same issue on Raspberry PI CM3. Was reported at [Mender with Yocto, RPI3 and No match between root & boot partitions - #4 by joelguittet](https://hub.mender.io/t/mender-with-yocto-rpi3-and-no-match-between-root-boot-partitions/3053/4).

@ASerr maybe you find a solution since December ?

Regards,  
Joel

---

<div class="post-metadata">

**Author:** ![ssepulveda](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ssepulveda/32/1077_2.png) [@ssepulveda](https://hub.mender.io/u/ssepulveda)\
**Post date:** [March 3, 2021, 3:38pm UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/10 "2021-03-03T15:38:22Z")

</div>

@ASerr

could you share how did you fix fw\_printenv issue ?

---

<div class="post-metadata">

**Author:** ![lizziemac](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lizziemac/32/691_2.png) [@lizziemac](https://hub.mender.io/u/lizziemac)\
**Post date:** [June 1, 2021, 5:59pm UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/12 "2021-06-01T17:59:38Z")

</div>

I’m also seeing the fw\_printenv issue

---

<div class="post-metadata">

**Author:** ![lizziemac](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lizziemac/32/691_2.png) [@lizziemac](https://hub.mender.io/u/lizziemac)\
**Post date:** [June 2, 2021, 3:29pm UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/13 "2021-06-02T15:29:33Z")

</div>

If anyone is curious, I made a [fork of meta-mender-community](https://github.com/lizziemac/meta-mender-community) that has all of the changes I made in order to get as far as the fw\_printenv bug mentioned above. You should be able to follow the instructions in the parent thread but slightly modified for Dunfell:

**Download OpenSTLinux for Dunfell, per [this wiki](https://wiki.st.com/stm32mpu/wiki/STM32MP1_Distribution_Package#Installing_the_OpenSTLinux_distribution):**

> repo init -u [GitHub - STMicroelectronics/oe-manifest: oe-manifest](https://github.com/STMicroelectronics/oe-manifest.git) -b refs/tags/openstlinux-5.10-dunfell-mp1-21-03-31

**Download Manifest for meta-mender-st-stm32mp from my fork:**

> wget --directory-prefix .repo/manifests [https://raw.githubusercontent.com/lizziemac/meta-mender-community/dunfell-stm32mp/meta-mender-st-stm32mp/scripts/stm32mp-mender.xml](https://raw.githubusercontent.com/lizziemac/meta-mender-community/dunfell-stm32mp/meta-mender-st-stm32mp/scripts/stm32mp-mender.xml)  
> instead of the original.

**Modify OpenSTLinux Configuration Files**

1. Diff the conf files in the Mender-generated `build` directory versus the conf files in the OpenSTLinux-generated `build-openstlinuxweston-stm32mp1` directory.
2. Apply the Mender differences to the OpenSTLinux conf files. For me, I took lines **73-75** of `bblayers.conf`, as well as everything after `ACCEPT_EULA_stm32mp1= "1"` of `local.conf` and copy/pasted them over to the ST generated conf directories.

@mirzak I know it’s been a while since you were mentioned in this thread, but I was curious if you had any further insight on the fw\_printenv/“Failed to read the current active partition: No match between boot and root partitions.: exit status 243” issue(s).

**EDIT: my branch was also modified for 157D-DK1 but it should be relatively straightforward to change to 157C-EV1 or others**

---

<div class="post-metadata">

**Author:** ![lizziemac](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lizziemac/32/691_2.png) [@lizziemac](https://hub.mender.io/u/lizziemac)\
**Post date:** [June 16, 2021, 2:16pm UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/14 "2021-06-16T14:16:23Z")

</div>

@drewmoseley any guidance on who I could ask about the above/any insight?

---

<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:** [June 16, 2021, 2:24pm UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/15 "2021-06-16T14:24:57Z")

</div>

Honestly you probably have the most experience of anyone with this platform. We did the initial port but then it doesn’t seem to be used. That error is generally an issue with the u-boot environment but beyond that, it’s hard to say.

Drew

---

<div class="post-metadata">

**Author:** ![lizziemac](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lizziemac/32/691_2.png) [@lizziemac](https://hub.mender.io/u/lizziemac)\
**Post date:** [June 16, 2021, 2:26pm UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/16 "2021-06-16T14:26:44Z")

</div>

thanks for the honesty, I’ll keep digging then. I appreciate the quick response!

---

<div class="post-metadata">

**Author:** ![grahas](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/grahas/32/1428_2.png) [@grahas](https://hub.mender.io/u/grahas)\
**Post date:** [November 16, 2021, 9:05pm UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/17 "2021-11-16T21:05:13Z")

</div>

@lizziemac Did you end up solving this? Whats the status of your fork?

---

<div class="post-metadata">

**Author:** ![lizziemac](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lizziemac/32/691_2.png) [@lizziemac](https://hub.mender.io/u/lizziemac)\
**Post date:** [November 17, 2021, 2:05pm UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/18 "2021-11-17T14:05:32Z")

</div>

I unfortunately did not end up solving this, I transitioned teams at my job and no longer had to pursue this. The fork as it is currently should get you as far as I got with it as of June 2nd. Sorry I can’t be of more help!

---

<div class="post-metadata">

**Author:** ![grahas](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/grahas/32/1428_2.png) [@grahas](https://hub.mender.io/u/grahas)\
**Post date:** [December 9, 2021, 7:41pm UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/19 "2021-12-09T19:41:37Z")

</div>

Ok, I’ll be working on completing lizziemac’s work to get the stm32mp1 working with Yocto (dunfell) and Mender.

---

<div class="post-metadata">

**Author:** ![m10](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@m10](https://hub.mender.io/u/m10)\
**Post date:** [January 11, 2022, 5:17pm UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/20 "2022-01-11T17:17:20Z")

</div>

I am very interested to hear about your progress @grahas. Did you get it working? I would like to get Mender going with a custom Yocto for a custom board with the STM32MP153C based Octavo SIP.

---

<div class="post-metadata">

**Author:** ![grahas](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/grahas/32/1428_2.png) [@grahas](https://hub.mender.io/u/grahas)\
**Post date:** [January 11, 2022, 8:28pm UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/21 "2022-01-11T20:28:00Z")

</div>

Kind of not really, I got the whole thing to build but I got stuck on creating the final gpt image with WIC, it kept crashing for me. I’m still working on it but I am focused on another higher priority project right now. Once I complete it I’ll be back to working on the Yocto port. We are also working on getting it to work with the Octavo based SIP but, the DK2 and the Seed SoM. I can give the specific build issues I am having if you think you can help fix them.

[Next page](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829.md?page=2)
