Hello,
I am facing an issue with OTA updates via Mender on a custom Yocto image for the Verdin iMX8MP (branch scratchgap ).
Error observed in Mender:
2025-11-08 14:41:13.639 +0000 UTC info: Running Mender client 5.0.2
2025-11-08 14:41:13.64 +0000 UTC info: Deployment with ID 2d57a34a-568c-4337-9f62-b4d775b6e2e5 started.
2025-11-08 14:41:13.85 +0000 UTC info: Installing artifact...
2025-11-08 14:41:14.026 +0000 UTC info: Update Module output (stderr): Cannot read environment, using default
2025-11-08 14:41:14.026 +0000 UTC info: Update Module output (stderr): Cannot read default environment from file
2025-11-08 14:41:14.027 +0000 UTC error: Process returned non-zero exit status: Download: Update Module returned non-zero status: Process exited with status 243
2025-11-08 14:41:14.028 +0000 UTC error: Operation canceled: GET https://s3.docker.mender.io/mender/ac767bfa-9985-4c91-8874-6f00ccfdacaf?... HTTP request cancelled
The update fails with an error related to reading the U-Boot environment:
Cannot read environment, using default.
Observations on the system:
- Content of
/etc/fw_env.config:
/dev/mmcblk1 0x800000 0x20000
/dev/mmcblk1 0x1000000 0x20000
- The command
fw_printenv -c /etc/fw_env.configreturns:
Cannot read environment, using default
Cannot read default environment from file
- Direct reading of the supposed environment storage zones on
/dev/mmcblk1shows blocks filled with zeros, meaning no valid environment at these addresses:
$ dd if=/dev/mmcblk1 bs=1 skip=$((0x800000)) count=$((0x20000)) | hexdump -C | head -n 40
# all bytes 0x00
In the U-Boot boot logs:
Loading Environment from MMC... Reading from MMC2... OK
mmc1 is current device
Scanning mmc 11...
Found U-Boot script boot.scr ...
This indicates that the U-Boot environment is actually loaded from MMC2 (/dev/mmcblk2), while the current fw_env.config points to MMC1 (/dev/mmcblk1).
Problematic question:
- How to precisely identify the correct location of the U-Boot environment on the Verdin iMX8MP hardware?
- How to adjust the configuration so that
fw_printenvand Mender point to this valid environment area? - What are the recommendations to verify or initialize this environment so that Mender OTA updates function without errors?
Context:
I am building a custom Yocto image based on the branche scarthgap for the Verdin iMX8MP. I am trying to implement and test OTA updates through Mender. The Mender client works but updates always fail due to an error reading the U-Boot environment.
Thanks in advance for your advice and help!