Debian Kernel setup

From Bashlinux
Jump to: navigation, search

How to build the Kernel from Debian repositories

In order to accomplish this you might need to get the sources and setup the environment

  • Install the proper packages to build the kernel
apt-get install ncurses-dev fakeroot kernel-package build-essential devscripts
  • Build kernel dependencies
apt-get build-dep linux-2.6
  • Get Debian kernel sources
apt-get source linux-2.6

Note: deb-src must be present on /etc/apt/sources.list file

How to build Debian Kernel

  • If kernel is patched, check it twice as follows
make -f debian/rules source-all
  • First time must fail
  • If you are building all the kernel related packages, then do as follows. It should take about 40GB of disk space.
~/src/linux-2.6-2.6.24~rc6$ debuild -e DEBIAN_KERNEL_JOBS=${NR_CPUS}
  • If you are building an specific architecture, then
fakeroot make -f debian/rules.gen setup_i386_none_k7
  • This will build the packages for AMD K7
  • If there is any change to apply, then go the the k7 folder and config the kernel
make menuconfig
  • Build the kernel
fakeroot make -f debian/rules.gen binary-arch_i386_none_k7 binary-indep DEBIAN_KERNEL_JOBS=${NR_CPUS}