i.MX51 kernel compilation in four easy steps

Published on September 15, 2010

Archived Notice

This article has been archived and may contain broken links, photos and out-of-date information. If you have any questions, please Contact Us.

Step 1:

Get a toolchain that supports Cortex-A8. We suggest using Codesourcery because they did the heavy lifting for Cortex-A8. They also provide very nice packages in both free and feature-complete development toolkits.

Step 2:

Get the latest Boundary devices kernel. Use the snapshot link to download the appropriate version.

Step 3:

Extract and prepare the kernel (the hex digits at the end will change with each release): user@host:~$ unzip ~/Downloads/Downloads/linux-bd-a4c6406.zip user@host:~$ cd linux-bd-a4c6406 user@host:~/linux-bd-a4c6406$ export PATH=/opt/arm-2010q1/bin/:$PATH user@host:~/linux-bd-a4c6406$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- nitrogen_defconfig

Step 4:

Compile and copy: user@host:~/linux-bd-a4c6406$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage modules user@host:~/linux-bd-a4c6406$ cp -fv arch/arm/boot/uImage /media/boot user@host:~/linux-bd-a4c6406$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-                                INSTALL_MOD_PATH=/media/rootfs/ modules_install The example above is the most common, but there are a few different nitrogen_defconfig files to choose from:
  • nitrogen_defconfig - Useful for Busybox, Debian, LTIB, or Buildroot userlands
  • nitrogen_ubuntu_defconfig - This version includes the Ubuntu compcache, aufs, and squashfs components. This usually also requires a special branch in our tree because the aufs component conflicts with the UnionFS that we keep up-to-date in our main branches,
  • nitrogen_android_defconfig - This config file includes Android-specific components
Also note that the example above assumes that you have an SD card with multiple partitions labelled boot and rootfs, which is fairly common. You'll need to figure out where the boot loader will look for the kernel (uImage) file and modules based on your system layout.