All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Richard W.M. Jones" <rjones@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Should qemu -kernel option be able to gunzip kernel? (aarch64)
Date: Tue, 29 Jul 2014 20:49:45 +0100	[thread overview]
Message-ID: <20140729194945.GA14001@redhat.com> (raw)

On Fedora/aarch64, the kernel in /boot is a gzip-compressed file:

$ file /boot/vmlinuz-*
/boot/vmlinuz-0-rescue-520be7dc677d4fab99d3d3ce91f90c84: gzip compressed data, max compression, from Unix
/boot/vmlinuz-3.16.0-0.rc6.git3.1.rwmj2.fc22.aarch64:    gzip compressed data, max compression, from Unix
/boot/vmlinuz-3.16.0-0.rc6.git3.1.rwmj3.fc22.aarch64:    gzip compressed data, max compression, from Unix
/boot/vmlinuz-3.16.0-0.rc6.git3.1.rwmj4.fc22.aarch64:    gzip compressed data, max compression, from Unix

[not just for the custom kernels I've been building ...]

Apparently UEFI and u-boot can just handle this by uncompressing the
kernel on the fly.

However qemu-system-aarch64 -kernel option definitely can*not*, with
the result that if you do the "obvious":

  qemu-system-aarch64 -kernel /boot/vmlinuz-xxx

it just hangs immediately, because it's trying to execute gzip data.

I don't know the rights and wrongs of this.  Maybe Fedora is wrong for
having a gzip-compressed kernel.  But should the -kernel option be
able to detect if the file is gzip encoded and uncompress it on the
fly?  (If so I'll post a patch for this unless someone else jumps in).

Mainly I'm asking because I've no idea what is the right thing to do
here.  There could be another obvious fix.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top

             reply	other threads:[~2014-07-29 19:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-29 19:49 Richard W.M. Jones [this message]
2014-07-29 20:31 ` [Qemu-devel] Should qemu -kernel option be able to gunzip kernel? (aarch64) 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=20140729194945.GA14001@redhat.com \
    --to=rjones@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.