qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emulation of armv7+e1000e+/dev/sda or /dev/mmcblk0 devices


From: Peter Maydell
Subject: Re: Emulation of armv7+e1000e+/dev/sda or /dev/mmcblk0 devices
Date: Sun, 18 Apr 2021 13:48:40 +0100

On Sun, 18 Apr 2021 at 02:42, steve freyder <steve@freyder.net> wrote:
> I'm a new qemu-arm list member and looking to get an emulation of an
> armv7 processor with a PCI bus, supporting an e1000e NIC, and some form
> of storage device preferably SATA and [e]MMC - I have an iMX6 SOM custom
> board with an e1000e on the carrier board via PCI that I'm attempting to
> approximate.  I want to boot U-Boot (I've built U-Boot 5.2 with support
> for MMC, SATA, and e100e networking).  I have the "virt" machine able to
> boot U-Boot and see the e1000e, but I have found nothing that allows the
> booted U-Boot see any MMC or SATA devices.  All attempts to use -sd, or
> -drive to create some kind of MMC/SATA device have failed with what
> appear to be (as I have been able to understand) the standard reasons,
> missing busses, missing properties, etc, etc. A majority of searches
> result in documentation from developers that's 5-10 or more years old,
> so I'm hard-pressed to determine whether this is my own lack of
> knowledge (probably YES), or whether I'm simply looking at stuff that's
> been overcome by events.

You have a couple of options:
 (1) if one of the existing iMX6 board models (like sabrelite)
     has enough of the devices that you need, you could use that
 (2) you could use the 'virt' board. You don't say what command line
     you've been trying, but it sounds to me like the problem is that
     you aren't passing the command line options to either:
      * use a virtio blk device (this is usually good if you just want
        "some kind of disk storage"; u-boot should support virtio-blk
        over pci, but I don't know if it's compiled in by default)
      * provide a PCI emulation of some kind of disk controller
        (eg scsi, ahci) as well as an emulation of the disk itself.
Using a -drive option alone is sort of like asking to emulate "a board,
and a disk drive on the table next to it, but not actually plugged into
anything" :-)

The upstream 'u-boot' has support for a qemu-arm board type which
is documented to work on the 'virt' board and to support SATA disks
via AHCI, including the command line options to set that up:

https://github.com/u-boot/u-boot/blob/4f48163201f991de6d4a31b1c98a79e19971f57f/doc/board/emulation/qemu-arm.rst

Have you tried those? If they don't work, what is the error that
QEMU reports?

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]