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):
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
Fails with lots of "undefined reference" errors.
Compiles bzImage successfully.
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
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
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.
Both attachments were generated for the i686-hugemem config.
Note that the "missing" list contains stuff like
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.
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 SPEC_CFLAGS=-g bzImage
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".)
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.