On Tue, Dec 16, 2014 at 12:25:41PM +0000, Peter Maydell wrote:
> On 16 December 2014 at 12:20, Alexander Graf <ag...@suse.de> wrote:
> > The patch as is assumes that AArch64 images are always gzipped. I don't
> > think this assumption is correct - if you do "make Image" on a kernel
> > source tree, you will get an uncompressed Image file.
> >
> > I think we'd be better off trying to load it as gzip and if it's not
> > gzipped, fall back to linear load.
> 
> Ah, I see what you mean. Yes, we need to continue to support
> loading non-compressed Images as well as compressed ones,
> so this patch needs to do the try-and-fall-back, in the
> same way the current loader code does.

Hang on, I tested the non-compressed case when I originally submitted
the patch.

And indeed it does work (still):

(using qemu dfa9c2a0f4d0a0c8b2c1449ecdbb1297427e1560)
$ cp /boot/vmlinuz-3.18.0-1.fc22.aarch64 /tmp/Image.gz
$ gunzip /tmp/Image.gz 
$ ./aarch64-softmmu/qemu-system-aarch64 -kernel /tmp/Image -append 
'console=ttyAMA0 earlyprintk=pl011,0x9000000 ignore_loglevel'
No machine specified, and there is no default.
Use -machine help to list supported machines!
rjones@mustang:~/d/qemu$ ./aarch64-softmmu/qemu-system-aarch64 -M virt -cpu 
cortex-a57 -kernel /tmp/Image -append 'console=ttyAMA0 
earlyprintk=pl011,0x9000000 ignore_loglevel'
rjones@mustang:~/d/qemu$ 
rjones@mustang:~/d/qemu$ ./aarch64-softmmu/qemu-system-aarch64 -M virt -cpu 
cortex-a57 -kernel /tmp/Image -append 'console=ttyAMA0 
earlyprintk=pl011,0x9000000 ignore_loglevel' -serial stdio
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.18.0-1.fc22.aarch64 
(mockbu...@apm-mustang-ev3-11.ml3.eng.bos.redhat.com) (gcc version 4.9.2 
20141101 (Red Hat 4.9.2-1) (GCC) ) #1 SMP Thu Dec 11 11:47:50 UTC 2014

[etc]

And for completeness with a compressed kernel:

$ ./aarch64-softmmu/qemu-system-aarch64 -M virt -cpu cortex-a57 -kernel 
/boot/vmlinuz-3.18.0-1.fc22.aarch64 -append 'console=ttyAMA0 
earlyprintk=pl011,0x9000000 ignore_loglevel' -serial stdio
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.18.0-1.fc22.aarch64 
(mockbu...@apm-mustang-ev3-11.ml3.eng.bos.redhat.com) (gcc version 4.9.2 
20141101 (Red Hat 4.9.2-1) (GCC) ) #1 SMP Thu Dec 11 11:47:50 UTC 2014
[    0.000000] CPU: AArch64 Processor [411fd070] revision 0

[etc]

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW

Reply via email to