qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Weil <weil@mail.berlios.de>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	Paul Brook <paul@codesourcery.com>
Subject: [Qemu-devel] Re: [PATCH] hw/arm: Improve detection of Linux kernels
Date: Thu, 09 Sep 2010 19:44:28 +0200	[thread overview]
Message-ID: <4C891CFC.5090104@mail.berlios.de> (raw)
In-Reply-To: <1281365286-7050-1-git-send-email-weil@mail.berlios.de>

Am 09.08.2010 16:48, schrieb Stefan Weil:
> ELF images were not detected as linux kernels.
>
> Assume that they are linux kernels if the kernel name contains 'vmlinux'.
>
> Cc: Paul Brook<paul@codesourcery.com>
> Signed-off-by: Stefan Weil<weil@mail.berlios.de>
> ---
>   hw/arm_boot.c |    6 ++++--
>   1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/hw/arm_boot.c b/hw/arm_boot.c
> index 620550b..e73ef42 100644
> --- a/hw/arm_boot.c
> +++ b/hw/arm_boot.c
> @@ -204,7 +204,7 @@ void arm_load_kernel(CPUState *env, struct arm_boot_info *info)
>       int kernel_size;
>       int initrd_size;
>       int n;
> -    int is_linux = 0;
> +    int is_linux;
>       uint64_t elf_entry;
>       target_phys_addr_t entry;
>       int big_endian;
> @@ -225,7 +225,9 @@ void arm_load_kernel(CPUState *env, struct arm_boot_info *info)
>       big_endian = 0;
>   #endif
>
> -    /* Assume that raw images are linux kernels, and ELF images are not.  */
> +    /* Assume that raw images are linux kernels, and ELF images
> +       are not (unless the kernel filename contains 'vmlinux'). */
> +    is_linux = (strstr(info->kernel_filename, "vmlinux") != NULL);
>       kernel_size = load_elf(info->kernel_filename, NULL, NULL,&elf_entry,
>                              NULL, NULL, big_endian, ELF_MACHINE, 1);
>       entry = elf_entry;
>    


The patch is still missing in qemu master. Is anything missing,
or can it be applied?

      reply	other threads:[~2010-09-09 17:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-09 14:48 [Qemu-devel] [PATCH] hw/arm: Improve detection of Linux kernels Stefan Weil
2010-09-09 17:44 ` Stefan Weil [this message]

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=4C891CFC.5090104@mail.berlios.de \
    --to=weil@mail.berlios.de \
    --cc=aliguori@us.ibm.com \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    /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).