Stayton Board

Building a Kernel and Modules

  1. Download and unpack the linux-2.4.19 source
  2. Download the following 3 kernel patches
    patch-2.4.19-rmk2
    diff-2.4.19-rmk2-pxa2
    diff-2.4.19-rmk2-pxa2-stayton
  3. Apply the patches as follow (it is a one not an "L"):
    cd linux-2.4.19
    patch -p1 < ../patch-2.4.19-rmk2
    patch -p1 < ../diff-2.4.19-rmk2-pxa2
    patch -p1 < ../diff-2.4.19-rmk2-pxa2-stayton
  4. Now it is time to configure the kernel:
    make clean
    make mrproper
    make stayton_config
    make oldconfig
  5. The stayton_config step will load a default configure for the Stayton. This sets many of the neccessary options to make you're kernel work on the Stayon. The oldconfig step install that configuration.
  6. If you would like to customize your kernel more, select more feature and modules to build, run make menuconfig.
  7. Once you have configured your kernel, do the following to build it:
    make dep
    make zImage
    make modules
    make modules_install
  8. The last step above will require you to be root. It will install the modules under /lib/modules/2.4.19-rmk2-pxa2. This isn't really the ideal place for it, but it shouldn't conflict with anything since it is a very specific kernel. The modules_install step will give you errors about each module being "not for this architecture" but it doesn't matter, you can ignore those.
  9. To download the modules to board, scp -r /lib/modules/2.4.19-rmk2-pxa2 root@<stayton hostname>/lib/modules/
  10. To install the kernel, follow the directions on Initial Setup about downloading a zImage file only use linux-2.4.19/arch/arm/boot/zImage.
  11. Modules built with the this kernel source should work with the preinstalled kernel, without needing to install the kernel you build.