[PATCH 1/1] riscv: allow building w/o DHCP, SCSI, VIRTIO
Heinrich Schuchardt
heinrich.schuchardt at canonical.com
Sun Jul 3 13:28:37 CEST 2022
Consider which boot devices are enabled in the definition of the
BOOT_TARGET_DEVICES() macro.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
include/configs/qemu-riscv.h | 25 ++++++++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/include/configs/qemu-riscv.h b/include/configs/qemu-riscv.h
index f462895fb5..427da69d3f 100644
--- a/include/configs/qemu-riscv.h
+++ b/include/configs/qemu-riscv.h
@@ -33,11 +33,30 @@
/* Environment options */
#ifndef CONFIG_SPL_BUILD
+
+#if defined(CONFIG_CMD_DHCP)
+#define BOOT_TARGET_DEVICES_DHCP(func) func(DHCP, dhcp, na)
+#else
+#define BOOT_TARGET_DEVICES_DHCP(func)
+#endif
+
+#if defined(CONFIG_SCSI)
+# define BOOT_TARGET_DEVICES_SCSI(func) func(SCSI, scsi, 0)
+#else
+# define BOOT_TARGET_DEVICES_SCSI(func)
+#endif
+
+#if defined(CONFIG_CMD_VIRTIO)
+# define BOOT_TARGET_DEVICES_VIRTIO(func) func(VIRTIO, virtio, 0)
+#else
+# define BOOT_TARGET_DEVICES_VIRTIO(func)
+#endif
+
#define BOOT_TARGET_DEVICES(func) \
func(QEMU, qemu, na) \
- func(VIRTIO, virtio, 0) \
- func(SCSI, scsi, 0) \
- func(DHCP, dhcp, na)
+ BOOT_TARGET_DEVICES_VIRTIO(func) \
+ BOOT_TARGET_DEVICES_SCSI(func) \
+ BOOT_TARGET_DEVICES_DHCP(func)
#include <config_distro_bootcmd.h>
--
2.36.1
More information about the U-Boot
mailing list