ast2600-evb qemu and usb-net

Cédric Le Goater clg at kaod.org
Tue Aug 10 18:44:31 AEST 2021


On 8/10/21 4:31 AM, Joel Stanley wrote:
> On Mon, 9 Aug 2021 at 04:56, Deepak Kodihalli
> <deepak.kodihalli.83 at gmail.com> wrote:
>>
>> Hi All,
>>
>> I am trying to launch the ast2600-evb machine on QEMU by passing a a
>> usb-net device:
>> qemu-system-arm -machine ast2600-evb  -drive file=<bmc
>> image>,if=mtd,bus=0,unit=0,snapshot=on -nographic  -nic
>> user,hostname=qemu -device usb-net,netdev=net0 -netdev
>> socket,id=net0,listen=:1234
>>
>> I downloaded the QEMU binary from
>> https://github.com/openbmc/docs/blob/master/development/dev-environment.md#download-and-start-qemu-session.
> 
> This is unrelated to your question, but that qemu is built from an
> outdated branch. I would recommend using mainline qemu instead.
> 
> We also have a qemu tree that Cedric maintains at
> https://github.com/legoater/qemu. The aspeed-6.1 (and soon aspeed-6.2)
> have changes that we have not yet merged to mainline.
> 
>> I get the following error when I run the command above:
>> qemu-system-arm: -device usb-net,netdev=net0: Warning: speed mismatch
>> trying to attach usb device "QEMU USB Network Interface" (full speed)
>> to bus "usb-bus.1", port "1" (high speed)
> 
> As the error message says, you're attempting to attach a full speed
> (USB 1.1) device to a high speed (USB 2.0) bus.
> 
> This is where I get a bit confused by USB. I thought that the
> controller supported both full and high speed (that's what the data
> sheet says).
>> The chip also has a USB 1.1 controller (UCHI) hasn't been enabled for
> the ast2600. There's also no qemu model hooked up.

It shouldn't be too complex to add. We might need a SysBus version of
the UHCI model.

>> The intent is to have two such QEMU instances talking over emulated
>> usb-net (the other instance would do a connect on the netdev socket).

I would setup a libvirt bridge on the host and run with : 

 qemu-system-arm -M ast2600-evb \
    -net nic,macaddr=<mac>,netdev=net0 \
    -netdev bridge,id=net0,helper=/usr/libexec/qemu-bridge-helper,br=virbr0  \
    -drive file=<file>,format=raw,if=mtd \
    -serial mon:stdio 

It's also perfectly possible to run a pool of Aspeed machines as VMs 
under libvirt.

C.


More information about the openbmc mailing list