diff mbox series

[1/1] ARM: qemu-arm: Fix build fail with boot devices disabled

Message ID 20211229133004.3738723-2-piotr_kubik@vp.pl
State Accepted
Commit 703f8c8451bdd9918670e29fa42ead653db456fb
Delegated to: Tom Rini
Headers show
Series ARM: qemu-arm: Fix build fail with boot devices disabled | expand

Commit Message

Piotr Kubik Dec. 29, 2021, 1:30 p.m. UTC
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(-)

Comments

Tom Rini Jan. 15, 2022, 12:38 p.m. UTC | #1
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!
diff mbox series

Patch

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>