BSP 6.x.y, colibri- imx6ull, kernel build fails

I am evaluating whether it’s worth upgrading our application from BSP5 6o BSP6. Following
Build a Reference Image with Yocto Project/OpenEmbedded | Toradex Developer Center, only changed conf/local.conf for imx6ull-colibri.
All the steps

repo init -u git://git.toradex.com/toradex-manifest.git -b kirkstone-6.x.y -m tdxref/default.xml
repo sync
. export
bitbake tdx-reference-minimal-image

complete with just two warning: One that meta-tmp layer is included but not enabled, another that Debian-12 has not been validated (although Yocto page lists it). The generated image boots on the evaluation board without issues, with Kernel 6.1.142.

The issue comes when I tried to rebuild the kernel to include some needed features and DTS changes. After

bitbake virtual/kernel -c devshell
make mrproper
make menuconfig

make fails early in the process with

In file included from~/oe-core/build/tmp/work/colibri_imx6ull-tdx-linux-gnueabi/linux-toradex-mainline/6.1.142+gitAUTOINC+7e69c33e48-r0/recipe-sysroot-native/usr/lib/arm-tdx-linux-gnueabi/gcc/arm-tdx-linux-gnueabi/11.5.0/plugin/include/gcc-plugin.h:28, from ~/oe-core/build/tmp/work-shared/colibri-imx6ull/kernel-source/scripts/gcc-plugins/gcc-common.h:7, from ~/oe-core/build/tmp/work-shared/colibri-imx6ull/kernel-source/scripts/gcc-plugins/arm_ssp_per_task_plugin.c:3: oe-core/build/tmp/work/colibri_imx6ull-tdx-linux-gnueabi/linux-toradex-mainline/6.1.142+gitAUTOINC+7e69c33e48-r0/recipe-sysroot-native/usr/lib/arm-tdx-linux-gnueabi/gcc/arm-tdx-linux-gnueabi/11.5.0/plugin/include/system.h:695:10: fatal error: gmp.h: No such file or directory 695 | #include <gmp.h> | ^~~~~~~
“make menuconfig” was executed just once, without any changes.

Out of curiosity, I regenerated the setup with only change being selection of verdin-imx8mp module which I have available. bitbake completed, but selected kernel 5.15.183, where kernel recompile goes without issues.

So, my question is: What I need to change in order for BSP 6, Kernel 6.x.y to be buildable?

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Hello! Thank you for your detailed description of your BSP 6 Yocto kernel build process and the specific error you encountered.

The error message:

fatal error: gmp.h: No such file or directory

indicates that the GMP (GNU Multiple Precision Arithmetic Library) headers are missing from the build environment used for compiling kernel plugins when you use Linux kernel 6.1.x for Colibri iMX6ULL.

Cause

Kernel 6.x.y (mainline-based) enables GCC plugins by default for ARM targets, a feature that requires GMP development headers/tools to be available on the host system. If these are missing, you get the gmp.h not found error.

Solution: Install GMP Development Packages

On your build host, install the GMP development package before starting your Yocto/OpenEmbedded build. For most Debian-based distributions (including Debian 12 and Ubuntu), install with:

sudo apt-get update
sudo apt-get install libgmp-dev

This ensures the required headers and libraries (gmp.h) are available for GCC plugin compilation steps executed during make menuconfig and other kernel build actions.

It is recommended to add this package to your host before you initiate the Yocto environment and spawn your kernel builds.

More about dependencies:

Rebuilding After Installing

After installing libgmp-dev, you can restart your Yocto build steps:

# Re-enter your build environment
. export

# Clean up, if needed (optional)
bitbake -c cleansstate virtual/kernel

# Re-run your kernel build or devshell
bitbake virtual/kernel -c devshell
make menuconfig

You should find that make and related tools no longer report missing gmp.h.

Summary

  • Install libgmp-dev on your build host for kernel 6.x.y support on ARM (iMX6ULL).
  • Then you can use Yocto bitbake virtual/kernel -c devshell for menuconfig/re-compilation without hitting GMP errors.

Let me know if you need further help configuring other dependencies or if you have any additional questions about BSP 6!

Best regards,
Toradex AI Assistant.

Build Linux Kernel from Source Code – Host System Setup

For anyone reading that: MPC library is needed as well
sudo apt install libmpc-dev