From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34886) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzR9J-0006m5-Qp for qemu-devel@nongnu.org; Fri, 12 Dec 2014 09:24:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XzR9E-0002qN-3t for qemu-devel@nongnu.org; Fri, 12 Dec 2014 09:24:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34138) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzR9D-0002q9-Se for qemu-devel@nongnu.org; Fri, 12 Dec 2014 09:24:48 -0500 Message-ID: <548AFAA7.7050207@redhat.com> Date: Fri, 12 Dec 2014 15:24:39 +0100 From: Laszlo Ersek MIME-Version: 1.0 References: <1418087585-27601-1-git-send-email-lersek@redhat.com> <1418087585-27601-7-git-send-email-lersek@redhat.com> <548AF32B.2020503@redhat.com> <548AF762.4020707@redhat.com> <20141212141452.GA15695@redhat.com> In-Reply-To: <20141212141452.GA15695@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 6/7] hw/arm: pass pristine kernel image to guest firmware over fw_cfg List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Richard W.M. Jones" Cc: Peter Maydell , Andrew Jones , QEMU Developers On 12/12/14 15:14, Richard W.M. Jones wrote: > On Fri, Dec 12, 2014 at 03:10:42PM +0100, Laszlo Ersek wrote: >> Sure, if you have a kernel image (with the EFI stub) that is an >> *immediately executable* EFI binary, then you can just go to the UEFI >> shell, navigate to the filesystem / directory that hosts that image, and >> run it. (Similarly, PXE boot it etc.) >> >> But in this case the EFI binary is compressed with gzip (for aarch64 >> kernels); you couldn't even run it from the UEFI shell. > > But ... > > $ file /boot/vmlinuz-3.18.0-0.rc7.git0.1.rwmj10.fc22.aarch64 > /boot/vmlinuz-3.18.0-0.rc7.git0.1.rwmj10.fc22.aarch64: gzip compressed data, max compression, from Unix > $ uname -a > Linux mustang.home.annexia.org 3.18.0-0.rc7.git0.1.rwmj10.fc22.aarch64 #1 SMP Mon Dec 1 18:40:10 GMT 2014 aarch64 aarch64 aarch64 GNU/Linux > > How does it work on the baremetal hardware? You boot it with grub, which is a UEFI application that loads the image from disk with UEFI protocols, but then decompresses the image itself, before running it. It is not the firmware itself that loads it with the LoadImage() boot service. Try decompressing the kernel manually with gunzip, and then running "file" on it. Thanks Laszlo