From eac04873e8d5f45775081088a1032a29ae75dee9 Mon Sep 17 00:00:00 2001 From: Rong Bao Date: Tue, 17 Feb 2026 15:49:35 +0800 Subject: [PATCH] vmlinuz-get-version: implement decompression for LZ4 and ZSTD Kernel has introduced some new compression methods since the introduction of this script in 2016. Some of the examples are LZ4 and Zstandard. The current implementation does not handle these new formats, so version strings from LZ4- or ZSTD-compressed vmlinuz'es would fail to extract. Implement extraction from these formats by syncing with upstream extract-vmlinux script. Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/extract-vmlinux?id=9702969978695d9a699a1f34771580cdbb153b33 ("scripts/extract-vmlinux") --- lib/vmlinuz-get-version | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/vmlinuz-get-version b/lib/vmlinuz-get-version index 619a3a30..bb062b6d 100755 --- a/lib/vmlinuz-get-version +++ b/lib/vmlinuz-get-version @@ -63,3 +63,5 @@ which unxz > /dev/null && try_decompress '\3757zXZ\000' abcde unxz which bunzip2 > /dev/null && try_decompress 'BZh' xy bunzip2 which unlzma > /dev/null && try_decompress '\135\0\0\0' xxx unlzma which lzop > /dev/null && try_decompress '\211\114\132' xy 'lzop -d' +which lz4 > /dev/null && try_decompress '\002!L\030' xxx 'lz4 -d' +which unzstd > /dev/null && try_decompress '(\265/\375' xxx unzstd