OS: Ubuntu 11.10
Kernel: 3.0.0-15-generic-pae
After reading the instructions here's the list of commands that I have used to get where I am:
cd ~/src
sudo apt-get install fakeroot build-essential crash kexec-tools makedumpfile kernel-wedge
sudo apt-get build-dep linux
sudo apt-get install git-core libncurses5 libncurses5-dev libelf-dev asciidoc binutils-dev
sudo apt-get build-dep --no-install-recommends linux-image-$(uname -r)
apt-get source linux-image-$(uname -r)
cd linux-3.0.0
cp /boot/config-3.0.0-15-generic-pae .config
chmod -R u+x debian/scripts/*
debian/rules updateconfigs
fakeroot debian/rules clean
DEB_BUILD_OPTIONS=parallel=2 AUTOBUILD=1 NOEXTRAS=1 fakeroot debian/rules binary-debs
Here's the error:
make ARCH=i386 CROSS_COMPILE= KERNELVERSION=3.0.0-15-generic CONFIG_DEBUG_SECTION_MISMATCH=y KBUILD_BUILD_VERSION="26" LOCALVERSION= localver-extra= O=/home/matt/src/linux-3.0.0/debian/build/build-generic -j1 silentoldconfig prepare scripts
make[1]: Entering directory `/home/matt/src/linux-3.0.0'
make[3]: Nothing to be done for `/home/matt/src/linux-3.0.0/Makefile'.
GEN /home/matt/src/linux-3.0.0/debian/build/build-generic/Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
.config:5165:warning: override: TREE_RCU changes choice state
.config:6049:warning: override: MACH_NO_WESTBRIDGE changes choice state
#
# configuration written to .config
#
Using /home/matt/src/linux-3.0.0 as source for kernel
/home/matt/src/linux-3.0.0 is not clean, please run 'make mrproper'
in the '/home/matt/src/linux-3.0.0' directory.
make[4]: *** [prepare3] Error 1
make[3]: *** [sub-make] Error 2
make[2]: *** [prepare] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/matt/src/linux-3.0.0'
make: *** [/home/matt/src/linux-3.0.0/debian/stamps/stamp-prepare-tree-generic] Error 2
Can someone point me to the step that I missed, the extra step that I put in, the wrong order, the misspelling! From my point of view I gave the darned thing a .config file, why does it want to go an change settings automagically?!?
At this point I am very frustrated. I started this whole process to learn how to build kernel modules by compiling a 10 line kernel module. Four hours later and I haven't learned anything useful. Once upon a time kernel building didn't seem to be so hard. If I just run "make oldconfig && make" in the kernel source folder it will chug for hours and produce a vmlinux binary, but it is huge when compared to the kernel in /boot. Maybe it gets stripped or compressed when the package is built, but I worry that it isn't what I want.
BTW, I also tried binary-generic-pae, since I noticed that it says that it is building the generic kernel not the generic-pae kernel, but this didn't change anything.
Bookmarks