Bug 19852

Summary: extract-ikconfig only works with gzip'ed kernel images
Product: Other Reporter: Justin (jlec)
Component: OtherAssignee: other_other
Status: CLOSED CODE_FIX    
Severity: normal CC: dick, florian, randy.dunlap
Priority: P1    
Hardware: All   
OS: Linux   
URL: https://bugs.gentoo.org/show_bug.cgi?id=340021
Kernel Version: Subsystem:
Regression: No Bisected commit-id:
Attachments: Add support for kernels compressed with bzip2, lzma or lzo, in addition to gzip.
cleanup up patch, now applies cleanly
revised patch that also works with busybox zcat

Description Justin 2010-10-07 17:06:30 UTC
When anything else then CONFIG_KERNEL_GZIP is selected e.g. CONFIG_KERNEL_BZIP2, the script extract-ikconfig fails with "extract-ikconfig: Cannot find kernel config."
This should be either checked in the script or support for pther compression methods may be nice.
Comment 1 Randy Dunlap 2010-10-12 22:13:57 UTC
Created attachment 33392 [details]
Add support for kernels compressed with bzip2, lzma or lzo, in addition to gzip.

Justin, please test this patch to scripts/extract-ikconfig.
This is from Dick Streefland and was posted here:
http://marc.info/?l=linux-kbuild&m=128683621407052&w=2
Comment 2 Randy Dunlap 2010-10-12 22:20:53 UTC
Created attachment 33402 [details]
cleanup up patch, now applies cleanly

Smae patch without the leading comments that patch is
confused by.
Comment 3 Justin 2010-10-13 06:59:44 UTC
It does work partially. So the config is not send to stdout, but in .1 of the temporary files the config is in.
Comment 4 Dick Streefland 2010-10-13 19:06:57 UTC
Created attachment 33502 [details]
revised patch that also works with busybox zcat

I'm not sure why the script doesn't work for you, but perhaps you use a version of zcat that doesn't return exit status 2 when there is trailing garbage? I just discovered that the busybox version of zcat returns 0 in this case. The revised patch should also work for these versions of zcat.
Comment 5 Justin 2010-10-14 06:45:09 UTC
(In reply to comment #4)
> Created an attachment (id=33502) [details]
> revised patch that also works with busybox zcat
> 

Nice that one works as expected.
Comment 6 Florian Mickler 2010-10-31 18:06:34 UTC
This is now commit 532cf2907ac3b9c2345d76251764f4f4e602c921 in mainline.