Configure and Build Linux Kernel¶
This section guide will explain the procedure to configure the Linux* kernel and build it using the ECI Build Engine. It is recommended to read ECI Development Practices to gain a better understanding of the basic development principles.
Step 1: Environment Prerequisites¶
In this step, you will set up your build environment.
Setup the Build System, if not done already.
Identify the Linux kernel that you want to configure. ECI offers a few options for various distributions. Refer to ECI Linux Intel LTS Kernel for a list of available kernels and their respective distribution. In this section,
linux-image-intel-rtfor Debianbullseyedistribution will be used. If you are using a different kernel, you will need to modify the example commands accordingly.Locate the pre-built Linux kernel Deb package:
$ find ./targets/packages/ -name linux-image-intel*.deb
The
findcommand should display a list of available Linux kernel Deb packages:./targets/packages/bullseye/eci-bullseye/pool/main/l/linux-intel-acrn-sos/linux-image-intel-acrn-sos_5.10.115-bullseye-2_amd64.deb ./targets/packages/bullseye/eci-bullseye/pool/main/l/linux-intel-rt/linux-image-intel-rt_5.10.115-rt67-bullseye-2_amd64.deb ./targets/packages/bullseye/eci-bullseye/pool/main/l/linux-intel-xenomai/linux-image-intel-xenomai_5.10.100-bullseye-2_amd64.deb ./targets/packages/jammy/eci-jammy/pool/main/l/linux-intel-acrn-sos/linux-image-intel-acrn-sos_5.15.36-jammy-2_amd64.deb ./targets/packages/jammy/eci-jammy/pool/main/l/linux-intel-rt/linux-image-intel-rt_5.15.36-rt41-jammy-2_amd64.deb
Export the path of the desired Linux kernel Deb package, so that you can reference it in the later commands:
$ export PACKAGE=./targets/packages/bullseye/eci-bullseye/pool/main/l/linux-intel-rt/linux-image-intel-rt_5.10.115-rt67-bullseye-2_amd64.deb
Extract the Linux kernel Deb package to obtain the Linux kernel default configuration:
$ TDIR=$(mktemp -d -p .) $ ar x ${PACKAGE} --output ${TDIR} $ tar --directory=${TDIR} -xf ${TDIR}/data.tar* $ cp ${TDIR}/boot/config-* . && rm -r ${TDIR}
Now, you will find a file named
config-*in the directory:$ ls config-* config-5.10.115-rt67-intel-ese-standard-lts-rt+
Locate the existing Linux kernel default configuration, backup the existing Linux kernel default configuration, and copy the new one:
$ RDIR=./targets/layers/meta-tgr/meta-eci-isar/recipes-kernel/linux/files $ DEFAULT=$(find ${RDIR} -name *_intel_defconfig) $ mv ${DEFAULT} ${RDIR}/$(basename ${DEFAULT})_backup $ cp config-* ${DEFAULT}
You will find two
*intel_defconfig*files in the${RDIR}directory:$ ls ${RDIR}/*_intel_defconfig* ./targets/layers/meta-tgr/meta-eci-isar/recipes-kernel/linux/files/amd64_5.10_intel_defconfig ./targets/layers/meta-tgr/meta-eci-isar/recipes-kernel/linux/files/amd64_5.10_intel_defconfig_backup
-
Note: You do not have to append any meta-layer YAML
meta-vendor-application.ymlto build the Linux kernel. The example usesbullseyetargets, but usejammytargets instead if you are building a Linux kernel for the Ubuntu* distribution.
Step 3: Build Linux Kernel¶
In this step, you will build the Linux kernel Deb package.
Build the Linux kernel image. The build duration will vary depending on the system capabilities. Typically, the build will complete in about 20 minutes if the system meets the recommended system requirements.
$ bitbake ${RECIPE}
After the build completes, exit the
bitbakeenvironment using theexitcommand.$ exit
You will find the resulting Linux kernel Deb packages in the target APT repository located at
build/eci-packages-<distribution>/tmp/deploy/isar-apt. To find all the Linux kernel Deb packages, run the following command:$ sudo find build/eci-packages-*/tmp/deploy/isar-apt -name linux-image-*.deb
For example, the
linux-image-intel-rtDeb package forbullseye:build/eci-packages-bullseye/tmp/deploy/isar-apt/eci-bullseye-amd64/apt/eci-bullseye/pool/main/l/linux-intel-rt/linux-image-intel-rt_5.10.140-rt73-bullseye-4_amd64.debYou could install the Linux kernel Deb package onto the target system using the
dpkg -i <package.deb>command or you could privately host the ECI APT repository to install the Linux kernel Deb package using the APT package manager.




