From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56912) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZNxU-0001kN-NT for qemu-devel@nongnu.org; Fri, 26 Feb 2016 14:21:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZNxT-0001ro-Ii for qemu-devel@nongnu.org; Fri, 26 Feb 2016 14:21:48 -0500 From: Andrew Baumann Date: Fri, 26 Feb 2016 19:21:38 +0000 Message-ID: References: <605392182193B84A99A143D9DA347B52FB8AA7@post> <56CDF624.6050104@redhat.com> <605392182193B84A99A143D9DA347B52FB8B57@post> <56D087AD.3040001@redhat.com> <56D090EB.3000908@redhat.com> In-Reply-To: <56D090EB.3000908@redhat.com> Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Qemu-devel] [Qemu-arm] help on how to emulate rasbperry pi 2 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow , Mats Malmberg , Peter Maydell Cc: "qemu-arm@nongnu.org" , QEMU Developers > From: John Snow [mailto:jsnow@redhat.com] > Sent: Friday, 26 February 2016 9:53 AM >=20 > 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 wit= h > >> -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 > > >=20 > `-drive if=3Dnone,id=3Dsd0,file=3Detc.img,format=3Draw > -device sd-card,drive=3Dsd0,bus=3Dsd-bus` >=20 > doesn't work? No, that doesn't work, but don't ask me why. After commenting out the new c= ode in raspi.c, I get: ./qemu-system-arm.exe -M raspi2 -bios e:/raspi/th2_10556_uefi.img -drive if= =3Dnone,id=3Dsd0,file=3De:/raspi/th2_10556_pi2.vhd,format=3Draw -device sd-= card,drive=3Dsd0,bus=3Dsd-bus E:\qemu\build64\arm-softmmu\qemu-system-arm.exe: Device with id 'sd0' alrea= dy 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 fa= ct, 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=3DSD devices as added by -sd. the -drive/-device combo > should work anyway, because you are explicitly hooking it up via -device. >=20 > 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