On 21 February 2012 09:15, Peter Crosthwaite
<peter.crosthwa...@petalogix.com> wrote:
> On Tue, Feb 21, 2012 at 5:56 AM, Peter Maydell <peter.mayd...@linaro.org> 
> wrote:
>> On 20 February 2012 19:51, Andreas Färber <afaer...@suse.de> 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