slitaz-doc-wiki-data view pages/en/guides/kernel.txt @ rev 7

Add pages/en folder.
author Christopher Rogers <slaxemulator@gmail.com>
date Sat Feb 26 12:17:18 2011 +0000 (2011-02-26)
parents
children
line source
1 ====== Build your own custom Linux Kernel for SliTaz ======
3 ===== Prepare your system =====
6 * Install the slitaz-toolchain meta package. This package contains the required base files.
7 * binutils
8 * linux-headers
9 * glibc-dev
10 * gcc
11 * make
13 <code>
14 # tazpkg get-install slitaz-toolchain
15 </code>
17 * Install the packages required to configure and compile the kernel sources.
18 * ncurses-dev
19 * perl
21 <code>
22 # tazpkg get-install ncurses-dev
23 # tazpkg get-install perl
24 </code>
26 * 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..
28 <code>
29 # tazpkg get-install linux-source
30 # /usr/bin/get-linux-source
31 # ls -l /usr/src
32 lrwxrwxrwx 1 root root 21 Jul 21 21:27 linux -> linux-2.6.25.5-slitaz
33 drwxrwxr-x 23 root root 4096 Jul 21 22:41 linux-2.6.25.5-slitaz
34 -rw-r--r-- 1 root root 48589640 Jul 21 21:28 linux-2.6.25.5.tar.bz2
35 </code>
37 ===== Configure and Compile =====
39 The Linux kernel source tree is now ready to configure and compile.
41 * Go to the directory that contains the kernel source tree.
42 <code>
43 # cd /usr/src/linux
44 </code>
46 * Prepare the build from the default configuration.
47 <code>
48 # make oldconfig && make prepare
49 </code>
51 * Modify the kernel configuration to your needs, and compile.
52 * The //menuconfig// allows you to customise the kernel, which is built into the //bzImage// file. Any //modules// are built and then //install//ed in to the ///usr/include// directory. You should then copy the kernel itself to the ///boot// directory.
53 <code>
54 # make menuconfig
55 # make
56 # make modules
57 # make modules_install
58 # cp arch/x86/boot/bzImage /boot
59 </code>
61 * Configure the boot-loader (optional)
62 <code>
63 # leafpad /boot/grub/menu.lst
64 </code>
66 * Add the new kernel to the list
67 <file>
68 # My kernel:
69 title SliTaz GNU/Linux (cooking) (Kernel <VERSION>)
70 root (hd0,1)
71 kernel /boot/bzImage root=/dev/sda2
72 </file>
74 ----
75 \\
76 ^ Page Review Section ^^
77 |Quality| Medium |
78 |Review| Minor/Major Updates |
79 |Priority| Medium |
80 |Problems| add a [[http://forum.slitaz.org|forum post link]]|
81 |::: | OR add a [[http://labs.slitaz.org/issues |lab issue tracker link ]]|
82 |How to Improve| Add "tazwok cook linux"|
83 |::: | |
85 \\
86 ----