qemu-devel
[Top][All Lists]
Advanced

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

Re: [Question] Can I start qemu-system-aarch64 with a vmlinux(ELF format


From: Kunkun Jiang
Subject: Re: [Question] Can I start qemu-system-aarch64 with a vmlinux(ELF format)?
Date: Tue, 5 Mar 2024 18:35:50 +0800
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

Hi Peter,

On 2024/2/29 17:44, Peter Maydell wrote:
On Thu, 29 Feb 2024 at 03:01, Kunkun Jiang <jiangkunkun@huawei.com> wrote:
Hi Peter,

On 2024/2/27 23:28, Peter Maydell wrote:
On Tue, 27 Feb 2024 at 14:42, Kunkun Jiang via <qemu-devel@nongnu.org> wrote:
Hi everybody,

I want to start qemu-system-aarch64 with a vmlinux,
which is an ELF format file. The arm_load_elf() is
implemented in arm_setup_direct_kernel_boot(). So I
thought it was supporting the ELF format file.
No, you can't do this. The hw/arm/boot.c code assumes
that ELF files are "bare metal" binaries, whereas
uImage format, AArch64 Image format, and raw binary files
are Linux kernels. Only the last three kinds of files will
be started with the boot protocol the Linux kernel expects.

For AArch64, pass the -kernel option the path to the Image
file, not the vmlinux file.
Yes, it works fine using Image files.
I would also like to ask again, is it because AArch64 does not
support vmlinux, or is it because qemu does not implement
this capability?
As I said, it is because QEMU assumes that ELF files are
bare metal images, not Linux kernel images.

Sorry to bother you again. I still have a few questions.
1. What does "bare metal images" mean? Are they used in tcg mode?

2. How QEMU assumes an ELF file is a bare metal image? Can you post
the corresponding code?

3. How can I make the hw/arm/boot.c code assumes the ELF files are
Linux kernels?

Looking forward to your reply.

Thanks,
Kunkun Jiang




reply via email to

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