qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Kunkun Jiang <jiangkunkun@huawei.com>
Cc: "open list:All patches CC here" <qemu-devel@nongnu.org>,
	 "wanghaibin.wang@huawei.com" <wanghaibin.wang@huawei.com>,
	Zenghui Yu <yuzenghui@huawei.com>
Subject: Re: [Question] Can I start qemu-system-aarch64 with a vmlinux(ELF format)?
Date: Thu, 29 Feb 2024 09:44:05 +0000	[thread overview]
Message-ID: <CAFEAcA-O00Sc9N_esAZ1CwfjmL7uprw_pcVcP=ZLFvu0-oA0AA@mail.gmail.com> (raw)
In-Reply-To: <c91c1f3d-9ff1-a582-bf03-ecf182c78b1b@huawei.com>

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.

-- PMM


  reply	other threads:[~2024-02-29  9:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-27 14:41 [Question] Can I start qemu-system-aarch64 with a vmlinux(ELF format)? Kunkun Jiang via
2024-02-27 15:28 ` Peter Maydell
2024-02-29  3:01   ` Kunkun Jiang via
2024-02-29  9:44     ` Peter Maydell [this message]
2024-03-05 10:35       ` Kunkun Jiang via
2024-03-05 10:56         ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFEAcA-O00Sc9N_esAZ1CwfjmL7uprw_pcVcP=ZLFvu0-oA0AA@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=jiangkunkun@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wanghaibin.wang@huawei.com \
    --cc=yuzenghui@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).