Bug 148806 - shipped kernel .config files are broken
Summary: shipped kernel .config files are broken
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel   
(Show other bugs)
Version: 3.0
Hardware: i386 Linux
Target Milestone: ---
Assignee: Ernie Petrides
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2005-02-15 19:15 UTC by Martin Wilck
Modified: 2007-11-30 22:07 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-02-26 01:49:20 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
list of missing CONFIGs (1.01 KB, text/plain)
2005-02-15 19:19 UTC, Martin Wilck
no flags Details
list of unused configs (4.26 KB, text/plain)
2005-02-15 19:20 UTC, Martin Wilck
no flags Details

Description Martin Wilck 2005-02-15 19:15:57 UTC
Description of problem:

It is impossible to compile bzImage/vmlinux with the kernel config files
shipped in the kernel-source package.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. boot with hugemem kernel to have correct /boot/kernel.h
2. cp configs/kernel-i686-hugemem.config .config
3. make bzImage

Actual results:
Fails with lots of "undefined reference" errors.

Expected results:
Compiles bzImage successfully.

Additional info:
Obviously similar to BUG 104676, but I wasn't able to add a comment there.
("you tried to change component from 'kernel' to 'kernel' ....)

The reason is that important CONFIG_xyz settings are missing in the configs
files under configs/ (see attachment). Because of the missing CONFIGs, a lot 
of necessary source files aren't compiled.

here's a workaround that worked for me:

cp configs/kernel-2.4.21-i686-hugemem.config .config
tar cf i.tar include/linux/autoconf.h  # save autoconf.h
make oldconfig                         # rebuild config file, (rebuilds
                                       #   autoconf.h, too)
tar xf i.tar                           # restore autoconf.h
make -j4 vmlinux                       # Go

Comment 1 Martin Wilck 2005-02-15 19:19:04 UTC
Created attachment 111105 [details]
list of missing CONFIGs 

a list of CONFIGs set to y or m in the working .config but missing inn the
shipped one

Comment 2 Martin Wilck 2005-02-15 19:20:55 UTC
Created attachment 111107 [details]
list of unused configs

list of configs that are set to y or m in the shipped file but are undefined
after make oldconfig.

Comment 3 Martin Wilck 2005-02-15 19:23:17 UTC
Both attachments were generated for the i686-hugemem config.
Note that the "missing" list contains stuff like


Comment 4 Martin Wilck 2005-02-15 19:29:37 UTC
You'll say compiling bzImage is unsupported. Fine, but in order to use the
diskdump/netdump features and the "crash" utility it is necessary to rebuild the
kernel with the -g switch. This bug makes this unnecessarily hard to do.

Comment 5 Ernie Petrides 2005-02-26 01:49:20 UTC
Hello, Martin.  I believe that this is a problem in your build procedure.
After doing this:

  cp configs/kernel-i686-hugemem.config .config

You should do the following 4 makes (note that the "-g" arg is optional):

  make oldconfig
  make dep
  make SPEC_CFLAGS=-g bzImage
  make modules

Please reopen this bug if this doesn't work for you.

(I'm not sure, but you I think you should do "make mrproper" before the "cp".)

Comment 6 Martin Wilck 2005-02-28 07:04:19 UTC
Yes, this works (of course). The less destructive steps outlined in my initial
report above "work", too. 

But "make oldconfig; make dep" destroys the "RedHat-adapted" include files under
include/, in particular include/linux/autoconf.h and the .ver files. That takes
away the possibility to build modules safely against original RH headers and
breaks the kernel-source RPM installation.

If only the files under configs were identical to those generated by the "make
oldconfig" step above, it'd be sufficient to copy the config file and "make
bzImage". To my understanding,  this is how the kernel compilation under RedHat
is supposed to work (it used to be a RH bonus to "make it simple" this way).

Shouldn't be too hard to fix in the SPEC file either.

Anyway this isn't a showstopper, it's just annoying; so I'm not reopening this bug.

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