"Hier staunt der Laie und Fachmann wundert sich."

Mittwoch, Mai 18, 2005

HOWTO: Steps to compiling and installing a new (2.6) kernel

1) Download sources from kernel.org. Untar it using "tar -xvjf linux...bz2" in
you /usr/src directory.

2) Important: Create a symbolic link from the source-dir (you just
untared) to /usr/src/linux. This is important, because I will refer to
that dir from now on. "ln -s /usr/src/linux-2.6... /usr/src/linux"

3) If you are using a kernel-config file that you downloaded from the net, save it as ".config" in the new kernel-source dir
under /usr/src/linux

4) Run "make oldconfig" (compares old to new config. Hold the Return-key to
accept all default values.)

5) "make menuconfig" (use this to add wanted options, e.g. if you want
to support other hardware that is not selected in the given .config).
You might need to call "apt-get install ncurses-dev [not -devel] when
you start this the first time.

5.1) Here you need to select the following:
> File System
> Miscellanious Filesystem
> [*] Compresse ROM File System Support (cramfs)

-- update

5.2) If you own a palmos PDA (like a Tungsten or Zire) you'll want to enable support for that, too:

> Device Drivers
> USB Support
> USB Serial Convert Support
> [*] USB Serial Converter Support
> USB Handspring Visor / Palm m50x / Sony Clie Driver (NEW)

-- end of update
When asked, save this configuration.

6) Run "make" (pre 2.6 kernels used "make deb", "make modules" etc.)

7) "make modules_install" (installs the modules).

8) Run "mkinitrd -o destination-file kernel-version" to create the initial
ramdisk. Supply the kernel-version of the new kernel (the one you just
compiled), otherwise mkinitrd will use the currently running
kernel-version -- which you do not want.

9) copy initrd and /user/src/linux/arch/i386/boot/bzImage
to /boot/vmlinuz-2.6...

10) Add a new entry in /boot/grub/menu.lst similar to the existing ones. And you're done.
Restart to boot into your new kernel.