Genkernel is using a config file for x86 builds that contains full debugging information. This is causing kernel builds to use nearly 10x the disk space as they originally required. The config file came from the livecd kernel config. Reproducible: Always Steps to Reproduce: 1. genkernel all Actual Results: Any object file in /usr/src/linux will contain full debugging information when viewied with objdump -h Expected Results: File sizes should be considerably small. The Genkernel SVN for revision 678 reports this change: r678 | wolf31o2 | 2008-06-06 02:42:37 +1000 (Fri, 06 Jun 2008) | 1 line Sync kernel configs from releng/trunk/releases/2008.0/kconfig and remove some unused configs. This is when the problem occurred. Examining the repository for the file livecd-2.6.24.config showed this change: http://viewcvs.gentoo.org/viewcvs.py/releng/trunk/releases/2008.0/kconfig/x86/livecd-2.6.24.config?rev=551&view=log Revision 512 - (view) (download) (annotate) - [select for diffs] Modified Sat Apr 12 17:56:16 2008 UTC (4 months, 2 weeks ago) by wolf31o2 File length: 66264 byte(s) Diff to previous 510 Added more debugging information for bug #216789 and removing older kernel configs. If you follow the bug #21678 you find the following 2 comments. http://bugs.gentoo.org/show_bug.cgi?id=216789#c6 ------- Comment #6 From Martin Mokrejs 2008-04-11 10:15:55 0000 [reply] ------- Why isn't kernel debug enabled on distribution media? It does not slow down the machine when enabled decently. The CONFIG_DEBUG_KERNEL add several variables otherwise not present in .config, so best is to enable it through 'make menuconfig'. Anyway, here is what I propose for future kernels on distribution media. CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_INFO=y CONFIG_FRAME_POINTER=y http://bugs.gentoo.org/show_bug.cgi?id=216789#c10 ------- Comment #10 From Chris Gianelloni (RETIRED) 2008-04-12 17:59:17 0000 [reply] ------- OK, I added the debugging options and they'll show up in 2008.0 Beta 2. Of course, we've also updated to the 2.6.24 kernel and made quite a few kernel config changes, so this might be fixed, anyway. This shows that the change from the livecd ended up in the config file for genkernel. These 4 config options need to be switched back. This will make syncing difficult in the future though as it would be likely it would be overwritten in later genkernel revisions again.
This has already been "fixed" in git. Of course, you can always just use --menuconfig and disable them yourself instead of complaining that you don't like the default config.
I've tried to find the actual repository used and had no luck. Using the SVN one listed still shows debugging enabled: http://anonsvn.gentoo.org/ I then used google and found this one which also had it still enabled: http://git.wolf31o2.org/gitweb/ When I clone the git repository I found no references to genkernel. git://anongit.gentoo.org/ Where is the actual genkernel repository located? With the retirement of Chris Gianelloni its made it quite confusing in regards to this package. I think my bug is quite valid. Genkernel has never had a config with debugging enabled and suddenly its turned on. I would expect most users using genkernel do not want it enabled either (otherwise they probably wouldn't be using genkernel in the first place). I would consider this a regression when the new config was copied over. I saw no other report of this and filed a bug to help track this problem.
http://git.wolf31o2.org/gitweb/?p=projs/genkernel.git;a=summary is the canonical repo. CONFIG_DEBUG_INFO=y is the option that is the source of the size issues here. Here's the only effect it has during the build: ==== ifdef CONFIG_DEBUG_INFO KBUILD_CFLAGS += -g KBUILD_AFLAGS += -gdwarf-2 endif ==== results of just flipping it: -rwxr-xr-x 1 root root 59985797 2008-08-27 20:10 vmlinux.debug-info -rwxr-xr-x 1 root root 11314053 2008-08-27 20:05 vmlinux.non-debug-info ~60Mb vs. ~11Mb just for the vmlinux output. It doesn't get copied into the bzImage either, as that is stripped of all -g debug info. The Kconfig description: ====== If you say Y here the resulting kernel image will include debugging info resulting in a larger kernel image. This adds debug symbols to the kernel and modules (gcc -g), and is needed if you intend to use kernel crashdump or binary object tools like crash, kgdb, LKCD, gdb, etc on the kernel. Say Y here only if you plan to debug the kernel. ====== Sure I expect to help users debug stuff, but kgdb et all are way beyond the level of support need for the media (and the -g option doesn't help the media at all since we don't ship the debuginfo for the kernels we generate). If the user in question is sufficiently advanced enough to debug with kgdb, they can build a debug kernel themselves for use. For everybody else, the frame-pointers and BUG() verbose are more than sufficient. It's still in the current git for x86/amd64, but not any other arch. Could it please be removed? as at commit id 32a427af88d18c0c550d35a6a574357236ac586d: # grep CONFIG_DEBUG_INFO=y -r . ./arch/x86/kernel-config:CONFIG_DEBUG_INFO=y ./arch/x86_64/kernel-config:CONFIG_DEBUG_INFO=y ./defaults/kernel-config:CONFIG_DEBUG_INFO=y
Hmm, I thought we'd already done this. Anyway, I disabled the CONFIG_DEBUG_INFO option in the x86{,_64} kconfigs, but I left all the others turned on.
agaffney: thanks, but by 'others' the only other place it's turned on is defaults/kernel-config. All the other arch/*/* configs have it turned off too.
He meant the other *_DEBUG_* options.
This is how it looks in Git HEAD of now: # fgrep -R CONFIG_DEBUG_INFO= . ./defaults/kernel-config:CONFIG_DEBUG_INFO=y From you comments I'm unsure if you want that set to "no" or if status quo is what you wanted already. Robin?
Need info^^^. If I do not hear anything during the next two week, I may close this bug.
(In reply to comment #8) > If I do not hear anything during the next two week, I may close this bug. Closing.