# 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:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![bbeck](https://avatars.discourse-cdn.com/v4/letter/b/e95f7d/32.png) [@bbeck](https://hub.mender.io/u/bbeck)\
**Post date:** [April 26, 2022, 6:02pm UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/22 "2022-04-26T18:02:32Z")

</div>

@grahas Can you share how/what patches you generated to get this going on Dunfell? I am also working with the SeeedSom. Thanks.

---

<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:** [April 27, 2022, 1:23am UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/23 "2022-04-27T01:23:37Z")

</div>

Yes, I am working on getting our device tree configured for all our peripherals and what not, I don’t have a patch for it yet but I’ll be working on it after I get this done. I’ll probably have it in a few months.

---

<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:** [September 29, 2022, 1:00am UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/24 "2022-09-29T01:00:22Z")

</div>

I completed the other projects I was working on and am back on this one. If anyone wants to work on this together to create a community release of mender for stm32mp1 with dunfel that would be really helpful. I made a discord server here [mender stm32mp1 dunfell integration](https://discord.gg/CjyejhJX) for anyone that is also working on it. I am going to be trying to get it working on with the octavo osd32mp1 as well.

---

<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:** [October 25, 2022, 7:50pm UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/25 "2022-10-25T19:50:09Z")

</div>

Late but I got it working on the Octavo osd32mp1

---

<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:** [October 25, 2022, 7:55pm UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/26 "2022-10-25T19:55:37Z")

</div>

looks like the discord invite expired - I’d be curious to see the final result!

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [October 25, 2022, 8:04pm UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/27 "2022-10-25T20:04:35Z")

</div>

@grahas is the current state somewhere visible, or even better, plan to submit a PR?

For the record, `kirkstone`is also just about to be finished, see [Stm32mp1 Yocto Kirkstone issues](https://hub.mender.io/t/stm32mp1-yocto-kirkstone-issues/5331)

---

<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:** [October 25, 2022, 8:22pm UTC](https://hub.mender.io/t/mender-integration-of-stm32mp157c-on-dunfell/2829/28 "2022-10-25T20:22:14Z")

</div>

Okay here is the new link. [mender stm32mp1 dunfell integration](https://discord.gg/xWfNTEnZ) @lizziemac I think yours was actually really close to working. The issue with locating the uboot enviroment was with what you had in for the gptimage and the uboot offset variables. My current branch is kinda hardcoded to my board so I’ll probably need to spend time to get that removed. idk what the uboot partition is for but its like 20 somthing mb and I ended up deleting it and adding the uboot env to the end of FIP. FIP is allocated 4MB but only takes one. So I have the last 16K for uboot env information. I can try to get a PR for dunfel but it might take me a bit to clean everything up and get some time to do it.

```auto
Uboot defconfig
---------
CONFIG_ENV_OFFSET=0x480400
CONFIG_ENV_OFFSET_REDUND=0x482400

local.conf
---------
# Maps to CONFIG_ENV_OFFSET 0x480400
# Maps to CONFIG_ENV_OFFSET_REDUND 0x486400 
MENDER_UBOOT_ENV_STORAGE_DEVICE_OFFSET_1 = "4719616"
MENDER_UBOOT_ENV_STORAGE_DEVICE_OFFSET_2 = "4727808"

stm32mp-gptimg.bbclass
---------
    cat >> "$wks" <<EOF
part fsbl1 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fsbl1 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/tf-a-stm32mp157c-osd32mp1-system-controller-sdcard.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K --align 17
part fsbl2 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fsbl2 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/tf-a-stm32mp157c-osd32mp1-system-controller-sdcard.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K
part fip --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fip --sourceparams="file=${DEPLOY_DIR_IMAGE}/fip/fip-stm32mp157c-osd32mp1-system-controller-trusted.bin" --ondisk mmcblk --part-type 0x8301 --fixed-size 4096K
part --source rootfs --rootfs-dir ${WORKDIR}/bootfs.${BB_CURRENTTASK} --ondisk "$ondisk_dev" --fstype=vfat --label boot --align $alignment_kb --fixed-size ${MENDER_BOOT_PART_SIZE_MB} --active $boot_part_params
part --source rootfs --ondisk "$ondisk_dev" --fstype=${ARTIFACTIMG_FSTYPE} --label primary --align $alignment_kb --fixed-size ${MENDER_CALC_ROOTFS_SIZE}k $exclude_path_options
part --source rootfs --ondisk "$ondisk_dev" --fstype=${ARTIFACTIMG_FSTYPE} --label secondary --align $alignment_kb --fixed-size ${MENDER_CALC_ROOTFS_SIZE}k $exclude_path_options
part --source rootfs --rootfs-dir ${IMAGE_ROOTFS}/data --ondisk "$ondisk_dev" --fstype=${ARTIFACTIMG_FSTYPE} --label data --align $alignment_kb --fixed-size ${MENDER_DATA_PART_SIZE_MB}
bootloader --ptable gpt
EOF

```

also there was a something wierd with my uboot where I needed to do a bitbake -c clean u-boot-stm32mp && bitbake u-boot-stm32mp in order to get changes to take effect. I tossed the uboot partition that was using the uboot.env file. Hex edit shows its just a block of zeros. Other issues might exist but I think that is a solution for the fw\_printenv.

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