SliTaz GNU/Linux official and community documentation wiki.
.png
Translations of this page:

This is an old revision of the document!


Build your own custom Linux Kernel for SliTaz

Prepare your system

  • Install the slitaz-toolchain meta package. This package contains the required base files.
    • binutils
    • linux-headers
    • glibc-dev
    • gcc
    • make
# tazpkg get-install slitaz-toolchain
  • Install the packages required to configure and compile the kernel sources.
    • ncurses-dev
    • perl
# tazpkg get-install ncurses-dev
# tazpkg get-install perl
  • SliTaz provides a linux-source package. The kernel source tree will be downloaded from the mirror, installed to the /usr/src/linux-<VERSION> directory, and patched for SliTaz..
# tazpkg get-install linux-source
# ls -l /usr/src
lrwxrwxrwx    1 root     root           21 Jul 21 21:27 linux -> linux-2.6.25.5-slitaz
drwxrwxr-x   23 root     root         4096 Jul 21 22:41 linux-2.6.25.5-slitaz
-rw-r--r--    1 root     root     48589640 Jul 21 21:28 linux-2.6.25.5.tar.bz2

Configure and compile

The Linux kernel source tree is now ready to configure and compile.

  • Go to the kernel source tree directory.
# cd /usr/src/linux
  • Prepare the build.
# make oldconfig && make prepare
  • Modify the kernel configuration to your needs, and compile.
# make menuconfig
# make bzImage
# make modules 
# make modules_install
# cp arch/x86/boot/bzImage /boot
  • Configure the bootloader (optional)
# leafpad /boot/grub/menu/lst
  • And add.
# My kernel:
title 	SliTaz GNU/Linux (cooking) (Kernel <VERSION>)
		root (hd0,1)
		kernel /boot/bzImage root=/dev/sda2

Of course, adapt to your needs…

 
en/guides/kernel.1266954693.txt.gz · Last modified: 2010/07/08 17:16 (external edit)