[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Add virtual devices to QEMU
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] Add virtual devices to QEMU |
Date: |
Mon, 25 Jun 2012 18:19:21 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120421 Thunderbird/12.0 |
Hello,
Am 25.06.2012 12:59, schrieb Alberich de megres:
> Together with some colleagues, we are developing a USB hardware. But
> as the prototype is not ready to be built, and is not cheap,
> or idea is to develop at the same time a virtual device for the qemu.
>
> I searched for documentation about the USB layer on qemu but I could
> not find a good point. Which would be a good starting point (in the
> qemu)? is it better to create a new machine type? or make it a command
> line option ike --mynew-usb-dev?
Depends on what you want to do with the virtual device.
If you want to develop and test drivers for your device (i.e., your
device plugged into a PC) then look at the hw/usb/ devices pointed to by
Stefan. The file include/qemu/object.h contains some more inline
documentation on the new underlying object model.
You can then add the device via -device yourdevicename. (New options
like --mynew-usb-dev should be avoided.)
If however you want to prototype the firmware for your USB hardware,
then you need to check if QEMU has support for that MCU, add a new
machine type and use it through qemu-system-thearch -M yourboard. I'm
not aware of any example that exposes itself as a USB device. The CCID
emulation uses a much simpler, host-driven protocol AFAIU.
Regards,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg