Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/qemu: enable usb passthrough on host variant
@ 2019-10-24 20:28 Angelo Compagnucci
  2019-10-24 20:36 ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Angelo Compagnucci @ 2019-10-24 20:28 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
---
 package/qemu/qemu.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index 1d3759a850..4cf1c60030 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -264,6 +264,11 @@ else
 HOST_QEMU_OPTS += --disable-virtfs
 endif
 
+ifeq ($(BR2_PACKAGE_LIBUSB),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
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] package/qemu: enable usb passthrough on host variant
  2019-10-24 20:28 [Buildroot] [PATCH] package/qemu: enable usb passthrough on host variant Angelo Compagnucci
@ 2019-10-24 20:36 ` Thomas Petazzoni
  2019-10-24 21:30   ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2019-10-24 20:36 UTC (permalink / raw)
  To: buildroot

On Thu, 24 Oct 2019 22:28:20 +0200
Angelo Compagnucci <angelo.compagnucci@gmail.com> wrote:

> Usb passthrough is a useful feature while using qemu for debugging
> purpose.
> 
> Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
> ---
>  package/qemu/qemu.mk | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
> index 1d3759a850..4cf1c60030 100644
> --- a/package/qemu/qemu.mk
> +++ b/package/qemu/qemu.mk
> @@ -264,6 +264,11 @@ else
>  HOST_QEMU_OPTS += --disable-virtfs
>  endif
>  
> +ifeq ($(BR2_PACKAGE_LIBUSB),y)

So, if the target libusb package is enabled...

> +HOST_QEMU_OPTS += --enable-libusb
> +HOST_QEMU_DEPENDENCIES += host-libusb

... you assume the user wants libusb support in host-qemu.

Sorry, but this is not good. Add an option in
package/qemu/Config.in.host to enable USB passthrough, and use that in
qemu.mk.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] package/qemu: enable usb passthrough on host variant
  2019-10-24 20:36 ` Thomas Petazzoni
@ 2019-10-24 21:30   ` Peter Korsgaard
  2019-10-25 20:40     ` Arnout Vandecappelle
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2019-10-24 21:30 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:

 >> +ifeq ($(BR2_PACKAGE_LIBUSB),y)

 > So, if the target libusb package is enabled...

 >> +HOST_QEMU_OPTS += --enable-libusb
 >> +HOST_QEMU_DEPENDENCIES += host-libusb

 > ... you assume the user wants libusb support in host-qemu.

 > Sorry, but this is not good. Add an option in
 > package/qemu/Config.in.host to enable USB passthrough, and use that in
 > qemu.mk.

And pass --disable-libusb (if such option exists) in the else clause.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] package/qemu: enable usb passthrough on host variant
  2019-10-24 21:30   ` Peter Korsgaard
@ 2019-10-25 20:40     ` Arnout Vandecappelle
  0 siblings, 0 replies; 4+ messages in thread
From: Arnout Vandecappelle @ 2019-10-25 20:40 UTC (permalink / raw)
  To: buildroot



On 24/10/2019 23:30, Peter Korsgaard wrote:
>>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
> 
>  >> +ifeq ($(BR2_PACKAGE_LIBUSB),y)
> 
>  > So, if the target libusb package is enabled...
> 
>  >> +HOST_QEMU_OPTS += --enable-libusb
>  >> +HOST_QEMU_DEPENDENCIES += host-libusb
> 
>  > ... you assume the user wants libusb support in host-qemu.
> 
>  > Sorry, but this is not good. Add an option in
>  > package/qemu/Config.in.host to enable USB passthrough, and use that in
>  > qemu.mk.

 host-libusb takes 1 second to build (*). Is it really worth to make an option
for it?

 Regards,
 Arnout

(*) Yes, I'm exaggerating :-)

> 
> And pass --disable-libusb (if such option exists) in the else clause.
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-25 20:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-24 20:28 [Buildroot] [PATCH] package/qemu: enable usb passthrough on host variant Angelo Compagnucci
2019-10-24 20:36 ` Thomas Petazzoni
2019-10-24 21:30   ` Peter Korsgaard
2019-10-25 20:40     ` Arnout Vandecappelle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox