Home > Uncategorized > Compiling the Linux Kernel for i.MX6

Compiling the Linux Kernel for i.MX6

March 29th, 2014

In this post we will go through the process of compiling the Linux for i.MX6. This procedure is NOT through the ltib, but the regular arm compiler methods. You may like to see the uboot compile post to look for installing and setting up of the compile tool chain. The same toolchain used for uboot can also be used for the Linux kernel.

Grab the source code

The first thing you want to do is grab a copy of the latest source code.

export ARCH=arm
export CROSS_COMPILE=/usr/bin/arm-linux-gnueabi-

Look into the directory arch/arm/config and see the relevant config file. In my case it was imx6_defconfig. Give the following command to make config file.

make imx6_defconfig

At this stage we compiled it using

make uImage

However, we found some issue and errors and had to do the following

edit .config and add the following line
# CONFIG_SWITCH is not set

Again compile

make uImage

At this stage it compiled and the uImage is generated and stored in arch/arm/boot/.

copy the generated uImage to the directory called /tftpboot. Now boot your i.MX system and stop it at u-boot. Load and run the kernel ( Follow the instruction in
tftp boot).
setenv loadaddr 10800000
tftp 0x10800000 uImage

At this stage you should see the linux runs.

Update :

If you use the boundary devices git (https://github.com/boundarydevices/u-boot-imx6/) , you should use the following for the config

make nitrogen6x_defconfig

This should not throw errors.


  1. No comments yet.
  1. No trackbacks yet.