Skip to main content

Compiling Linux Kernel 3.4.x Vanilla Final - Ubuntu/Debian way

http://mapopa.blogspot.it/2009/01/compiling-2.html

 


This article is about compiling a kernel on Ubuntu systems. It describes how to build a custom kernel using the latest unmodified kernel sources from www.kernel.org (vanilla kernel) so that you are independent from the kernels supplied by your distribution.
Install the Required packages for building it

sudo apt-get install git-core kernel-package fakeroot build-essential ncurses-dev 

Then download latest kernel version

cd /usr/src 
sudo wget --continue www.kernel.org/pub/linux/kernel/v3.0/linux-3.4.2.tar.bz2
sudo tar jxvf linux-3.4.2.tar.bz2 cd linux-3.4.2

sudo cp /boot/config-`uname -r` ./.config
sudo make menuconfig


Disable xen
Processor Type and Features -> Paravirtualized Guest Support -> Xen

support otherwise you will get this error

sudo make-kpkg clean 
sudo fakeroot make-kpkg --initrd --append-to-version=-vanillaice kernel_image kernel_headers
cd ..
sudo dpkg -i linux-image-3.4.*
sudo shutdown -r now


you can install the headers too from /usr/src/linux-headers-3.4.*-*
in my case i can show you how the packages are named

ls *.deb 
linux-image-3.4.*-vanillaice_4.4.*-vanillaice-10.00.Custom_amd64.deb
linux-headers-3.4.*-vanillaice_4.4.*-vanillaice-10.00.Custom_amd64.deb

To top

fast tips

 

http://massimo.solira.org/pcikl/download.html

http://wiki.ubuntu-it.org/CompilazioneKernel

 

cd /usr/src/
aptitude install kernel-package
aptitude install fakeroot
tar xfvj /home/nikoz/Desktop/down/linux-2.6.22.6.tar.bz2
ln -sf linux-2.6.22.6/ linux
cd linux
cp /home/nikoz/config-c3 .config
fakeroot make-kpkg clean

fakeroot make-kpkg --initrd --append-to-version=-c3-2 kernel_image kernel_headers 

 

sudo dpkg -i kernel-image-[VERSIONE_DEL_KERNEL].deb
sudo dpkg -i linux-headers-[VERSIONE_DEL_KERNEL].deb

To top