Linux Kernel Modules

This document describes how to build Linux kernel modules for the KreaTV IP-STB.

The result of the kernel module build process is an IP-STB Installation Package (IIP) file.

The kernel modules are located in the /lib/modules directory in the root file system. The name convention used is xx<filename>.o where xx is a number between 00 and 99. The modules are loaded in the order specified by the xx number (e.g. 10ir.o is loaded before 20atyx220.o). For 2.6 kernels the extension is .ko instead of .o.

# Example
ls /lib/modules
10ir.o
20atyx220.o
30kboxmtd.o
40usbcore.o
41usb-ohci.o
42hid.o

Note! To build for the 1500 platform all commands must be prepended with VIP=1500.
Example: VIP=1500 make

Example: Build kernel module manually

  1. Copy the kernel module (.c) files you want to build to the <edk home>/examples/kernel_module/ directory.
  2. Modify the Makefile to use the new files.

    Note! The modules should be given names on the format xx<filename>.o or xx<filename>.ko.

  3. Execute
    make
    or
    VIP=1500 make

Alternative 2. Build modules from the Linux source tree

  1. Go to the directory edk/examples/kernel_module2/
  2. Download the Linux kernel source from www.kernel.org. and store it in edk/examples/kernel_module2/

    For the 5xx and 7xx platform use linux-2.4.20.tar.gz
    For the 1500 platform use linux-2.4.18.tar.gz

  3. Run make unpack or VIP=1500 make unpack to unpack and apply patches.
  4. Run make menuconfig and select the modules to be built.
  5. Run make modules to build the modules.
  6. Run make iip to build an iip containing the modules.

    Note! The iip rule in the Makefile must be modified to include the needed modules.
    The modules should be given a name with format xx<filename>.o


If the build process finished successfully you should now have an iip file called something like example-inst-kernel-module_vip1500.iip.