Showing posts with label 3.2.11. Show all posts
Showing posts with label 3.2.11. Show all posts

02 March 2012

90. Compiling kernel 3.2.9 on Debian Testing

UPDATE: the instructions below work without modification with kernel v 3.2.9

For a more exhaustive description of how to build a kernel for debian, see here:
http://verahill.blogspot.com.au/2012/02/debian-testing-building-your-own-linux.html

I'll be brief:
You need 6.6 Gb of free space to build, and a fair amount of free time.


sudo apt-get install kernel-package fakeroot
wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.2.9.tar.bz2
tar -xvf linux-3.2.9.tar.bz2 
cd linux-3.2.9/
cat /boot/config-`uname -r`>.config
make oldconfig
make-kpkg clean


-- apply to 32 bit only --
ln -s /home/me/tmp/linux-3.2.9/Documentation/virtual/lguest  Documentation/lguest
-- for 32 bit only end --


fakeroot make-kpkg -j4 --initrd --revision=3.2.9 kernel_image kernel_headers

where 4 is the number of cores(3)+1 (e.g. quadcore gives 5)
wait....wait...wait...takes a while...wait...wait...


mv ../linux*3.2.9*.deb .
sudo dpkg -i *.deb

Done. 
Linux tantalum 3.2.9 #1 SMP Fri Mar 2 15:21:59 EST 2012 x86_64 GNU/Linux

Minor note: Navigating Kernel.org


Each minor version has a stable release -- for 3.2.X it was 3.2.8 until 3.2.9 was released. Given that 3.3 is in the works, 3.2.9 will be the stable version of the 3.2 minor version.
"Full source" is the full kernel source, which is what we used in the example above. "Patch" is the difference between the previous version and the current version e.g. 3.2.8 vs 3.2.9 -- there's more information here. You can save both bandwidth and compile time by patching instead of doing a full download.




Build times:
Intel Celeron 32 bit (1.6 GHz)
still waiting...

AMD Athlon II X3 using -j4
real    44m56.522s
user    75m52.633s
sys     12m7.241s
Intel i5-2400 using -j5
real 22m26.712s
user 50m23.289
  sys 6m1.111s
AMD Phenom II X7 using -j7
real 28m46.599s
user 81m0.108s
sys 12m57.825s