[PATCH] imx9: Improve boot device auto-selection

Fabio Estevam festevam at gmail.com
Fri Nov 1 13:30:26 CET 2024


On Fri, Nov 1, 2024 at 7:56 AM Szőke Benjamin <egyszeregy at freemail.hu> wrote:

> If both CONFIG_ENV_IS_IN_MMC=y and CONFIG_ENV_IS_NOWHERE=y are in the config,
> CONFIG_ENV_IS_IN_MMC=y will be overrideing default CONFIG_ENV_IS_NOWHERE
> settings, so in imx9 defconfig it is useless to use both of them.
>
> In my board i can use CONFIG_ENV_IS_NOWHERE=y without CONFIG_ENV_IS_IN_MMC=y in
> imX93 EVK board but i needed to make this patch in imx9/soc.c and imx93_evk.c
> source files imx9 to get it work.
>
> It will not break any rules. In this boot mode selection it just a simple
> process to set "mmcdev" and "mmcroot" according your actual MMC device IDs from
> boot switches states. It never be able to break any rules for UUU booting in
> Serial download mode because you have to use manual commands from UUU script
> which will never use this mmc variables.
> https://elixir.bootlin.com/u-boot/v2024.10/source/board/congatec/common/mmc.c#L41
>
> Goal in my patch to able to use the boot mode autodecetion in case of use only
> CONFIG_ENV_IS_NOWHERE=y option (without CONFIG_ENV_IS_IN_MMC). It works for me.
> Please sit down, put your NXP board i your desk and try it, then analyse how
> well works for you also.

It would help to put some of the details you add above into the commit log.

There are checkpatch errors in your patch:

$ ./scripts/checkpatch.pl
~/Downloads/imx9-Improve-boot-device-auto-selection.patch
WARNING: Use 'if (IS_ENABLED(CONFIG...))' instead of '#if or #ifdef'
where possible
#121: FILE: arch/arm/mach-imx/imx9/soc.c:45:
+#if CONFIG_IS_ENABLED(ENV_IS_IN_MMC) || CONFIG_IS_ENABLED(ENV_IS_NOWHERE)

WARNING: Use 'if (IS_ENABLED(CONFIG...))' instead of '#if or #ifdef'
where possible
#127: FILE: arch/arm/mach-imx/imx9/soc.c:51:
+#ifndef CONFIG_SYS_MMC_ENV_DEV

ERROR: All CONFIG symbols are managed by Kconfig
#128: FILE: arch/arm/mach-imx/imx9/soc.c:52:
+#define CONFIG_SYS_MMC_ENV_DEV 0

WARNING: Use 'if (IS_ENABLED(CONFIG...))' instead of '#if or #ifdef'
where possible
#143: FILE: board/freescale/imx93_evk/imx93_evk.c:61:
+#if CONFIG_IS_ENABLED(ENV_IS_IN_MMC) || CONFIG_IS_ENABLED(ENV_IS_NOWHERE)

ERROR: All CONFIG symbols are managed by Kconfig
#157: FILE: include/configs/imx93_evk.h:32:
+#define CONFIG_SYS_MMC_ENV_DEV 0

total: 2 errors, 3 warnings, 0 checks, 37 lines checked


More information about the U-Boot mailing list