LinuxBIOS SDK, Building LinuxBIOS Kernel Next Previous Contents

LinuxBIOS SDK

3. Building LinuxBIOS Kernel


3.1 Preparation

3.1.1 Getting Kernel

The latest supported Linux Kernel is 2.4.17. It can be downloaded at http://www.kernel.org. Put the tarball in /usr/src/linuxbios/kernel.

3.1.2 Unpacking Kernel

Before unpacking the tarball, make sure /usr/src/linuxbios does not exist. If it does, rename it to something else. Then unpack the tarball:
$ tar zxf kernel/linux-2.4.17.tar.gz
$ mv linux linux-2.4.17-linuxbios_1
$ ln -sf linux-2.4.17-linuxbios_1 linux

Edit /usr/src/linuxbios/linux/Makefile, then look for EXTRAVERSION. Change the value to -linuxbios_1.

3.1.3 Patching Kernel

New patches can be found at http://www.cwlinux.com/downloads. Put patches in /usr/src/linuxbios/kernel-patches. To install patches:

$ patch -p1 -d /usr/src/linuxbios/linux < /usr/src/linuxbios/kernel-patches/patchXX

For gzip format,
$ gzip -dc /usr/src/linuxbios/kernel-patches/patchXX.gz | patch -p1 -d /usr/src/linuxbios/linux

For bzip format,
$ bzip2 -dc /usr/src/linuxbios/kernel-patches/patchXX.bz2 | patch -p1 -d /usr/src/linuxbios/linux


3.2 Configuring Kernel

There are 3 common ways to configure kernel.
"make config"Configure kernel through command line interface
"make menuconfig"Configure kernel through console UI
"make config"Configure kernel through X GUI

SDK provides a sample config file to simplify the kernel configure process. The sample configure file contains the necessary kernel options for enabling mtd DiskOnChip support and nftl support. It is located at /usr/src/linuxbios/config/linux-2.4.17.config. To use the kernel options:

$ cp /usr/src/linuxbios/config/linux-2.4.17.config /usr/src/linuxbios/linux/.config
$ cd /usr/src/linuxbios/linux
$ make oldconfig

Note: Bt default, process has been set to 386 for compatibility. You may want


3.3 Compiling Kernel

To compile the kernel,
$ make INSTALL_MOD_PATH=/usr/src/linuxbios/buildroot/root dep vmlinux modules modules_install

It will create a kernel image /usr/src/linuxbios/linux/vmlinux and all modules will be installed at /usr/src/linuxbios/buildroot/root/lib/modules/2.4.17-linuxbios_1.


Next Previous Contents