Hi James, On 2026-05-11T14:44:31, James Hilliard <[email protected]> wrote: > env: migrate static flags list to Kconfig > > Environment callbacks can already be configured from Kconfig with > CONFIG_ENV_CALLBACK_LIST_STATIC, but static environment flags still > require board headers to define CFG_ENV_FLAGS_LIST_STATIC. > > Add CONFIG_ENV_FLAGS_LIST_STATIC and use it as the only board-provided > static environment flags list. Convert the remaining default-config users > from CFG_ENV_FLAGS_LIST_STATIC to defconfig settings and drop the legacy > header macro from ENV_FLAGS_LIST_STATIC. > > Move the environment flags format documentation out of README and into > the developer environment documentation. Include the format in the > Kconfig help as well. > > This lets boards configure writeable-list policy and type validation > from defconfig without adding a config header solely for env flags. > > Signed-off-by: James Hilliard <[email protected]> > Reviewed-by: Tom Rini <[email protected]> > > README | 45 +----------------------------------- > configs/aristainetos2c_defconfig | 1 + > configs/aristainetos2ccslb_defconfig | 1 + > configs/hmibsc_defconfig | 1 + > configs/imx6q_bosch_acc_defconfig | 1 + > configs/imx8qxp_capricorn.config | 1 + > configs/smegw01_defconfig | 1 + > configs/socrates_defconfig | 1 + > doc/develop/environment.rst | 40 ++++++++++++++++++++++++++++++++ > env/Kconfig | 23 ++++++++++++++++++ > include/configs/aristainetos2.h | 3 --- > include/configs/capricorn-common.h | 13 ----------- > include/configs/hmibsc.h | 4 ---- > include/configs/imx6q-bosch-acc.h | 12 ---------- > include/configs/iot2050.h | 8 ------- > include/configs/smegw01.h | 15 ------------ > include/configs/socrates.h | 2 -- > include/env_flags.h | 6 +---- > 18 files changed, 72 insertions(+), 106 deletions(-)
> diff --git a/include/configs/iot2050.h b/include/configs/iot2050.h > @@ -38,12 +38,4 @@ > func(MMC, mmc, 0) \ > BOOT_TARGET_USB(func) > > -#ifdef CONFIG_ENV_WRITEABLE_LIST > -#define CFG_ENV_FLAGS_LIST_STATIC \ > - "board_uuid:sw,board_name:sw,board_serial:sw,board_a5e:sw," \ > - 'mlfb:sw,fw_version:sw,seboot_version:sw,' \ > - 'm2_manual_config:sw,' \ > - "eth1addr:mw,eth2addr:mw,watchdog_timeout_ms:dw,boot_targets:sw" > -#endif > - Thanks for the clean-up! This one is being silently dropped, i.e. no matching CONFIG_ENV_FLAGS_LIST_STATIC is added to iot2050_defconfig The original commit (08cba536eff 'iot2050: Add CFG_ENV_FLAGS_LIST_STATIC') notes the list "will be needed when CONFIG_ENV_WRITEABLE_LIST is enabled", so it is waiting for the writeable-list to be turned on. You could carry the list over like the other boards, or make a note in the commit message about this, as I suppose the board maintainers can deal with it when needed. > diff --git a/include/configs/smegw01.h b/include/configs/smegw01.h > @@ -22,21 +22,6 @@ > #define EXTRA_BOOTPARAMS > #endif > > -#ifdef CONFIG_SYS_BOOT_LOCKED > -#define EXTRA_ENV_FLAGS > -#else > -#define EXTRA_ENV_FLAGS 'mmcdev:dw,' > -#endif > - > -#define CFG_ENV_FLAGS_LIST_STATIC \ > - 'mmcpart:dw,' \ > - 'mmcpart_committed:dw,' \ > - 'ustate:dw,' \ > - 'bootcount:dw,' \ > - 'bootlimit:dw,' \ > - 'upgrade_available:dw,' \ > - EXTRA_ENV_FLAGS This only captures the CONFIG_SYS_BOOT_LOCKED=y case (the defconfig default). For SYS_BOOT_LOCKED=n the old code added mmcdev:dw, so turning lockdown off via menuconfig silently loses write access to mmcdev under ENV_WRITEABLE_LIST. For now you could just note in the commit message that the unlocked case is no longer supported, perhaps with a follow-up to move the SYS_BOOT_LOCKED dependency to Kconfig (e.g. defaulting CONFIG_ENV_FLAGS_LIST_STATIC on SYS_BOOT_LOCKED). Reviewed-by: Simon Glass <[email protected]> Regards, Simon

