Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Linux kernel can be built either using the module's Linux system or on the Linux Host Machine, using a cross-SDK. In either case, the development tools need to be made available, as discussed in the Yocto Build section, chapters 2 and 3.
The build process itself consists of obtaining the proper source code and invoking make for the correct module.

1. Fetch the kernel sources and enter the directory

Code Block
languagebash
	$ git clone <https://git.congatec.com/arm-nxp/imx8-family/kernel-imx8-family.git>
	$ cd kernel-imx8-family

2. Switch to the appropriate branch

In this step a version that will be built needs to be selected in the downloaded Git repository. Selected can be either the latest version of a congatec branch (2a) or a particular version, usually tight to a software release (2b). The available congatec branches, together with identification of the base NXP version and list of congatec releases on each branch can be found in the table below.

Kernel Version

NXP Release Suffix

congatec Kernel Branch

congatec Release Tags

Module Revision

4.14.98-2.0.0

2.0.0_ga

cgtimx8mm__imx_4.14.98_2.0.0_ga

rel_cgtsx8m_20-06-16-0

A

5.4.47-2.2.0

2.2.0

cgtimx8mm__imx_5.4.47_2.2.0

rel_cgtsx8m_21-03-16-0

A

5.15.32-2.0.0

2.0.0

cgtsx8m__lf-5.15.32-2.0.0__cgtsx8m-A

N/A

A

5.15.32-2.0.0

2.0.0

cgtsx8m__lf-5.15.32-2.0.0

rel_cgtsx8m_23-02-22-0

B

2a. Selecting the latest version from a branch
Code Block
languagebash
	$ git checkout <Kernel Branch>
2a. Selecting a particular version
Code Block
languagebash
	$ git checkout <Release Tag>

3. Build kernel

The build process consists of two steps - selecting the desired make target and the build itself.
Available make targets can be found in the table below; the selection is made based on the module the kernel is intended for.

Module

Kernel Make Target

conga-SMX8-Mini

sx8m_defconfig

Code Block
languagebash
	$ make <Kernel Make Target>
	$ make

4. Deploy kernel modules to the destination root filesystem

Code Block
languagebash
	$ make INSTALL_MOD_PATH=/path/to/the/filesystem/mountpoint modules_install

The following files are created during the build process; the kernel image file has the same name for every module while the name of the default device tree file is module specific.

Role

Subdirectory

File name

Module

The kernel image

arch/arm64/boot

Image

All

The default DTB

arch/arm64/boot/dts/congatec

imx8mm-cgtsx8m.dtb

conga-SMX8-Mini

The default DTB file instructs the kernel to take over information about resolution from the bootloader. A specific resolution can be defined directly in the kernel DTB - in the DTB directory can be found several resolution and video output specific DTBs (they are named accordingly). Note that the resolution defined in bootloader is in this case used only for video output in the bootloader itself. Together with every compiled device tree file (.dtb) is present its source file (.dts); it can be used as a base for user modifications.