Skip to contentSkip to conversation

package/qemu: enable usb passthrough on host variant

PATCH New Angelo Compagnucci 2 participants 2 messages Oct 25, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/qemu: enable usb passthrough on host variant

Usb passthrough is a useful feature while using qemu for debugging purpose.

---
 package/qemu/Config.in.host | 5 +++++
 package/qemu/qemu.mk        | 5 +++++
 2 files changed, 10 insertions(+)
package/qemu/Config.in.host +5 -0
index 9eceba5021..e74bbafc26 100644
@@ -83,4 +83,9 @@ config BR2_PACKAGE_HOST_QEMU_VIRTFS
 	  Enables support for virtual filesystem in Qemu allowing
 	  shared filesystem between Qemu and its emulated target.
 
+config BR2_PACKAGE_HOST_QEMU_USB
+	bool "USB passthrough support"
+	help
+	  Enables usb passthrough from guest to host.
+
 endif
package/qemu/qemu.mk +5 -0
index 1d3759a850..7e2faf8a54 100644
@@ -264,6 +264,11 @@ else
 HOST_QEMU_OPTS += --disable-virtfs
 endif
 
+ifeq ($(BR2_PACKAGE_HOST_QEMU_USB),y)
+HOST_QEMU_OPTS += --enable-libusb
+HOST_QEMU_DEPENDENCIES += host-libusb
+endif
+
 # Override CPP, as it expects to be able to call it like it'd
 # call the compiler.
 define HOST_QEMU_CONFIGURE_CMDS
Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 1/1 package/qemu: enable usb passthrough on host variant

Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Angelo" == Angelo Compagnucci <[email protected]> writes:

Usb passthrough is a useful feature while using qemu for debugging purpose.

It is now an option, so the commit message no longer fitted. I've updated that.

Quoted 11 lines
---
 package/qemu/Config.in.host | 5 +++++
 package/qemu/qemu.mk        | 5 +++++
 2 files changed, 10 insertions(+)
package/qemu/Config.in.host +0 -0
index 9eceba5021..e74bbafc26 100644

package/qemu/Config.in.host config BR2_PACKAGE_HOST_QEMU_VIRTFS · line 89

Quoted 7 lines
package/qemu/Config.in.host +4 -0
@@ -83,4 +83,9 @@ config BR2_PACKAGE_HOST_QEMU_VIRTFS
 	  Enables support for virtual filesystem in Qemu allowing
 	  shared filesystem between Qemu and its emulated target.
 
+config BR2_PACKAGE_HOST_QEMU_USB
+	bool "USB passthrough support"
+	help
+	  Enables usb passthrough from guest to host.

USB in an abbreviation, so in capitals.

Quoted 7 lines
package/qemu/Config.in.host +1 -0
+
 endif
package/qemu/qemu.mk +0 -0
index 1d3759a850..7e2faf8a54 100644

package/qemu/qemu.mk else · line 270

Quoted 7 lines
package/qemu/qemu.mk +4 -0
@@ -264,6 +264,11 @@ else
 HOST_QEMU_OPTS += --disable-virtfs
 endif
 
+ifeq ($(BR2_PACKAGE_HOST_QEMU_USB),y)
+HOST_QEMU_OPTS += --enable-libusb
+HOST_QEMU_DEPENDENCIES += host-libusb
+endif

You forgot to pass --disable-libusb in the else clause.

Committed with these fixes, thanks.

Signature · 1 line
Bye, Peter Korsgaard