Revision 1 of 2026-11-25 18:54 UTC by tux, not the current one. Current version - History
Build your own custom Linux Kernel for SliTaz
4.0
Prepare your system
- Install the meta package slitaz-toolchain. This package contains the basic packages:
- 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 the package linux-source. The kernel sources will be downloaded from the mirror, installed in the directory /usr/src/linux-<VERSION>, and patched for SliTaz.
# tazpkg get-install linux-source
# /usr/bin/get-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
Configuration and Compilation
The Linux kernel sources are now ready to be configured and compiled.
- Change working directory to the kernel source tree directory.
# cd /usr/src/linux
- Preparing the build from the default configuration:
# make oldconfig && make prepare
- Modify the kernel configuration to your needs, and compile.
- The menuconfig allows you to customise the kernel, which is built into the bzImage file. Any modules are built and then installed in to the /usr/include directory. You should then copy the kernel itself to the /boot directory.
# make menuconfig
# make
# make modules
# make modules_install
# cp arch/x86/boot/bzImage /boot
- Configure the bootloader (optional)
# leafpad /boot/grub/menu.lst
- Add the new kernel to the list
# My kernel:
title SliTaz GNU/Linux (cooking) (Kernel //version//)
root (hd0,1)
kernel /boot/bzImage root=/dev/sda2
^ Page Review Section ^^
|Quality| Medium |
|Review| Minor and Major Updates |
|Priority| Medium |
|Problems| add a [[http://forum.slitaz.org|forum post link]]|
|::: | OR add a [[http://labs.slitaz.org/issues |lab issue tracker link ]]|
|::: | Bootloader configuration is described for old version of GRUB only |
|How to Improve| Add "tazwok cook linux"|
|::: | Bootloader configuration should be adapted to GRUB2 |