[TriLUG] some kernel building observations
rpjday at mindspring.com
Wed Dec 26 05:34:59 EST 2001
just perusing the Makefile and Configure files for building a kernel,
and here's a few observations that people are free to either confirm or
refute -- either way works for me. i'm just trying to understand these
scripts which are, IMHO, not as well written as they could be. sigh.
regarding cleaning the source tree, most people know about
# make clean (pretty clean)
# make mrproper (really clean)
but there's also:
# make distclean (really, REALLY clean)
"make distclean" runs "make mrproper", then also removes all .orig, .rej,
.bak and other files. as far as i can tell, there's no clean even more
thorough than that. it's worth knowing about these since red hat seems
to ship their kernel source RPMs with some junk left over from a
previous build. not serious, just an observation.
if you start to build a kernel, the order of search for a "config" file
with pristine kernel source (that is, not red hat kernel source) is
arch/$(ARCH)/defconfig (for you, most likely, ARCH=i386)
red hat, on the other hand, augments their kernel source RPM with a
"configs" directory, and also augments the scripts/Configure script
to make the search order:
configs/<appropriate config file> (as in, kernel-2.4.7-i686.config)
near as i can tell, this search order holds for all configurations,
including "make oldconfig".
regarding "make oldconfig", the standard (pristine) kernel source
supports "make oldconfig" to build a new config file that matches an
existing config file as much as possible. if the newer kernel source
has an option not listed in the current config file, you're prompted
for what you'd like to do with it. so far, no big deal.
red hat has again augmented their Makefile with the target
"make oldconfig-nonint", for a non-interactive version of this
target. if there is no such option, you get a default answer of
"no" and a record of all unrecognized options is saved in a file
called "nodefaults". good for hands-off upgrading, if you're
willing to take the chance of having the script answer these
questions for you.
More information about the TriLUG