qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH] arm boot: added QOM device definition


From: Peter Maydell
Subject: Re: [Qemu-devel] [RFC PATCH] arm boot: added QOM device definition
Date: Tue, 21 Feb 2012 10:20:17 +0000

On 21 February 2012 09:15, Peter Crosthwaite
<address@hidden> wrote:
> On Tue, Feb 21, 2012 at 5:56 AM, Peter Maydell <address@hidden> wrote:
>> On 20 February 2012 19:51, Andreas Färber <address@hidden> 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=kernel.foo,initrd=image.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



reply via email to

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