[Top][All Lists]

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

Re: [Qemu-arm] Booting Cortex-M3 Linux kernels in qemu

From: Peter Maydell
Subject: Re: [Qemu-arm] Booting Cortex-M3 Linux kernels in qemu
Date: Tue, 19 Jun 2018 13:41:06 +0100

On 16 June 2018 at 19:53, Guenter Roeck <address@hidden> wrote:
> On 06/16/2018 11:08 AM, Peter Maydell wrote:
>> My general view is that where QEMU takes the path of "do what
>> the hardware does", that is straightforward and doesn't lead
>> us into future annoying deadends or misdesigns. Where QEMU
>> does things that are not what the hardware does, that is where
>> it's easy to go wrong. Real MPS2 hardware doesn't magically
>> load Linux kernels and DTBs (it boots whatever the firmware
>> image is).
> ... while mine is that I have no trouble running Linux test images
> in qemu when it supports options such as -dtb and -initrd, while it
> is a pain to run and maintain if I have to have a secondary loader
> that isn't part of qemu. Guess we just have different perspectives.

Well, somebody has to write and maintain the code that deals
with the mismatch between how hardware starts up and how
the kernel wants to be started. The question seems to me
to be whether that should be in QEMU, in the kernel or a
standalone bit of code... I don't think the overall effort
required changes much. (Personally I'd put the code in the
kernel, since it's about a dozen lines of asm and a linker
script or two.)

You need a boot-wrapper bit of code to run the kernel on the
real hardware too. I haven't actually tested it but
I think it ought to work in QEMU too (and if it doesn't
that's a bug I'd like to fix):

-- PMM

reply via email to

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