• Helge Deller's avatar
    extract-vmlinux: Check for uncompressed image as fallback · db139d71
    Helge Deller authored
    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: default avatarHelge Deller <deller@gmx.de>
extract-vmlinux 1.68 KB