qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] HelloWord kernel for qemu-system-aarch64


From: Semion Prihodko
Subject: Re: [Qemu-devel] HelloWord kernel for qemu-system-aarch64
Date: Thu, 4 Sep 2014 16:40:58 +0300

Still don't know how to build/run a simple Hello World kernel on qemu-system-aarch64?

Guys, this is a very basic thing, please provide concrete steps. Thanks.


2014-09-04 16:29 GMT+03:00 Peter Maydell <address@hidden>:
On 4 September 2014 11:40, Semion Prihodko <address@hidden> wrote:
> Hi guys,
>
> Need your help. I trying to find a way to compile/link a minimal kernel
> which outputs "Hello World" in qemu-system-aarch64. No tutorial found. There
> is no problem running the same example in Foundation emulator, but I need
> QEMU.
>
> Trying to reuse axf-file in Foundation example:
>
> aarch64-linux-gnu-objcopy -O binary hello.axf kernel.bin
> qemu-system-aarch64 -machine virt -cpu cortex-a57 -nographic -smp 1 -m 3G
> -kernel kernel.bin
>
> I got:
>
> qemu: fatal: Trying to execute code outside RAM or ROM at 0x0000000000000000

If you use "-kernel" and it's not an ELF file, then we assume it's
a Linux kernel image with the arm64 Linux image header format.
Since in your case this probably isn't true, we're crashing very
early on.

You probably want:
(1) to pass the ELF file directly to QEMU rather than converting
it to a binary
(2) to make sure your image is linked correctly to work with
the "virt" board's memory layout, which is different from that
of the Foundation models

thanks
-- PMM


reply via email to

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