From: Patrice CHOTARD <patrice.chotard@st.com>
To: u-boot@lists.denx.de
Subject: [PATCH V3] stm32mp1: configs: Make all boot devices in distro boot conditional
Date: Fri, 10 Jan 2020 08:39:01 +0000 [thread overview]
Message-ID: <257ffa00-fd54-3fd1-688c-417c0534ab7e@st.com> (raw)
In-Reply-To: <20200110002654.97561-1-marex@denx.de>
Hi Marek
On 1/10/20 1:26 AM, Marek Vasut wrote:
> 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>
> ---
> 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(-)
>
> 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:
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Thanks
next prev parent reply other threads:[~2020-01-10 8:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-10 0:26 [PATCH V3] stm32mp1: configs: Make all boot devices in distro boot conditional Marek Vasut
2020-01-10 8:39 ` Patrice CHOTARD [this message]
2020-01-13 10:44 ` Patrick DELAUNAY
2020-01-13 10:46 ` Marek Vasut
2020-01-17 12:42 ` Patrick DELAUNAY
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=257ffa00-fd54-3fd1-688c-417c0534ab7e@st.com \
--to=patrice.chotard@st.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.