LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Blogs > neonsignal
User Name
Password

Notices

Rate this Entry

building a Debian kernel

Posted 11-27-2011 at 06:14 PM by neonsignal

To build a Debian kernel, first install the build tools. The ncurses package is used by the configuration menu.
Code:
apt-get install kernel-package ncurses-dev
Also get the source package
Code:
apt-get install linux-source-2.6
The source is archived, and has to be extracted into /usr/src:
Code:
tar xfj linux-source-2.6.32.tar.bz2
It is helpful for other tasks (such as modules) to have access to the linux headers, through a symbolic link in /usr/src:
Code:
ln -s /usr/src/kernel-source-2.6.32 /usr/src/linux
Then the build is done from within the linux directory. If this is not a fresh start, the old generated files can be cleaned out:
Code:
make clean && make mrproper
The configuration can be copied from the existing configuration:
Code:
make oldconfig
Or the configuration can be changed through the menu system:
Code:
make menuconfig
If it is not a fresh build, the old files can be cleaned out:
Code:
make-kpkg clean
And then the new kernel built. It is useful to append a tag to the version, so it is not confused with default configurations. The build doesn't have to be done from a root account, but fakeroot at least is required to generate the install files.
Code:
fakeroot make-kpkg buildpackage linux-image --initrd --append-to-version "-test0"
This will generate a dpkg image file, ready for installation:
Code:
dpkg -i linux-image-2.6.32.deb
Posted in Uncategorized
Views 296 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 02:57 PM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration