I cannot extract the config from a stored kernel image # ./scripts/extract-ikconfig /boot/linux-2.6.35-gentoo-r9 extract-ikconfig: Cannot find kernel config. # zgrep CONFIG_IKCONFIG /proc/config.gz CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # uname -r 2.6.35-gentoo-r9
Created attachment 249814 [details] /usr/src/linux/.config kernel config
[I] sys-kernel/gentoo-sources Available versions: (2.6.16-r13) 2.6.16-r13!b!s (2.6.27-r8) 2.6.27-r8!b!s (2.6.27-r10) (~)2.6.27-r10!b!s (2.6.28-r6) (~)2.6.28-r6!b!s (2.6.29-r5) 2.6.29-r5!b!s (2.6.29-r6) (~)2.6.29-r6!b!s (2.6.32-r7) 2.6.32-r7!b!s (2.6.32-r15) (~)2.6.32-r15!b!s (2.6.32-r16) (~)2.6.32-r16!b!s (2.6.32-r17) (~)2.6.32-r17!b!s (2.6.32-r18) (~)2.6.32-r18!b!s (2.6.32-r19) (~)2.6.32-r19!b!s (2.6.33-r2) 2.6.33-r2!b!s (2.6.33-r3) (~)2.6.33-r3!b!s (2.6.34-r1) 2.6.34-r1!b!s (2.6.34-r6) 2.6.34-r6!b!s (2.6.34-r7) (~)2.6.34-r7!b!s (2.6.34-r8) (~)2.6.34-r8!b!s (2.6.34-r9) (~)2.6.34-r9!b!s (2.6.34-r10) (~)2.6.34-r10!b!s (2.6.34-r11) (~)2.6.34-r11!b!s (2.6.35-r4) (~)2.6.35-r4!b!s (2.6.35-r5) (~)2.6.35-r5!b!s (2.6.35-r6) (~)2.6.35-r6!b!s (2.6.35-r7) (~)2.6.35-r7!b!s (2.6.35-r8) (~)2.6.35-r8!b!s (2.6.35-r9) (~)2.6.35-r9!b!s (2.6.35-r10) (~)2.6.35-r10!b!s {build deblob symlink ultra1} Installed versions: 2.6.35-r8(2.6.35-r8)!b!s(13:43:20 24/09/10)(-build -deblob -symlink) 2.6.35-r9(2.6.35-r9)!b!s(20:37:44 27/09/10)(-build -deblob -symlink) 2.6.35-r10(2.6.35-r10)!b!s(09:00:00 07/10/10)(-build -deblob -symlink) Homepage: http://dev.gentoo.org/~mpagano/genpatches Description: Full sources including the Gentoo patchset for the 2.6 kernel tree
Weird. I can't reproduce this in my 2.6.34-gentoo-r6 and it seems like all the relevant files (kernel/configs.c and scripts/extract-ikconfig) haven't been changed since 2.6.32 or so. Would you like to report this upstream at bugzilla.kernel.org? If you do so, please post back your bugzilla entry URL. Thanks!
I can reproduce that with zen-sources, from zen-stable.git (v2.6.35.6-8292-g9f7b777).
Worked fine for me on gentoo-sources-2.6.35-r8
Could you attach some working configs. perhaps we can find a difference, because that there is another option needed beside the IKCONFIG things.
(In reply to comment #6) > Could you attach some working configs. perhaps we can find a difference, > because that there is another option needed beside the IKCONFIG things. > Ok, found it (I think). As OP, I switched from default CONFIG_KERNEL_GZIP to CONFIG_KERNEL_LZMA. Downside is that ./scripts/extract-ikconfig relies on a gzip'ed bzimage: see invocation of zcat: ----8<------------8<------------8<------------8<------------8<-------- 34 # Initial attempt for uncompressed images or objects: 35 dump_config "$img" 36 # That didn't work, so decompress and try again: 37 tmp=/tmp/ikconfig$$ 38 trap "rm -f $tmp" 0 39 for pos in `tr "$gz1\n$gz2" "\n$gz2=" < "$img" | grep -abo "^$gz2"` 40 do 41 pos=${pos%%:*} 42 tail -c+$pos "$img" | zcat 2> /dev/null > $tmp 43 dump_config $tmp 44 done ----8<------------8<------------8<------------8<------------8<-------- /proc/config.gz is of course still usable for running kernel though, as long as CONFIG_IKCONFIG_PROC is set.
(In reply to comment #7) > (In reply to comment #6) > > Could you attach some working configs. perhaps we can find a difference, > > because that there is another option needed beside the IKCONFIG things. > > > > Ok, found it (I think). As OP, I switched from default CONFIG_KERNEL_GZIP to > CONFIG_KERNEL_LZMA. Downside is that ./scripts/extract-ikconfig relies on a > gzip'ed bzimage: see invocation of zcat: > That's exactly what I also found out. Bug or feature? Perhaps better to report upstream.
Heh, interesting! Theoretically it's a bug and scripts/extract-ikconfig should be changed to support all compression algorithms that the kernel supports.
Upstream bug has a working patch now.
This is now commit 532cf2907ac3b9c2345d76251764f4f4e602c921 in mainline
https://bugzilla.kernel.org/show_bug.cgi?id=19852
This will be in the next release of gentoo-sources-2.6.36
Released in gentoo-sources-2.6.36-r1.