Kernel Compile

From Wandboard Wiki
Jump to: navigation, search

This is a guide for beginners how to cross compile the wandboard kernel for arm platform.

In order to compile a kernel for the wandboard, you need

  • A cross compiler
  • Properly set environment
  • Kernel source
  • Kernel configuration
  • Compile

1. Install a cross compiler

Too bad there are dependencies on undefined compiler behaviour in the Linux kernel. For this reason, there are good and bad compilers. The bad compilers might produce a non-booting kernel. A known good compiler is Code Sourcery G++ Lite 2010.09-50

2. Set environment variables

In order to compile a kernel for arm target, you need to set the following variables



The cross compile variable should be set so that ${CROSS_COMPILE}gcc -v prints the version of your cross compiler.

3. Download kernel

Either download a kernel as a tarball and uncompress it, or clone it from a git, i.e.

git clone -b wandboard git://

4. Configure your kernel

Either configure your kernel yourself using make menuconfig, or use a default configuration like make wandboard_defconfig It is possible, even recommended that you do both: first make the wandboard default config to get most configuration options right, and then customize the config to your needs.

5. Compile

To cpmpile your kernel issue:

make uImage

Note, you can with benefit issue a multi-core complie by -j 4 to speed up the compile using 4 cores.

Usually you also need to compile modules by make modules