Howto build mainline-kernel for Apalis IMX8?


I would like to build an image using the mainline-kernel (5.4.x) for the Apalis IMX8 by using the Zeus branch of the yocto toolchain. What am I doing wrong here?

  1. repo init -u Index of /toradex-bsp-platform.git -b LinuxImage4.0
  2. repo sync
  3. . export

I’ve added PREFERRED_PROVIDER_virtual/kernel_apalis-imx8 = "linux-toradex-mainline"to my local.conf file and set the machine to MACHINE ?= "apalis-imx8"

Running bitbake console-tdx-image fails with the following error:

|   GEN     Makefile
| scripts/kconfig/conf  --syncconfig Kconfig
| make[2]: *** No rule to make target 'arch/arm64/boot/dts/freescale/fsl-imx8qm-apalis-eval.dtb'.  Stop.
| /data2/toradex-zeus/build/tmp/work-shared/apalis-imx8/kernel-source/Makefile:1238: recipe for target 'freescale/fsl-imx8qm-apalis-eval.dtb' failed
| make[1]: *** [freescale/fsl-imx8qm-apalis-eval.dtb] Error 2
| /data2/toradex-zeus/build/tmp/work-shared/apalis-imx8/kernel-source/Makefile:179: recipe for target 'sub-make' failed
| make: *** [sub-make] Error 2
| WARNING: exit code 1 from a shell command.
ERROR: Task (/data2/toradex-zeus/build/../layers/meta-toradex-bsp-common/recipes-kernel/linux/ failed with exit code '1'
NOTE: Tasks Summary: Attempted 3005 tasks of which 1083 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 20 seconds

Summary: 1 task failed:
Summary: There were 2 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

Hi @m.sauer

Unfortunately, the iMX8 QuadMax is not supported by the mainline kernel yet. In your case it just doesn’t find the devicetre file. Don’t expect that the iMX8 QuadMax will have good mainline support soon… Unfortunately the architecture is quite different from iMX6 so it needs a huge effort to implement that. Currently you unfortunately have to stick to the downstream NXP kernel.

You can check which modules are starting to get support by checking the devicetree directory… However, even if they have a devicetree the support will still be super limited:


@stefan_e.tx: Thank you very much for the quick answer. Just to avoid a possible misunderstanding, let me rephrase my quesion:

I don’t care if the kernel is officially “mainline” or not, I’m just interested in getting a Kernel 5.4.x up and running on my Apalis IMX8 :slight_smile:

Is this somehow possible without significant development effort?

Best Regards,

Dear @m.sauer

Unfortunately, it is not easily possible at the moment because the latest stable NXP Kernel is 4.14. However, it looks like that the next NXP downstream kernel would be 5.4… Unfortunately we don’t have a release date for a BSP with that version.