Project

General

Profile

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. Docker Build - Build using a Docker image (as described in Docker Build Environment
  2. ARM toolchain - You can use a previously compiled ARM toolchain provided by ARM.
  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 mitysom-linux-6.1.y branch on our git server: https://support.criticallink.com/gitweb/?p=linux-ti.git;a=summary

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

Kernel Build - Docker

See Docker Build Environment for details on how to setup and install the Docker build environment. Once that is installed, you can build the kernel using the following commands:

git clone --branch mitysom-linux-6.12.y https://support.criticallink.com/git/linux-ti.git
cd linux-ti
docker run --rm --volume "$PWD:/work" --workdir=/work mitysom_ubuntu:22.04 ./62xx-build.sh 

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:

$ ./57x-menuconfig.sh

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

Please contact Critical Link at 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.

Additional Scripts

Several additional scripts are provided to do helpful things.

57x-build-dts.sh - Builds the dtbs.
57x-copy.sh - Copies the files to a locally mounted SD card (assumed to be at /media/$USER).
57x-push.sh - Push the files to a board over network. You must supply a connection string as the first argument (eg root@<board ip address> )
57x-dtb_push.sh - Push the dtb files to a board over network. You must supply a connection string as the first argument (eg root@<board ip address> )

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.

Building the Kernel

Then, to build the kernel run the following commands

oe-layersetup$ ./docker-poky.sh
pokyuser@2c4cc802224f:/work$ ./57x-setup.sh --next
pokyuser@2c4cc802224f:/work$ export MACHINE=mitysom-am57x
pokyuser@2c4cc802224f:/work$ pushd build
pokyuser@2c4cc802224f:/work/build$ source conf/setenv
pokyuser@2c4cc802224f:/work/build$ bitbake virtual/kernel

Verifying Your Kernel Build and Next Steps

If successful, the kernel build creates multiple outputs:

+ rm -r /export/home/jsava/linux-ti/build-mitysom57x/rootfs/lib/modules/6.1.119-00130-ge86a55f4130f/build /export/home/jsava/linux-ti/build-mitysom57x/rootfs/lib/modules/6.1.119-00130-ge86a55f4130f/source
+ strings build-mitysom57x/vmlinux
+ grep 'Linux version'
Linux version 6.1.119-00130-ge86a55f4130f (jsava@laptop-183) (arm-none-linux-gnueabihf-gcc (Arm GNU Toolchain 11.3.Rel1) 11.3.1 20220712, GNU ld (Arm GNU Toolchain 11.3.Rel1) 2.38.20220708) # SMP PREEMPT 
Linux version 6.1.119-00130-ge86a55f4130f (jsava@laptop-183) (arm-none-linux-gnueabihf-gcc (Arm GNU Toolchain 11.3.Rel1) 11.3.1 20220712, GNU ld (Arm GNU Toolchain 11.3.Rel1) 2.38.20220708) #112 SMP PREEMPT Mon Aug  4 09:17:19 EDT 2025

The files /arch/arm/boot/dts/am57xx-mitysom-* should be copied to /root/boot/dtb/ and /arch/arm/boot/zImage should be copied to /root/boot/ on the mmc device. Run the 57x-copy.sh to complete this task.

Customizing the Kernel for your Application

Now that you can build the kernel, you can customize the kernel source code for your specific application.

For most projects, you will want a custom defconfig and a custom pinmux. Example defconfigs can be found in the arch/arm/configs/ directory. It is recommended that you start with a similar board as a reference for your own configuration. You will need to update the 57x-build.sh script to use your custom defconfig file (search for defconfig to find the relevant string).

An example pinmux for Critical Link's development board can be found in the devkit device tree at arch/arm/boot/dts/am57xx-mitysom-devkit.dts.

Please contact Critical Link at if you need help with customizing your defconfig and pinmux for your application. You may also use our forums to ask any questions about custom configurations.

Go to top
Add picture from clipboard (Maximum size: 1 GB)