diff options
author | Marek Vasut <marex@denx.de> | 2020-01-10 01:26:54 +0100 |
---|---|---|
committer | Patrick Delaunay <patrick.delaunay@st.com> | 2020-01-17 11:44:42 +0100 |
commit | c3ab0fe6c1f000fe7cbee3b52c61756990b89abc (patch) | |
tree | f89b1ad0ccb2b1d00ea5aae0b43e4dec212240d9 /include | |
parent | e71b9a64a28d16d044d1bceda1a9e69679b2769e (diff) |
stm32mp1: configs: Make all boot devices in distro boot conditional
Not all systems have all the boot devices enabled, e.g. not all systems
have MTD devices and thus do not enable UBI. Make all the boot devices
in the distro bootcmd conditional to avoid failures.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/configs/stm32mp1.h | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/include/configs/stm32mp1.h b/include/configs/stm32mp1.h index d42a7860be..655833428e 100644 --- a/include/configs/stm32mp1.h +++ b/include/configs/stm32mp1.h @@ -98,12 +98,34 @@ #if !defined(CONFIG_SPL_BUILD) -#define BOOT_TARGET_DEVICES(func) \ - func(MMC, mmc, 1) \ - func(UBIFS, ubifs, 0) \ - func(MMC, mmc, 0) \ - func(MMC, mmc, 2) \ - func(PXE, pxe, na) +#ifdef CONFIG_CMD_MMC +#define BOOT_TARGET_MMC0(func) func(MMC, mmc, 0) +#define BOOT_TARGET_MMC1(func) func(MMC, mmc, 1) +#define BOOT_TARGET_MMC2(func) func(MMC, mmc, 2) +#else +#define BOOT_TARGET_MMC0(func) +#define BOOT_TARGET_MMC1(func) +#define BOOT_TARGET_MMC2(func) +#endif + +#ifdef CONFIG_NET +#define BOOT_TARGET_PXE(func) func(PXE, pxe, na) +#else +#define BOOT_TARGET_PXE(func) +#endif + +#ifdef CONFIG_CMD_UBIFS +#define BOOT_TARGET_UBIFS(func) func(UBIFS, ubifs, 0) +#else +#define BOOT_TARGET_UBIFS(func) +#endif + +#define BOOT_TARGET_DEVICES(func) \ + BOOT_TARGET_MMC1(func) \ + BOOT_TARGET_UBIFS(func) \ + BOOT_TARGET_MMC0(func) \ + BOOT_TARGET_MMC2(func) \ + BOOT_TARGET_PXE(func) /* * bootcmd for stm32mp1: |