All of lore.kernel.org
 help / color / mirror / Atom feed
From: Troy Kisky <troykiskyboundary@gmail.com>
To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de
Cc: gary.bisson@lairdconnect.com,
	"Troy Kisky" <troykiskyboundary@gmail.com>,
	"Marek Vasut" <marex@denx.de>,
	"Matwey V. Kornilov" <matwey.kornilov@gmail.com>,
	"Pali Rohár" <pali@kernel.org>,
	"Peter Hoyes" <Peter.Hoyes@arm.com>
Subject: [PATCH v1 10/24] config_distro_bootcmd: remove booting environment variables from SPL environment
Date: Tue, 21 Feb 2023 17:38:07 -0800	[thread overview]
Message-ID: <20230222013821.1144691-11-troykiskyboundary@gmail.com> (raw)
In-Reply-To: <20230222013821.1144691-1-troykiskyboundary@gmail.com>

SPL environments don't need command that they can never use.
Avoid errors with CONFIG_IS_ENABLED conversions by skipping them now.

Signed-off-by: Troy Kisky <troykiskyboundary@gmail.com>
---

 include/config_distro_bootcmd.h | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index 9d2a225e7eb..2a136b96a6d 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -35,11 +35,15 @@
 	#devtypel "_boot=" \
 	BOOTENV_SHARED_BLKDEV_BODY(devtypel)
 
+#define BOOTENV_DEV_BLKDEV_NONE(devtypeu, devtypel, instance)
+
 #define BOOTENV_DEV_BLKDEV(devtypeu, devtypel, instance) \
 	"bootcmd_" #devtypel #instance "=" \
 		"devnum=" #instance "; " \
 		"run " #devtypel "_boot\0"
 
+#define BOOTENV_DEV_NAME_BLKDEV_NONE(devtypeu, devtypel, instance)
+
 #define BOOTENV_DEV_NAME_BLKDEV(devtypeu, devtypel, instance) \
 	#devtypel #instance " "
 
@@ -59,6 +63,10 @@
 #define BOOTENV_SHARED_MMC	BOOTENV_SHARED_BLKDEV(mmc)
 #define BOOTENV_DEV_MMC		BOOTENV_DEV_BLKDEV
 #define BOOTENV_DEV_NAME_MMC	BOOTENV_DEV_NAME_BLKDEV
+#elif defined(CONFIG_SPL_BUILD)
+#define BOOTENV_SHARED_MMC
+#define BOOTENV_DEV_MMC		BOOTENV_DEV_BLKDEV_NONE
+#define BOOTENV_DEV_NAME_MMC	BOOTENV_DEV_NAME_BLKDEV_NONE
 #else
 #define BOOTENV_SHARED_MMC
 #define BOOTENV_DEV_MMC \
@@ -190,6 +198,10 @@
 #define BOOTENV_SHARED_SATA	BOOTENV_SHARED_BLKDEV(sata)
 #define BOOTENV_DEV_SATA	BOOTENV_DEV_BLKDEV
 #define BOOTENV_DEV_NAME_SATA	BOOTENV_DEV_NAME_BLKDEV
+#elif defined(CONFIG_SPL_BUILD)
+#define BOOTENV_SHARED_SATA
+#define BOOTENV_DEV_SATA	BOOTENV_DEV_BLKDEV_NONE
+#define BOOTENV_DEV_NAME_SATA	BOOTENV_DEV_NAME_BLKDEV_NONE
 #else
 #define BOOTENV_SHARED_SATA
 #define BOOTENV_DEV_SATA \
@@ -293,6 +305,11 @@
 		BOOTENV_SHARED_BLKDEV_BODY(usb)
 #define BOOTENV_DEV_USB		BOOTENV_DEV_BLKDEV
 #define BOOTENV_DEV_NAME_USB	BOOTENV_DEV_NAME_BLKDEV
+#elif defined(CONFIG_SPL_BUILD)
+#define BOOTENV_RUN_NET_USB_START
+#define BOOTENV_SHARED_USB
+#define BOOTENV_DEV_USB		BOOTENV_DEV_BLKDEV_NONE
+#define BOOTENV_DEV_NAME_USB	BOOTENV_DEV_NAME_BLKDEV_NONE
 #else
 #define BOOTENV_RUN_NET_USB_START
 #define BOOTENV_SHARED_USB
@@ -395,6 +412,9 @@
 		"\0"
 #define BOOTENV_DEV_NAME_DHCP(devtypeu, devtypel, instance) \
 	"dhcp "
+#elif defined(CONFIG_SPL_BUILD)
+#define BOOTENV_DEV_DHCP	BOOTENV_DEV_BLKDEV_NONE
+#define BOOTENV_DEV_NAME_DHCP	BOOTENV_DEV_NAME_BLKDEV_NONE
 #else
 #define BOOTENV_DEV_DHCP \
 	BOOT_TARGET_DEVICES_references_DHCP_without_CONFIG_CMD_DHCP
@@ -413,6 +433,9 @@
 		"fi\0"
 #define BOOTENV_DEV_NAME_PXE(devtypeu, devtypel, instance) \
 	"pxe "
+#elif defined(CONFIG_SPL_BUILD)
+#define BOOTENV_DEV_PXE		BOOTENV_DEV_BLKDEV_NONE
+#define BOOTENV_DEV_NAME_PXE	BOOTENV_DEV_NAME_BLKDEV_NONE
 #else
 #define BOOTENV_DEV_PXE \
 	BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE
-- 
2.34.1


  parent reply	other threads:[~2023-02-22  1:40 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-22  1:37 [PATCH v1 00/24] CONFIG_IS_ENABLED vs IS_ENABLED Troy Kisky
2023-02-22  1:37 ` [PATCH v1 01/24] cmd: nvedit: check for ENV_SUPPORT Troy Kisky
2023-02-22 21:19   ` Simon Glass
2023-02-22  1:37 ` [PATCH v1 02/24] lib: crc32: prepare for CONFIG_IS_ENABLED changes Troy Kisky
2023-02-22 21:19   ` Simon Glass
2023-02-22  1:38 ` [PATCH v1 03/24] lib: md5: " Troy Kisky
2023-02-22 21:19   ` Simon Glass
2023-02-22  1:38 ` [PATCH v1 04/24] lib: sha1: " Troy Kisky
2023-02-22 21:19   ` Simon Glass
2023-02-22  1:38 ` [PATCH v1 05/24] lib: sha256: " Troy Kisky
2023-02-22 21:19   ` Simon Glass
2023-02-22 22:42     ` Troy Kisky
2023-02-22  1:38 ` [PATCH v1 06/24] lib: sha512: " Troy Kisky
2023-02-22 21:19   ` Simon Glass
2023-02-22  1:38 ` [PATCH v1 07/24] tools: prevent CONFIG_IS_ENABLED errors by including linux/kconfig.h Troy Kisky
2023-02-22 21:19   ` Simon Glass
2023-02-22  1:38 ` [PATCH v1 08/24] tools: Makefile: prepare for CONFIG_IS_ENABLED changes by adding CONFIG_TOOLS_xxx Troy Kisky
2023-02-22 21:20   ` Simon Glass
2023-02-22  1:38 ` [PATCH v1 09/24] x86: cpu: qemu: qemu: remove SPL use with CONFIG_IS_ENABLED Troy Kisky
2023-02-22 21:19   ` Simon Glass
2023-02-22  1:38 ` Troy Kisky [this message]
2023-02-22 21:19   ` [PATCH v1 10/24] config_distro_bootcmd: remove booting environment variables from SPL environment Simon Glass
2023-02-22  1:38 ` [PATCH v1 11/24] ofnode: fdt_support definitions needed if OF_CONTROL is enabled Troy Kisky
2023-02-22 21:19   ` Simon Glass
2023-02-22  1:38 ` [PATCH v1 12/24] ringneck-px30: remove check for ENV_IS_NOWHERE, it is an SPL config Troy Kisky
2023-02-22 14:45   ` Quentin Schulz
2023-02-22 15:03     ` Tom Rini
2023-02-22  1:38 ` [PATCH v1 13/24] puma-rk3399: " Troy Kisky
2023-02-22 21:19   ` Simon Glass
2023-02-22  1:38 ` [PATCH v1 14/24] fdt_support: always define fdt_fixup_mtdparts Troy Kisky
2023-02-22 21:20   ` Simon Glass
2023-02-22  1:38 ` [PATCH v1 15/24] m53menlo: define ft_board_setup only if CONFIG_IS_ENABLED(OF_LIBFDT) Troy Kisky
2023-02-22 21:20   ` Simon Glass
2023-02-22  1:38 ` [PATCH v1 16/24] freescale: common: pfuze: define pfuze_mode_init only if defined(CONFIG_DM_PMIC) Troy Kisky
2023-02-22 21:20   ` Simon Glass
2023-02-22  1:38 ` [PATCH v1 17/24] ns16550: match when to define bdf with uart code Troy Kisky
2023-02-22 18:18   ` Tom Rini
2023-02-22 18:42     ` Troy Kisky
2023-02-22 19:16       ` Simon Glass
2023-02-22 19:39       ` Troy Kisky
2023-02-22 20:41         ` Troy Kisky
2023-02-22 21:06           ` Troy Kisky
2023-02-22 21:16             ` Simon Glass
2023-02-22 20:56         ` Simon Glass
     [not found]           ` <CAO46J5WM4yLmbYesfXFeRVYU-7TC=KOPxpBte6=rt9Uh0qF3vw@mail.gmail.com>
     [not found]             ` <CAPnjgZ1jJuwwZ4FAspkhsxwK5RAQiDxtHDkygvwOOtHVFGFiJQ@mail.gmail.com>
     [not found]               ` <CAO46J5XsyQpR57-WA6Q==9wkQLsgwJ+qpsJQxnVt4=GZJ+Ysyg@mail.gmail.com>
2023-02-23  2:48                 ` Simon Glass
2023-02-22  1:38 ` [PATCH v1 18/24] solidrun: mx6cuboxi: use CONFIG_IS_ENABLED(SATA) instead of CONFIG_CMD_SATA Troy Kisky
2023-02-22 16:59   ` Tom Rini
2023-02-22 18:13     ` Troy Kisky
2023-02-24  1:19       ` Troy Kisky
2023-02-22  1:38 ` [PATCH v1 19/24] arm: mach-imx: use CONFIG_$(SPL_)SATA instead of CONFIG_SATA Troy Kisky
2023-02-22 15:05   ` Tom Rini
2023-02-23 19:23     ` Troy Kisky
2023-02-23 22:20       ` Tom Rini
2023-02-23 23:07       ` Simon Glass
2023-02-22  1:38 ` [PATCH v1 20/24] x86: cpu: i386: cpu: only set pci_ram_top if CONFIG_IS_ENABLED(PCI) Troy Kisky
2023-02-22 21:20   ` Simon Glass
2023-02-22  1:38 ` [PATCH v1 21/24] gateworks: venice: surround call of setup_fec with if IS_ENABLED(CONFIG_NET) Troy Kisky
2023-02-22 15:07   ` Tom Rini
2023-02-22  1:38 ` [PATCH v1 22/24] power: pmic: add dm style definitions if not CONFIG_IS_ENABLED(POWER_LEGACY) Troy Kisky
2023-02-22 21:20   ` Simon Glass
2023-02-22  1:38 ` [PATCH v1 23/24] arm: cpu: armv7: ls102xa: fdt: remove eth_device support Troy Kisky
2023-02-22 21:20   ` Simon Glass
2023-02-22  1:38 ` [PATCH v1 24/24] CI: add test/usage_of_is_enabled_check.sh Troy Kisky
2023-02-22 21:20   ` Simon Glass

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=20230222013821.1144691-11-troykiskyboundary@gmail.com \
    --to=troykiskyboundary@gmail.com \
    --cc=Peter.Hoyes@arm.com \
    --cc=gary.bisson@lairdconnect.com \
    --cc=marex@denx.de \
    --cc=matwey.kornilov@gmail.com \
    --cc=pali@kernel.org \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.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.