I’m working on an update for the mender tegra port which will allow users to specify larger rootfs sizes. The tegra platform has a very specific and unique flash layout, with a bunch of reserved flash sectors at the beginning of the part, meaning the u-boot environment is farther than it is on probably most/all platforms.
While working on this update I noticed that if I set my rootfs larger than a certain size the integration checklist started failing. I noticed the transition was at offset 0xFFFFFFFF (sizeof uint32). Here’s an example of the /etc/fw_env.confg
/dev/mmcblk0 0x11f129000 0x20000
/dev/mmcblk0 0x11f149000 0x20000
If I write a variable in u-boot, then attempt to read it with fw_printenv in Linux I can’t see the variable value. fw_setenv tells me the environment is corrupt. If I remove the leading 1 and make the address 0x1f129000 everything works. So it appears u-boot is writing the variable to the wrong offset.
I’ve veified the values are getting set correctly in u-boot and u-boot-fw-utils recipe
dan@dan-ubuntu:~/build$ bitbake -e u-boot | grep ^MENDER_UBOOT_ENV_STORAGE_DEVICE_OFFSET_1=
My guess is the MENDER_UBOOT_ENV_STORAGE_DEVICE_OFFSET_1/2 variables need a ULL suffix to ensure they are treated as 64 bit values. However my first attempt to address didn’t do the trick. I’ll take another look tomorrow but I’m curious if anyone has other suggestions about how to solve this.