Fw_printenv configuration file for imx8mp-sr-som

Hello,

I’m configuring Rauc for an HummingBoard Pro boad (i.MX8M Plus) under Yocto (scarthgap).
I’m currently facing an issue with fw_printenv which complains with the following message:

root@imx8mp-sr-som:~# fw_printenv 
Cannot read environment, using default
Cannot read default environment from file

Here is my fw_printenv configuration file (copied from meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary/mx8mp-generic-bsp/fw_env.config):

root@imx8mp-sr-som:~# cat /etc/fw_env.config
/dev/mmcblk2boot0	-0x2000		0x2000

I’ve got the same result if I replace /dev/mmcblk2boot0 by /dev/mmcblk2boot1.
Note also that printenv and saveenv work fine in the uboot command line.

I’m pretty new to the u-boot, so I may have forgotten a basic configuration step at some point. I basically did nothing else than using the fw_printenv provided by the BSP and adding my configuration file to /etc/fw_env.config.

Any idea of what could be wrong?
Thanks by advance for your answer!

Hello,

I’m still struck with this problem.
Please can you confirm that fw_printenv should work and give me the content of /etc/fw_env.config?

I finally found the solution in configs/imx8mp_solidrun_defconfig.
The subtle point was to look in the right branch (lf-6.6.52-2.2.0-sr-imx8) of the solidrun’s u-boot repo (as stated in meta-solidrun-arm-imx8/recipes-bsp/u-boot/u-boot-imx_2024.04.bbappend\)…

In this file, man can see:

CONFIG_ENV_SIZE=0x80000
CONFIG_ENV_OFFSET=0x380000
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_MMC_ENV_DEV=1

Which means that the content of /etc/fw_env.config should be:

/dev/mmcblk2    0x380000        0x80000