U-boot env issues on rockchip

Hi,

I’m integrating mender for radxa cm3 board. I’ve patches u-boot to change u-boot env offset + enable redundant env. I’m using scarthgap release (u-boot 2024.01) and I’ve also tried u-boot 2024.10 issue is same.

When I set some env in u-boot and check it in userspace env is there and have proper value. When set env in userspace using fw_setenv and check it in u-boot env is also there. But when perfor mupdate using mender-update is still boots from old partition even if before reboot I print env and it’s set to new root partition. In u-boot it’s still old one. I did hexdump of env + redundant env and when I perform mender update only redundant env is written and not “normal” env. fw_env.config point to both env. Any ideas what should I check or what am I doing wrong?

Thanks and BR,

marek

Hi @MarekBelisko,

So condensing it, the situation is that using fw_setenv does only update the redundant env, but not the primary one, right?
It’s definitely not something I have witnessed yet. Have you triple checked that the addresses of the primary env are correct, and that there is no secondary env location configured?
The next thing then would probably be strace-ing fw_setenv to find out why it doesn’t update primary, or check if it has a verbose mode.

Greetz,
Josef