Linux Kernel

Before you begin

There are multiple ways to customize and compile the Linux kernel for your project. Please try to build the kernel as-is with no changes before you try to add your customizations. This will ensure your environment and toolchain are setup correctly.

  1. ARM toolchain, No MDK - You do not need to download the entire Critical Link MDK to build your kernel. You can use a previously compiled ARM toolchain provided by ARM.
  2. ARM toolchain, MDK - If you have the MDK installed, you can use its setup scripts to configure your build environment.
  3. Yocto Environment - If you are using the docker environment and Yocto for your filesystem, you can use its tools to customize and build your kernel.

In most cases, you will use one of the first two options for initial bring-up and testing. Then, once you have everything working you can integrate into Yocto.

Critical Link Kernel Repository

Critical Link recommends using the processor-sdk-linux-4.19.y branch on our git server:;a=summary.

Other MitySOM-AM57x branches seen on the repository should not be considered stable, and are used for internal feature development.

Kernel Build - ARM toolchain, No MDK

Configuring the Kernel Build Environment

Download the ARM toolchain and setup the build environment using the following commands:

$ mkdir -p ~/tools/mitysom-57x
$ wget -O - | tar -Jxv -C /home/bduke/tools/mitysom-57x/ 
$ export TOOLCHAIN_PATH_ARMV7=/home/bduke/tools/mitysom-57x/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf
$ export ARCH=arm
$ export CROSS_COMPILE=arm-linux-gnueabihf-
$ export PATH=$PATH:~/tools/mitysom-57x/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin
$ git clone --single-branch --branch processor-sdk-linux-4.19.y 
$ cd processor-sdk-linux

Customize your kernel

Now that you have the kernel source code, you can customize as needed. For most projects, you will want a custom defconfig and a custom device tree. One way to create a custom defconfig is to start with a known config and edit it using the kernel's menuconfig interface:

$ make tisdk_am57xx-evm_defconfig
$ make menuconfig

Press <esc> to exit the menuconfig interface and make sure you save your changes.

Please contact Critical Link if you need help with customizing your defconfig and Device Tree for your application.

DRAFT: Add notes on how to integrate new dts and to extract the Critical Link baseboard defconfig and dts from the Yocto build.

Building the kernel

Run the following commands to build the kernel.

$ make dtbs
$ make zImage
$ make modules
$ make INSTALL_MOD_PATH=../rootfs modules_install

This will build the required modules and then install them under ../rootfs.

If you are building the kernel in /home/username/build/processor-sdk-linux, the modules can be found in /home/username/build/rootfs/lib/.
You would then copy the lib directory onto your target FS under /lib.

Alternatively, you can modify INSTALL_MOD_PATH to point to the location of your mounted rootfs. This will allow you to skip the manual copy step.

If INSTALL_MOD_PATH is omitted, the modules_install target will install the modules under /lib on your build machine, which is highly likely to NOT be what you want!

Kernel Build - ARM toolchain, Critical Link MDK

This method assumes you have downloaded the Critical Link MDK from the Files tab.

Install the MDK and setup build environment

Assuming you downloaded the MDK to your ~/Download directory:

$ cd ~/Download
$ chmod +x
$ ./ 

Answer the prompts and remember where you installed the MDK (the default location is /opt/criticallink/arago-2019.11. Assuming the default install location, run these commands to setup your build environment and download the kernel source:

$ source /opt/criticallink/arago-2019.11/environment-setup
$ export ARCH=arm
$ export CROSS_COMPILE=arm-linux-gnueabihf-
$ git clone --single-branch --branch processor-sdk-linux-4.19.y 
$ cd processor-sdk-linux

Customize your kernel

Please refer to this section in the "ARM, No MDK" option for how to customize your kernel.

Building your kernel

Please refer to this section in the "ARM, No MDK" option to build your kernel.

Kernel Build - Yocto

For this option, you should have an environment setup as described in Docker build environment and Building the Yocto Root Filesystem for MitySOM-AM57X.

With this option, the general Yocto setup configures your build environment. You can compile your kernel by running bitbake commands from your build directory.

Customize your kernel

You can change the configuration of the kernel by running:

user@8ec23474095b:~$ MACHINE=mitysom-am57x bitbake -c menuconfig virtual/kernel

Building the kernel

Then, to build the kernel:

user@8ec23474095b:~$ MACHINE=mitysom-am57x bitbake virtual/kernel

Add picture from clipboard (Maximum size: 2 GB)