Quick query on "Rocko - Mender 1.6" CONFIG_ENV_SIZE variable

Hi,

AFAIK, The CONFIG_ENV_SIZE value depends on the BOOTENV_SIZE.
I have configured the BOOTENV_SIZE as below in the machine config file:

MENDER_UBOOT_ENV_STORAGE_DEVICE_OFFSET_1 = “0x400000”
MENDER_UBOOT_ENV_STORAGE_DEVICE_OFFSET_2 = “0x800000”
BOOTENV_SIZE = “0x1000”

But, during the Yocto build, I’m getting the below error:

error ‘CONFIG_ENV_SIZE’ define must be equal to bitbake variable ‘BOOTENV_SIZE’ set in U-Boot build recipe.

When I checked the “config_mender_defines.h”, the BOOTENV_SIZE = “0x1000” but, the u-boot header file shows the “#define CONFIG_ENV_SIZE 0x20000

Whatever value I put for the BOOTENV_SIZE, the #define CONFIG_ENV_SIZE remains 0x20000 only.
This is happening only with Mender 1.6 and Rocko. I have a similar set-up with Mender 1.7 and Sumo where this is working as expected.

Any idea why this is happening? I know the default value in mender source for BOOTENV_SIZE is 0x20000 but, not sure how to change it to required one (to change the CONFIG_ENV_SIZE)

Which package fails? u-boot or u-boot-fw-utils?

I’m not sure but, getting both are failed as shown below:

Summary: 2 tasks failed:
/sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-bsp/u-boot/u-boot-imx_2017.03.bb:do_compile
/sources/meta-mender/meta-mender-core/recipes-bsp/u-boot/u-boot-fw-utils-mender-auto-provided_1.0.bb:do_compile

Please let me know more detailed log is required or not.

Can you run:

bitbake u-boot -e | grep ^BOOTENV_SIZE

and

bitbake u-boot-fw-utils -e | grep ^BOOTENV_SIZE

Please see the output below:

$ bitbake u-boot -e | grep ^BOOTENV_SIZE
BOOTENV_SIZE=“0x1000”

$ bitbake u-boot-fw-utils -e | grep ^BOOTENV_SIZE
BOOTENV_SIZE=“0x1000”

Then the problem is probably in your U-boot source as it might not defined to 0x1000

I will check it. But, CONFIG_ENV_SIZE value usually modified by the Mender with BOOTENV_SIZE right?

I will check it. But, CONFIG_ENV_SIZE value usually modified by the Mender with BOOTENV_SIZE right?

Nope, meta-mender does not modify the CONFIG_ENV_SIZE. They just have be equally defined because meta-mender uses this value to perform sanity checks and other calculations.

1 Like

I see…then I will check in the U-boot source. Thank you very much for the help…I will keep you update the progress :slight_smile: