Bug 148806

Summary: shipped kernel .config files are broken
Product: Red Hat Enterprise Linux 3 Reporter: Martin Wilck <martin.wilck>
Component: kernelAssignee: Ernie Petrides <petrides>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: petrides, riel
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-02-26 01:49:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
list of missing CONFIGs
none
list of unused configs none

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):
2.4.21-27.0.2.EL


How reproducible:
Always


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

CONFIG_HIGHMEM
CONFIG_HIGHPTE
CONFIG_X86_4G_VM_LAYOUT
CONFIG_X86_LOCAL_APIC
CONFIG_X86_PAE
CONFIG_X86_PGE



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.