Originally Posted by
Lekensteyn
TO build a kernel yourself
Hi Lekensteyn,
Finally I did build my own kernel. It's much easier than I thought...
more or less I followed this with some changes (the patches I needed to apply):
https://wiki.ubuntu.com/KernelTeam/GitKernelBuild
Code:
sudo apt-get install git-core kernel-package fakeroot build-essential libncurses5-dev
mkdir $HOME/kernel
cd $HOME/kernel
Code:
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
or an other git, depends on your needs. This is the mainline tree... afaik
Code:
cd linux
cp /boot/config-`uname -r` .config
note: since I installed other kernels from PPAs in the meanwhile, I explicitly copied the original kernel from Ubuntu 11.10:
Code:
cp /boot/config-3.0.0-12-generic-pae .config
Then download and apply patches (if you need to):
Code:
wget http://paste.debian.net/download/AAA
wget http://paste.debian.net/download/BBB
wget http://paste.debian.net/download/CCC
$ git am AAA BBB CCC
Applying:
Applying:
Applying:
and continue:
Code:
yes '' | make oldconfig
make-kpkg clean
CONCURRENCY_LEVEL=`getconf _NPROCESSORS_ONLN` fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers
if you need to test more kernels I suggest you change
--append-to-version= to something that tells you which one you are compiling
e.g.
Code:
CONCURRENCY_LEVEL=`getconf _NPROCESSORS_ONLN` fakeroot make-kpkg --initrd --append-to-version=-someText kernel_image kernel_headers
this took about 40 mins for me
Code:
cd ..
sudo dpkg -i linux*.deb
In my case it run directly the new kernel but to make sure I
edited /etc/default/grub (don't forget update-grub after editing)
Code:
# I want to see the menu!
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=3
when you rebooted, you can see if you are actually running the new kernel with:
somewhere in the output you should find -someText
Bookmarks