[PATCH] usb: Correct dependencies around USB_EMUL
Tom Rini
trini at konsulko.com
Fri Mar 20 21:53:53 CET 2026
The symbol USB_EMUL is how sandbox has access to USB. It's
implementation however enforces a few other requirements. It must have
SCSI enabled, and in turn that means it must have BLK enabled. Finally,
we should not be using SANDBOX itself as a symbol to decide what to
build or not build here, as SANDBOX is selected for COMPILE_TEST builds
as well and so may not have enabled the sandbox specific USB support.
Signed-off-by: Tom Rini <trini at konsulko.com>
---
Cc: Marek Vasut <marek.vasut at mailbox.org>
---
drivers/usb/emul/Kconfig | 2 ++
drivers/usb/host/Makefile | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/emul/Kconfig b/drivers/usb/emul/Kconfig
index 279f6c6d7404..8ba372453e37 100644
--- a/drivers/usb/emul/Kconfig
+++ b/drivers/usb/emul/Kconfig
@@ -1,7 +1,9 @@
config USB_EMUL
bool "Support for USB device emulation"
depends on SANDBOX
+ select BLK
select DM_USB
+ select SCSI
select USB_HOST
help
Since sandbox does not have access to a real USB bus, it is possible
diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile
index ef4ce62a680c..9cac53f07c7a 100644
--- a/drivers/usb/host/Makefile
+++ b/drivers/usb/host/Makefile
@@ -5,7 +5,7 @@
ifdef CONFIG_$(PHASE_)DM_USB
obj-y += usb-uclass.o
-obj-$(CONFIG_SANDBOX) += usb-sandbox.o
+obj-$(CONFIG_USB_EMUL) += usb-sandbox.o
endif
ifdef CONFIG_$(PHASE_)USB_STORAGE
--
2.43.0
More information about the U-Boot
mailing list