Skip to contentSkip to conversation

scripts/extract-ikconfig: Support LZ4-compressed images.

PATCH In review Alex Pilon 2 participants 2 messages Apr 14, 2015 – Apr 15, 2015

lore
Share & tools
lore

Alex Pilon

author
#0 lore raw

PATCH 1/1 scripts/extract-ikconfig: Support LZ4-compressed images.

Support for kernel image LZ4 compression was added around 3.11, but not the corresponding kernel .config extraction.

This makes possible extracting the kernel config for LZ4-compressed kernels you're not running, or the current LZ4-compressed kernel if compiled without /proc/config.gz support.

---
 scripts/extract-ikconfig | 1 +
 1 file changed, 1 insertion(+)
scripts/extract-ikconfig +1 -0
index e186242..3b42f25 100755
@@ -61,6 +61,7 @@ try_decompress '\3757zXZ\000' abcde unxz
 try_decompress 'BZh'          xy    bunzip2
 try_decompress '\135\0\0\0'   xxx   unlzma
 try_decompress '\211\114\132' xy    'lzop -d'
+try_decompress '\002\041\114\030' xyy 'lz4 -d -l'
 
 # Bail out:
 echo "$me: Cannot find kernel config." >&2
Signature · 1 line
2.3.5
#1 lore raw
Quoted 8 lines · Alex Pilon

Support for kernel image LZ4 compression was added around 3.11, but not the corresponding kernel .config extraction.

This makes possible extracting the kernel config for LZ4-compressed kernels you're not running, or the current LZ4-compressed kernel if compiled without /proc/config.gz support.

Applied to kbuild.git#misc.

Michal