11. Kernel Guide

This chapter describes how to configure, compile and flash the Linux kernel for the Internet Tablet device. The chapter is targeted at developers wishing to compile their own custom kernels for the device.

11.1 Prerequisites

Before starting, the maemo environment should be set up. The required GCC toolchain that is used to compile the kernel is included in the Scratchbox by default.

It is not mandatory to set up a separate target for kernel compilation, but this example does it in case the default armel target has been modified in some special way.

The Scratchbox environment is now ready for compiling the kernel

11.2 Getting Kernel Sources

Kernel sources are not included in the rootstrap, and therefore need to be downloaded from the repository.

Kernel sources should now be fetched and ready to be compiled.

11.3 Configuring Source Tree and Compiling Kernel

Now the device can be flashed with the new kernel image using the Flasher tool. This should be performed outside Scratchbox. See section 11.6 for short flashing instructions.

11.4 Changing Default Kernel Configuration

The following steps describe how to change the default kernel configuration.

Now a kernel image with modified configuration can be recompiled, as described in the previous section.

11.5 Configuring and Compiling Kernel Modules

This section explains how to configure and compile additional kernel modules for the Internet Tablet in the maemo environment. NFS is used as an example.

The kernel modules are kept in /mnt/initfs/lib/modules/2.6.21-omap1/. However, it is write protected. This is not a problem, because the insmod command can be used to load the modules into the running kernel from any directory where they have been saved in.

11.6 Flashing Kernel

The custom kernel can be flashed from outside the Scratchbox with the flasher tool.

# flasher -f -k /scratchbox/users/<yourname>/home/<yourname>/maemo_kernel/\

sponsored by Nokia Corporation