Bug 19852 - extract-ikconfig only works with gzip'ed kernel images
Summary: extract-ikconfig only works with gzip'ed kernel images
Status: CLOSED CODE_FIX
Alias: None
Product: Other
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: other_other
URL: https://bugs.gentoo.org/show_bug.cgi?...
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-07 17:06 UTC by Justin
Modified: 2010-10-31 18:08 UTC (History)
3 users (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Add support for kernels compressed with bzip2, lzma or lzo, in addition to gzip. (3.56 KB, patch)
2010-10-12 22:13 UTC, Randy Dunlap
Details | Diff
cleanup up patch, now applies cleanly (2.19 KB, patch)
2010-10-12 22:20 UTC, Randy Dunlap
Details | Diff
revised patch that also works with busybox zcat (2.20 KB, patch)
2010-10-13 19:06 UTC, Dick Streefland
Details | Diff

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.

Note You need to log in before you can comment on or make changes to this bug.