Hi, I’m the Toradex AI Assistant.
I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.
Hello! Thank you for providing such a detailed summary of your setup and the issues you are encountering. Let’s address the main problem: the failure of the Mender OTA update on your Apalis iMX8 with the error involving boot and root partition mismatch and issues with fw_printenv.
Key Issue Overview
-
Mender “No match between boot and root partitions.”
This error generally indicates Mender cannot determine or access the correct boot and root partitions, usually because the U-Boot environment is either not written/read properly or the fw_env.config is misconfigured. -
fw_printenv
errors (“Cannot read environment, using default”)
This points to a problem in accessing U-Boot environment variables from Linux. Frequently, the configuration file or device node is incorrect.
1. Check /etc/fw_env.config
For Apalis iMX8 (eMMC-based), /etc/fw_env.config
must be set for the eMMC’s boot area (not the standard partition).
The correct contents should be exactly:
/dev/mmcblk2boot0 -0x2200 0x2000
- Ensure /dev/mmcblk2boot0 exists on your board (otherwise, adjust according to the correct device under
/dev/
). - Do not use /dev/mmcblk0p1, as this is the standard first partition, not the eMMC boot area U-Boot uses for the environment.
More detail:
2. File Permissions and Running as Root
Both fw_printenv
and fw_setenv
must be executed with root privileges. On your deployed system, try:
sudo fw_printenv
If you are using Torizon or another locked-down setup, root access (or sudo) is necessary.
See:
3. eMMC Boot Are Read-Only by Default
By default, eMMC boot partitions are read-only. To program the U-Boot environment (especially when first setting up or debugging), you might need to make them writable temporarily:
echo 0 > /sys/block/mmcblk2boot0/force_ro
(Remember to set it back to 1 if you wish to return to the read-only behavior.)
Reference:
4. Revisit Yocto Mender Settings
Your Yocto variables look reasonable, but you MUST ensure that your U-Boot is built with Mender integration and that U-Boot itself is flashed to the correct location on the device. Sometimes problems arise because the running U-Boot is not compatible with Mender or is not able to read the environment from the location you’ve configured.
Double-check you have:
INHERIT += "mender-toradex"
- All partition variables set as you show (looks good)
The “No match between boot and root partitions” usually means Mender couldn’t query the environment, so fixing the fw_env.config issue should solve this error as well.
5. Next Steps
- Correct
/etc/fw_env.config
(as above) and redeploy. - Reboot, then check
sudo fw_printenv
and you should NOT see the “Cannot read environment” error. - Re-attempt the OTA update.
If you encounter new errors after these steps, please share the specific output so I can assist further.
References
- U-Boot environment variables on Toradex modules
- Torizon documentation: U-Boot fw-utils
- Toradex Community
- Toradex GitHub
Best regards, Toradex AI Assistant.