stm32mp1: configs: Make all boot devices in distro boot conditional
PATCH v3 1/1 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.
---
V2: Drop the _DEVICE from BOOT_TARGET_DEVICE_*
V3: Fix BOOT_TARGET_DEVICES, which was missing the _DEVICE in V2
--- include/configs/stm32mp1.h | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-)
include/configs/stm32mp1.h +28 -6
@@ -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:
Signature · 1 line
2.24.1
PATCH v3 1/1 stm32mp1: configs: Make all boot devices in distro boot conditional
Hi Marek
Quoted 49 lines · Marek Vasut
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 <[email protected]>Cc Patrick Delaunay <[email protected]>Cc Patrice Chotard <[email protected]>---
V2: Drop the_DEVICEfrom BOOT_TARGET_DEVICE_*
V3: FixBOOT_TARGET_DEVICES, which was missing the_DEVICEin V2--- include/configs/stm32mp1.h | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-)include/configs/stm32mp1.h +21
-6@@ -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
include/configs/stm32mp1.h line 131
Quoted 10 lines
include/configs/stm32mp1.h +7
-0+ +#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:
Thanks
PATCH v3 1/1 stm32mp1: configs: Make all boot devices in distro boot conditional
In reply to Marek VasutHi Marek,
Quoted 6 lines
From: Marek Vasut <[email protected]>
Sent: vendredi 10 janvier 2020 01:27Not 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.
Quoted 4 lines
Signed-off-by Marek Vasut <[email protected]>Cc Patrick Delaunay <[email protected]>Cc Patrice Chotard <[email protected]>---
Regards
Patrick
PATCH v3 1/1 stm32mp1: configs: Make all boot devices in distro boot conditional
Quoted 1 line · Patrick DELAUNAY
Hi Marek,
Hi,
Quoted 8 lines
Quoted 6 lines
From: Marek Vasut <[email protected]>
Sent: vendredi 10 janvier 2020 01:27Not 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.
Reviewed-by Patrick Delaunay <[email protected]>
Are you planning to pick those up ?
PATCH v3 1/1 stm32mp1: configs: Make all boot devices in distro boot conditional
Hi
Quoted 16 lines
From: Marek Vasut <[email protected]>
Sent: lundi 13 janvier 2020 11:46
To: Patrick DELAUNAY <[email protected]>; u-boot at lists.denx.de
Cc: Patrice CHOTARD <[email protected]>
Subject: Re: [PATCH V3] stm32mp1: configs: Make all boot devices in distro boot conditional
Importance: HighQuoted 1 line · Patrick DELAUNAY
Hi Marek,
Hi,
Quoted 3 lines
Quoted 3 lines
From: Marek Vasut <[email protected]>
Sent: vendredi 10 janvier 2020 01:27
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
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.
Reviewed-by Patrick Delaunay <[email protected]>Are you planning to pick those up ?
Applied to u-boot-stm32/master, thanks!
Regards
Patrick