[Top][All Lists]

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

Re: [Qemu-arm] [Qemu-devel] help on how to emulate rasbperry pi 2

From: Andrew Baumann
Subject: Re: [Qemu-arm] [Qemu-devel] help on how to emulate rasbperry pi 2
Date: Fri, 26 Feb 2016 19:21:38 +0000

> From: John Snow [mailto:address@hidden
> Sent: Friday, 26 February 2016 9:53 AM
> On 02/26/2016 12:23 PM, Andrew Baumann wrote:
> >> From: John Snow [mailto:address@hidden
> >> 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 
E:\qemu\build64\arm-softmmu\qemu-system-arm.exe: Device with id 'sd0' already 

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 :)


reply via email to

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