From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37130) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rzmpc-0002Vw-Ip for qemu-devel@nongnu.org; Tue, 21 Feb 2012 05:20:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RzmpW-0001q2-H4 for qemu-devel@nongnu.org; Tue, 21 Feb 2012 05:20:24 -0500 Received: from mail-qw0-f45.google.com ([209.85.216.45]:61697) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzmpW-0001pw-Cv for qemu-devel@nongnu.org; Tue, 21 Feb 2012 05:20:18 -0500 Received: by qabg40 with SMTP id g40so4034073qab.4 for ; Tue, 21 Feb 2012 02:20:17 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <1328687721-16030-1-git-send-email-peter.crosthwaite@petalogix.com> <201202081139.49413.paul@codesourcery.com> <201202081228.00120.paul@codesourcery.com> <1116A54F-BE1E-4620-BDC8-6B6A1A63D3B6@suse.de> <4F327CD4.1060502@codemonkey.ws> <4F42A45E.5010608@suse.de> Date: Tue, 21 Feb 2012 10:20:17 +0000 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC PATCH] arm boot: added QOM device definition List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: aliguori@us.ibm.com, Alexander Graf , qemu-devel@nongnu.org, Paul Brook , =?UTF-8?Q?Andreas_F=C3=A4rber?= On 21 February 2012 09:15, Peter Crosthwaite wrote: > On Tue, Feb 21, 2012 at 5:56 AM, Peter Maydell = wrote: >> On 20 February 2012 19:51, Andreas F=C3=A4rber wrote: >>> Am 20.02.2012 20:43, schrieb Peter Maydell: >>>> I don't particularly care how we QOMify arm_boot (it's not exactly at >>>> the top of my priority list demanding attention), I do care that (a) >>>> we have a sensible user-facing interface [ie command line options] and >>>> (b) vl.c can usefully just pass the information from those options >>>> straight to the boot loader code. > > So when I trialled this patch I used the -device argument to > instantiate the bootloader on the command line: > > qemu-system-arm -M versatilepb --device > arm_linux_loader,kernel_filename=3Dkernel.foo,initrd=3Dimage.bar... > > With this approach I was able to add command line args (if you will) > to arm_boot without touching vl.c, qemu_opts or any of the arm machine > models. I think this is wrong, because it means the user has to know what the name of the arm_boot device is (as well as because it means that the machine model can't set the arm_boot properties that it needs to, as Paul and Andreas point out). vl.c should search for "some device, any device, which provides a kernel loading interface" and set the kernel/initrd/cmdline/dtb properties on it, so that the same kind of command line works on different machines even if they implement different boot loader devices, subclass arm_boot or whatever. As you say, the infrastructure to do it properly is kind of missing at the moment; that's why I don't want to get basic DTB tied up with QOMification. -- PMM