All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] [PATCH] ARM: qemu-arm: Fix build fail with boot devices disabled
@ 2021-12-29 13:30 Piotr Kubik
  2021-12-29 13:30 ` [PATCH 1/1] " Piotr Kubik
  0 siblings, 1 reply; 3+ messages in thread
From: Piotr Kubik @ 2021-12-29 13:30 UTC (permalink / raw)
  To: u-boot; +Cc: Piotr Kubik, Tom Rini, Tuomas Tynkkynen


BOOT_TARGET_DEVICES should only be added if the corresponding u-boot
command is enabled otherwise the build will fail like:

include/config_distro_bootcmd.h:241:2: error: expected '}' before 'BOOT_TARGET_DEVICES_references_SCSI_without_CONFIG_SCSI'
  BOOT_TARGET_DEVICES_references_SCSI_without_CONFIG_SCSI
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/config_distro_bootcmd.h:241:2: note: in definition of macro 'BOOTENV_DEV_NAME_SCSI'
  BOOT_TARGET_DEVICES_references_SCSI_without_CONFIG_SCSI
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/configs/qemu-arm.h:26:2: note: in expansion of macro 'BOOTENV_DEV_NAME'
  func(SCSI, scsi, 0) \
  ^~~~

Tested with CONFIG_USB and CONFIG_SCSI disabled & enabled.



Piotr Kubik (1):
  ARM: qemu-arm: Fix build fail with boot devices disabled

 include/configs/qemu-arm.h | 32 ++++++++++++++++++++++++++++----
 1 file changed, 28 insertions(+), 4 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/1] ARM: qemu-arm: Fix build fail with boot devices disabled
  2021-12-29 13:30 [PATCH 0/1] [PATCH] ARM: qemu-arm: Fix build fail with boot devices disabled Piotr Kubik
@ 2021-12-29 13:30 ` Piotr Kubik
  2022-01-15 12:38   ` Tom Rini
  0 siblings, 1 reply; 3+ messages in thread
From: Piotr Kubik @ 2021-12-29 13:30 UTC (permalink / raw)
  To: u-boot; +Cc: Piotr Kubik, Tom Rini, Tuomas Tynkkynen

BOOT_TARGET_DEVICES should only be added if the corresponding u-boot
command is enabled otherwise the build will fail.

Signed-off-by: Piotr Kubik <piotr_kubik@vp.pl>

---

 include/configs/qemu-arm.h | 32 ++++++++++++++++++++++++++++----
 1 file changed, 28 insertions(+), 4 deletions(-)

diff --git a/include/configs/qemu-arm.h b/include/configs/qemu-arm.h
index 1287fd1671..9fc53b4739 100644
--- a/include/configs/qemu-arm.h
+++ b/include/configs/qemu-arm.h
@@ -21,11 +21,35 @@
 
 /* Environment options */
 
+#if CONFIG_IS_ENABLED(CMD_USB)
+# define BOOT_TARGET_USB(func) func(USB, usb, 0)
+#else
+# define BOOT_TARGET_USB(func)
+#endif
+
+#if CONFIG_IS_ENABLED(CMD_SCSI)
+# define BOOT_TARGET_SCSI(func) func(SCSI, scsi, 0)
+#else
+# define BOOT_TARGET_SCSI(func)
+#endif
+
+#if CONFIG_IS_ENABLED(CMD_VIRTIO)
+# define BOOT_TARGET_VIRTIO(func) func(VIRTIO, virtio, 0)
+#else
+# define BOOT_TARGET_VIRTIO(func)
+#endif
+
+#if CONFIG_IS_ENABLED(CMD_DHCP)
+# define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na)
+#else
+# define BOOT_TARGET_DHCP(func)
+#endif
+
 #define BOOT_TARGET_DEVICES(func) \
-	func(USB, usb, 0) \
-	func(SCSI, scsi, 0) \
-	func(VIRTIO, virtio, 0) \
-	func(DHCP, dhcp, na)
+	BOOT_TARGET_USB(func) \
+	BOOT_TARGET_SCSI(func) \
+	BOOT_TARGET_VIRTIO(func) \
+	BOOT_TARGET_DHCP(func)
 
 #include <config_distro_bootcmd.h>
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] ARM: qemu-arm: Fix build fail with boot devices disabled
  2021-12-29 13:30 ` [PATCH 1/1] " Piotr Kubik
@ 2022-01-15 12:38   ` Tom Rini
  0 siblings, 0 replies; 3+ messages in thread
From: Tom Rini @ 2022-01-15 12:38 UTC (permalink / raw)
  To: Piotr Kubik; +Cc: u-boot, Tuomas Tynkkynen

[-- Attachment #1: Type: text/plain, Size: 292 bytes --]

On Wed, Dec 29, 2021 at 02:30:04PM +0100, Piotr Kubik wrote:

> BOOT_TARGET_DEVICES should only be added if the corresponding u-boot
> command is enabled otherwise the build will fail.
> 
> Signed-off-by: Piotr Kubik <piotr_kubik@vp.pl>

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-15 12:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-29 13:30 [PATCH 0/1] [PATCH] ARM: qemu-arm: Fix build fail with boot devices disabled Piotr Kubik
2021-12-29 13:30 ` [PATCH 1/1] " Piotr Kubik
2022-01-15 12:38   ` Tom Rini

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.