From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=53962 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OtlAr-0003y8-1k for qemu-devel@nongnu.org; Thu, 09 Sep 2010 13:44:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OtlAp-0005zI-68 for qemu-devel@nongnu.org; Thu, 09 Sep 2010 13:44:36 -0400 Received: from moutng.kundenserver.de ([212.227.126.171]:50271) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OtlAo-0005z7-Nv for qemu-devel@nongnu.org; Thu, 09 Sep 2010 13:44:35 -0400 Message-ID: <4C891CFC.5090104@mail.berlios.de> Date: Thu, 09 Sep 2010 19:44:28 +0200 From: Stefan Weil MIME-Version: 1.0 References: <1281365286-7050-1-git-send-email-weil@mail.berlios.de> In-Reply-To: <1281365286-7050-1-git-send-email-weil@mail.berlios.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] hw/arm: Improve detection of Linux kernels List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: QEMU Developers , Paul Brook 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 > Signed-off-by: Stefan Weil > --- > 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?