* [Qemu-devel] kFreeBSD and USB support
@ 2013-06-05 20:17 Michael Tokarev
2013-06-05 20:27 ` Andreas Färber
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Michael Tokarev @ 2013-06-05 20:17 UTC (permalink / raw)
To: qemu-devel; +Cc: Ed Maste
Hello.
On debian we, for a long time, used the following hack
in a build script of qemu:
# Hack alert. qemu-1.3 still needs this.
# On recent kFreebsd, old USB host API has been removed,
# but qemu did not learn to use new USB API.
# Just do not build USB host support.
sed -i 's/^HOST_USB=bsd/HOST_USB=stub/' \
qemu-build/config-host.mak
This isn't really FreeBSD but "kFreeBSD", which is
a FreeBSD kernel (and ofcorse the kernel headers)
and some more linux-like userspace - it is Debian
userspace running on top of FreeBSD kernel.
This effectively disables host usb support for
kFreeBSD. And since I guess the kernel headers
are the same on regular FreeBSD, I think the same
issue happens on regular FreeBSD too, that is,
host usb does not work there as well.
What is the status of this situation now?
Thanks,
/mjt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] kFreeBSD and USB support
2013-06-05 20:17 [Qemu-devel] kFreeBSD and USB support Michael Tokarev
@ 2013-06-05 20:27 ` Andreas Färber
2013-06-05 20:34 ` Ed Maste
2013-06-06 12:47 ` Gerd Hoffmann
2 siblings, 0 replies; 6+ messages in thread
From: Andreas Färber @ 2013-06-05 20:27 UTC (permalink / raw)
To: Michael Tokarev; +Cc: Ed Maste, qemu-devel
Am 05.06.2013 22:17, schrieb Michael Tokarev:
> Hello.
>
> On debian we, for a long time, used the following hack
> in a build script of qemu:
>
> # Hack alert. qemu-1.3 still needs this.
> # On recent kFreebsd, old USB host API has been removed,
> # but qemu did not learn to use new USB API.
> # Just do not build USB host support.
> sed -i 's/^HOST_USB=bsd/HOST_USB=stub/' \
> qemu-build/config-host.mak
>
> This isn't really FreeBSD but "kFreeBSD", which is
> a FreeBSD kernel (and ofcorse the kernel headers)
> and some more linux-like userspace - it is Debian
> userspace running on top of FreeBSD kernel.
>
> This effectively disables host usb support for
> kFreeBSD. And since I guess the kernel headers
> are the same on regular FreeBSD, I think the same
> issue happens on regular FreeBSD too, that is,
> host usb does not work there as well.
>
> What is the status of this situation now?
I believe as of FreeBSD 9 their USB stack was rewritten and thus USB
host support disabled in FreeBSD ports, too.
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] kFreeBSD and USB support
2013-06-05 20:17 [Qemu-devel] kFreeBSD and USB support Michael Tokarev
2013-06-05 20:27 ` Andreas Färber
@ 2013-06-05 20:34 ` Ed Maste
2013-06-05 20:51 ` Brad Smith
2013-06-06 12:47 ` Gerd Hoffmann
2 siblings, 1 reply; 6+ messages in thread
From: Ed Maste @ 2013-06-05 20:34 UTC (permalink / raw)
To: Michael Tokarev; +Cc: qemu-devel
On 5 June 2013 16:17, Michael Tokarev <mjt@tls.msk.ru> wrote:
> Hello.
>
> On debian we, for a long time, used the following hack
> in a build script of qemu:
>
> # Hack alert. qemu-1.3 still needs this.
> # On recent kFreebsd, old USB host API has been removed,
> # but qemu did not learn to use new USB API.
> # Just do not build USB host support.
> sed -i 's/^HOST_USB=bsd/HOST_USB=stub/' \
> qemu-build/config-host.mak
In fact, the FreeBSD ports tree Makefile for QEMU does basically the
same thing -- search for 'HOST_USB' in
http://svnweb.freebsd.org/ports/head/emulators/qemu-devel/Makefile?revision=319450&view=co
> This isn't really FreeBSD but "kFreeBSD", which is
> a FreeBSD kernel (and ofcorse the kernel headers)
> and some more linux-like userspace - it is Debian
> userspace running on top of FreeBSD kernel.
>
> This effectively disables host usb support for
> kFreeBSD. And since I guess the kernel headers
> are the same on regular FreeBSD, I think the same
> issue happens on regular FreeBSD too, that is,
> host usb does not work there as well.
>
> What is the status of this situation now?
On FreeBSD-current libusb has grown the functionality required by
QEMU's recent libusb USB host code, and I'm using that. I assume that
the current BSD host USB code works on NetBSD and OpenBSD, but don't
really know; possibly they can switch to libusb as well.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] kFreeBSD and USB support
2013-06-05 20:34 ` Ed Maste
@ 2013-06-05 20:51 ` Brad Smith
0 siblings, 0 replies; 6+ messages in thread
From: Brad Smith @ 2013-06-05 20:51 UTC (permalink / raw)
To: Ed Maste; +Cc: Michael Tokarev, qemu-devel
On 05/06/13 4:34 PM, Ed Maste wrote:
> On 5 June 2013 16:17, Michael Tokarev <mjt@tls.msk.ru> wrote:
>> Hello.
>>
>> On debian we, for a long time, used the following hack
>> in a build script of qemu:
>>
>> # Hack alert. qemu-1.3 still needs this.
>> # On recent kFreebsd, old USB host API has been removed,
>> # but qemu did not learn to use new USB API.
>> # Just do not build USB host support.
>> sed -i 's/^HOST_USB=bsd/HOST_USB=stub/' \
>> qemu-build/config-host.mak
>
> In fact, the FreeBSD ports tree Makefile for QEMU does basically the
> same thing -- search for 'HOST_USB' in
> http://svnweb.freebsd.org/ports/head/emulators/qemu-devel/Makefile?revision=319450&view=co
>
>> This isn't really FreeBSD but "kFreeBSD", which is
>> a FreeBSD kernel (and ofcorse the kernel headers)
>> and some more linux-like userspace - it is Debian
>> userspace running on top of FreeBSD kernel.
>>
>> This effectively disables host usb support for
>> kFreeBSD. And since I guess the kernel headers
>> are the same on regular FreeBSD, I think the same
>> issue happens on regular FreeBSD too, that is,
>> host usb does not work there as well.
>>
>> What is the status of this situation now?
>
> On FreeBSD-current libusb has grown the functionality required by
> QEMU's recent libusb USB host code, and I'm using that. I assume that
> the current BSD host USB code works on NetBSD and OpenBSD, but don't
> really know; possibly they can switch to libusb as well.
AFAIK the BSD USB backend is supposed to work on OpenBSD, though I have
never used that support myself never having used USB within an image
under QEMU. But when libusb 1.0.16 is released and into our ports tree
I'll look into enabling the libusb support. The libusb USB backend for
OpenBSD is relatively well maintained and I'd trust that working
properly over the code within QEMU.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] kFreeBSD and USB support
2013-06-05 20:17 [Qemu-devel] kFreeBSD and USB support Michael Tokarev
2013-06-05 20:27 ` Andreas Färber
2013-06-05 20:34 ` Ed Maste
@ 2013-06-06 12:47 ` Gerd Hoffmann
2013-06-06 15:08 ` Hans de Goede
2 siblings, 1 reply; 6+ messages in thread
From: Gerd Hoffmann @ 2013-06-06 12:47 UTC (permalink / raw)
To: Michael Tokarev; +Cc: Ed Maste, qemu-devel
Hi,
> This effectively disables host usb support for
> kFreeBSD. And since I guess the kernel headers
> are the same on regular FreeBSD, I think the same
> issue happens on regular FreeBSD too, that is,
> host usb does not work there as well.
>
> What is the status of this situation now?
I have no idea how well the host-bsd code actually works. I've used an
OpenBSD (virtual machine) for build tests. Last time I tried it did not
build on FreeBSD. No idea where NetBSD (or any other variant) stands.
My long-term plan for usb-host support is to build on libusbx
exclusively (merged in the 1.5 devel cycle), thereby offloading all
portability issues to libusbx. Right now we are in a transition period,
the old code is still around so you can flip back and forward between
libusbx implementation and the os-specific bits for linux/bsd, mainly
because a pretty recent linusbx version is required and also to ease
regression testing. At some point in the future I want get rid of the
old code though.
FreeBSD reportly has its own libusb implementation, with a library
interface compatible to libusbx. That should work with kFreeBSD too. I
don't know what the other BSD variants are doing, but due to libusbx
being used by alot of userspace usb apps/drivers I'd expect it is
present in some form usable for qemu's host-libusb code ...
cheers,
Gerd
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] kFreeBSD and USB support
2013-06-06 12:47 ` Gerd Hoffmann
@ 2013-06-06 15:08 ` Hans de Goede
0 siblings, 0 replies; 6+ messages in thread
From: Hans de Goede @ 2013-06-06 15:08 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: Ed Maste, Michael Tokarev, qemu-devel
Hi,
On 06/06/2013 02:47 PM, Gerd Hoffmann wrote:
> Hi,
>
>> This effectively disables host usb support for
>> kFreeBSD. And since I guess the kernel headers
>> are the same on regular FreeBSD, I think the same
>> issue happens on regular FreeBSD too, that is,
>> host usb does not work there as well.
>>
>> What is the status of this situation now?
>
> I have no idea how well the host-bsd code actually works. I've used an
> OpenBSD (virtual machine) for build tests. Last time I tried it did not
> build on FreeBSD. No idea where NetBSD (or any other variant) stands.
>
> My long-term plan for usb-host support is to build on libusbx
> exclusively (merged in the 1.5 devel cycle), thereby offloading all
> portability issues to libusbx. Right now we are in a transition period,
> the old code is still around so you can flip back and forward between
> libusbx implementation and the os-specific bits for linux/bsd, mainly
> because a pretty recent linusbx version is required and also to ease
> regression testing. At some point in the future I want get rid of the
> old code though.
>
> FreeBSD reportly has its own libusb implementation, with a library
> interface compatible to libusbx. That should work with kFreeBSD too. I
> don't know what the other BSD variants are doing, but due to libusbx
> being used by alot of userspace usb apps/drivers I'd expect it is
> present in some form usable for qemu's host-libusb code ...
Yes, on FreeBSD it is best to use FreeBSD's libusb replacement implementation
which is API compatible, this likely is also best used on Debian-kfreebsd
(as a replacement for the regular libusb).
Regular libusb currently has linux, macosx, openbsd, netbsd and win32
backends. With linux being the most feature complete, your mileage may vary
on other platforms, but all the basics are there, so if necessary people could
spend some time on fixing libusb's backend code for a platform they care about.
Regards,
Hans
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-06-06 15:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-05 20:17 [Qemu-devel] kFreeBSD and USB support Michael Tokarev
2013-06-05 20:27 ` Andreas Färber
2013-06-05 20:34 ` Ed Maste
2013-06-05 20:51 ` Brad Smith
2013-06-06 12:47 ` Gerd Hoffmann
2013-06-06 15:08 ` Hans de Goede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).