Mender integration of STM32MP157C on dunfell

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

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.

1 Like

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 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.

1 Like

Late but I got it working on the Octavo osd32mp1

1 Like

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

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

For the record, kirkstoneis also just about to be finished, see Stm32mp1 Yocto Kirkstone issues

Okay here is the new link. mender stm32mp1 dunfell integration @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.

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.

1 Like