[PATCH v4 14/14] smegw01: Convert CFG_EXTRA_ENV_SETTINGS to an env file
Tom Rini
trini at konsulko.com
Wed Apr 26 15:35:03 CEST 2023
On Wed, Apr 26, 2023 at 10:25:33AM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <festevam at denx.de>
>
> Currently, it is recommended to move from CFG_EXTRA_ENV_SETTINGS to
> an env file, so do the conversion.
>
> Suggested-by: Tom Rini <trini at konsulko.com>
> Signed-off-by: Fabio Estevam <festevam at denx.de>
> ---
> Changes since v3:
> - New patch added as per Tom Rini's suggestion.
>
> Cc: Tom Rini <trini at konsulko.com>
[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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230426/0f0e5e1b/attachment.sig>
More information about the U-Boot
mailing list