As on x86-64 and other architectures, the boot kernel on parisc (vmlinuz
and bzImage) contains a full compressed copy of the final kernel
executable (vmlinux.bin.gz), which one should be able to extract with
the extract-vmlinux script.
But on parisc extracting the kernel with extract-vmlinux fails.
Currently the script first checks if the given file is an ELF file
(which is true on parisc) and if so returns it. Thus on parisc we
unexpectedly get back the vmlinuz boot file instead of the uncompressed
vmlinux image.
This patch fixes this issue by reverting the logic. It now first tries
to find a compression signature in the given file and if that fails it
checks the file itself as fallback.
Signed-off-by: Helge Deller <deller@gmx.de>
Note that the LZ4 signature is different than that of modern LZ4 as we
use the "legacy" format which suffers from some downsides like inability
to disable compression.
Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This script can be used to extract vmlinux from a compressed
kernel image (bzImage, etc..). It's inspired from (a subset of)
extract-ikconfig.
It's something a lot of people have been looking for (mainly
people with xen < 4 that doesn't support bzImages at all).
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>