On Wed, Apr 26, 2023 at 10:25:33AM -0300, Fabio Estevam wrote: > From: Fabio Estevam <[email protected]> > > Currently, it is recommended to move from CFG_EXTRA_ENV_SETTINGS to > an env file, so do the conversion. > > Suggested-by: Tom Rini <[email protected]> > Signed-off-by: Fabio Estevam <[email protected]> > --- > Changes since v3: > - New patch added as per Tom Rini's suggestion. > > Cc: Tom Rini <[email protected]> [snip] > diff --git a/include/configs/smegw01.h b/include/configs/smegw01.h > index 6f373973ab84..d1c442577478 100644 > --- a/include/configs/smegw01.h > +++ b/include/configs/smegw01.h > @@ -24,19 +24,17 @@ > > #ifdef CONFIG_SYS_BOOT_LOCKED > #define EXTRA_ENV_FLAGS > -#define SETUP_BOOT_MENU "setup_boot_menu=setenv bootmenu_0 eMMC=run > bootcmd\0" > +#define SETUP_BOOT_MENU setup_boot_menu=setenv bootmenu_0 eMMC=run bootcmd > #else > #define EXTRA_ENV_FLAGS "mmcdev:dw," > -#define SETUP_BOOT_MENU "setup_boot_menu=" \ > - "if test \"${mmcdev}\" = 1; then " \ > - "setenv emmc_priority 0;" \ > - "setenv sd_priority 1;" \ > - "else " \ > - "setenv emmc_priority 1;" \ > - "setenv sd_priority 0;" \ > - "fi;" \ > - "setenv bootmenu_${emmc_priority} eMMC=run boot_emmc;" \ > - "setenv bootmenu_${sd_priority} SD=run boot_sd;\0" > +#define SETUP_BOOT_MENU setup_boot_menu= \ > + if test "${mmcdev}" = 1; then \ > + setenv emmc_priority 0; \ > + setenv sd_priority 1; \ > + else setenv emmc_priority 1; \ > + setenv sd_priority 0; \ > + fi; \ > + setenv bootmenu_${emmc_priority} eMMC=run > boot_emmc;setenv bootmenu_${sd_priority} SD=run boot_sd; > #endif
We can define SETUP_BOOT_MENU in the .env file too, it still gets the preprocessor (and will make eventual removal of board.h files easier). Thanks! -- Tom
signature.asc
Description: PGP signature

