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.