All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Baumann <Andrew.Baumann@microsoft.com>
To: John Snow <jsnow@redhat.com>,
	Mats Malmberg <mats.malmberg@tritech.se>,
	Peter Maydell <peter.maydell@linaro.org>
Cc: "qemu-arm@nongnu.org" <qemu-arm@nongnu.org>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [Qemu-arm] help on how to emulate rasbperry pi 2
Date: Fri, 26 Feb 2016 19:21:38 +0000	[thread overview]
Message-ID: <BLUPR0301MB203446D00A8977C4812E88B59EA70@BLUPR0301MB2034.namprd03.prod.outlook.com> (raw)
In-Reply-To: <56D090EB.3000908@redhat.com>

> From: John Snow [mailto:jsnow@redhat.com]
> Sent: Friday, 26 February 2016 9:53 AM
> 
> On 02/26/2016 12:23 PM, Andrew Baumann wrote:
> >> From: John Snow [mailto:jsnow@redhat.com]
> >> Sent: Friday, 26 February 2016 9:13 AM
[...]
> >> Andrew, you might want to update the examples on that wiki: it looks
> >> like with recent changes that "-sd" was temporarily insufficient for
> >> getting a proper instance running.
> >>
> >> Maybe you should also add some examples that use the -drive/-device
> >> combo that we canonically support in addition to the sugared -sd/-hda.
> >>
> >> Mats: for now, try grabbing the latest qemu master, it fixed a bug with
> >> -sd. :)
> >
> > Yes, John's right, please try now and this bug should be fixed.
> >
> > There was a regression in qemu-master for about a week, fixed by:
> > https://lists.nongnu.org/archive/html/qemu-devel/2016-
> 02/msg05733.html
> >
> > John, AFAIK there was no way to have working SD without this patch (the
> code to hook up the block device didn't exist), so I don't think there's much
> point updating the wiki.
> >
> > Cheers,
> > Andrew
> >
> 
> `-drive if=none,id=sd0,file=etc.img,format=raw
>  -device sd-card,drive=sd0,bus=sd-bus`
> 
> doesn't work?

No, that doesn't work, but don't ask me why. After commenting out the new code in raspi.c, I get:

./qemu-system-arm.exe -M raspi2 -bios e:/raspi/th2_10556_uefi.img -drive if=none,id=sd0,file=e:/raspi/th2_10556_pi2.vhd,format=raw -device sd-card,drive=sd0,bus=sd-bus
E:\qemu\build64\arm-softmmu\qemu-system-arm.exe: Device with id 'sd0' already exists

Changing the id to sd1 proceeds, but results in an unbootable system (looks like there is no card in the device). I don't know what creates sd0. In fact, I tried putting the new code back, so -sd works, but the invocation you gave me above still fails the same way.

> The code to "hook up the block device" was added to the board init, but
> that's for if=SD devices as added by -sd. the -drive/-device combo
> should work anyway, because you are explicitly hooking it up via -device.
> 
> I guess the QOMification of SD is new, but usually we recommend/prefer
> scripts and clients to use the explicit drive/device syntax above
> instead of the -sd or -hda syntactic sugar. Real actual people can still
> use -sd/-hd -- but they're prone to breakage as you've seen.

Thanks for the explainer. As you can see, I haven't been able to grok the -drive -device syntax yet :)

Andrew

      reply	other threads:[~2016-02-26 19:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <605392182193B84A99A143D9DA347B52FB8AA7@post>
2016-02-24 17:48 ` [Qemu-devel] [Qemu-arm] help on how to emulate rasbperry pi 2 Peter Maydell
2016-02-24 18:04   ` Andrew Baumann
2016-02-24 18:27     ` John Snow
2016-02-24 18:51       ` Andrew Baumann
2016-02-26  9:30         ` Mats Malmberg
2016-02-26 17:13           ` John Snow
2016-02-26 17:23             ` Andrew Baumann
2016-02-26 17:52               ` John Snow
2016-02-26 19:21                 ` Andrew Baumann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BLUPR0301MB203446D00A8977C4812E88B59EA70@BLUPR0301MB2034.namprd03.prod.outlook.com \
    --to=andrew.baumann@microsoft.com \
    --cc=jsnow@redhat.com \
    --cc=mats.malmberg@tritech.se \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.