[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 10/13] hw/usb: Include USB files only if necessary
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 10/13] hw/usb: Include USB files only if necessary |
Date: |
Wed, 18 Mar 2015 14:07:52 +0100 |
From: Thomas Huth <address@hidden>
Boards that do not include an USB controller should not provide
USB devices. However, when running "qemu-system-s390x -device help"
for example, there's still a usb-hub, usb-kbd, usb-mouse and
usb-tablet in the list of "supported" devices. Let's fix that
by compiling and linking the USB files only if it is really
necessary.
Signed-off-by: Thomas Huth <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
---
default-configs/arm-softmmu.mak | 1 +
default-configs/usb.mak | 1 +
hw/usb/Makefile.objs | 8 ++++----
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 87d4e34..a767e4b 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -32,6 +32,7 @@ CONFIG_DS1338=y
CONFIG_PFLASH_CFI01=y
CONFIG_PFLASH_CFI02=y
CONFIG_MICRODRIVE=y
+CONFIG_USB=y
CONFIG_USB_MUSB=y
CONFIG_USB_EHCI_SYSBUS=y
CONFIG_PLATFORM_BUS=y
diff --git a/default-configs/usb.mak b/default-configs/usb.mak
index 73d8489..f4b8568 100644
--- a/default-configs/usb.mak
+++ b/default-configs/usb.mak
@@ -1,3 +1,4 @@
+CONFIG_USB=y
CONFIG_USB_TABLET_WACOM=y
CONFIG_USB_STORAGE_BOT=y
CONFIG_USB_STORAGE_UAS=y
diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs
index 0ccd477..7443e38 100644
--- a/hw/usb/Makefile.objs
+++ b/hw/usb/Makefile.objs
@@ -1,6 +1,6 @@
# usb subsystem core
-common-obj-y += core.o combined-packet.o bus.o desc.o desc-msos.o
-common-obj-y += libhw.o
+common-obj-y += core.o combined-packet.o bus.o libhw.o
+common-obj-$(CONFIG_USB) += desc.o desc-msos.o
# usb host adapters
common-obj-$(CONFIG_USB_UHCI) += hcd-uhci.o
@@ -11,8 +11,8 @@ common-obj-$(CONFIG_USB_XHCI) += hcd-xhci.o
common-obj-$(CONFIG_USB_MUSB) += hcd-musb.o
# emulated usb devices
-common-obj-y += dev-hub.o
-common-obj-y += dev-hid.o
+common-obj-$(CONFIG_USB) += dev-hub.o
+common-obj-$(CONFIG_USB) += dev-hid.o
common-obj-$(CONFIG_USB_TABLET_WACOM) += dev-wacom.o
common-obj-$(CONFIG_USB_STORAGE_BOT) += dev-storage.o
common-obj-$(CONFIG_USB_STORAGE_UAS) += dev-uas.o
--
1.8.3.1
- [Qemu-devel] [PULL 02/13] usb: Improve companion configuration error messages, (continued)
- [Qemu-devel] [PULL 02/13] usb: Improve companion configuration error messages, Gerd Hoffmann, 2015/03/18
- [Qemu-devel] [PULL 13/13] ehci: fix segfault when hot-unplugging ehci controller, Gerd Hoffmann, 2015/03/18
- [Qemu-devel] [PULL 11/13] uhci: fix segfault when hot-unplugging uhci controller, Gerd Hoffmann, 2015/03/18
- [Qemu-devel] [PULL 12/13] ohci: fix resource cleanup leak, Gerd Hoffmann, 2015/03/18
- [Qemu-devel] [PULL 03/13] ohci: Complete conversion to realize, Gerd Hoffmann, 2015/03/18
- [Qemu-devel] [PULL 08/13] usb/dev-storage: Fix QMP device_add missing encryption key failure, Gerd Hoffmann, 2015/03/18
- [Qemu-devel] [PULL 04/13] uhci: Convert to realize, Gerd Hoffmann, 2015/03/18
- [Qemu-devel] [PULL 06/13] monitor: Plug memory leak in monitor_read_bdrv_key_start(), Gerd Hoffmann, 2015/03/18
- [Qemu-devel] [PULL 07/13] monitor usb: Inline monitor_read_bdrv_key_start()'s first part, Gerd Hoffmann, 2015/03/18
- [Qemu-devel] [PULL 05/13] monitor: Drop dead QMP check from monitor_read_password(), Gerd Hoffmann, 2015/03/18
- [Qemu-devel] [PULL 10/13] hw/usb: Include USB files only if necessary,
Gerd Hoffmann <=
- [Qemu-devel] [PULL 09/13] usb/dev-storage: Avoid qerror_report_err() outside QMP handlers, Gerd Hoffmann, 2015/03/18
- [Qemu-devel] [PULL 01/13] usb: Propagate errors through usb_register_companion(), Gerd Hoffmann, 2015/03/18
- Re: [Qemu-devel] [PULL for-2.3 00/13] usb patch queue., Peter Maydell, 2015/03/19