[SOLVED] RT kernel compilation fails on imx7-emmc

I want to compile the RT kernel for the imx7-emmc. I edited the configuration file (colibri-imx7-emmc.conf) to use ‘linux-toradex-rt’ as kernel provider. Now when compiling the kernel (bitbake virtual/kernel) i get the following error message below. Please find attached the logfile. Any help would be appreciated.

|   HOSTCC  scripts/mod/modpost.o
|   HOSTCC  scripts/mod/sumversion.o
|   GEN     scripts/mod/devicetable-offsets.h
|   HOSTCC  scripts/mod/file2alias.o
|   HOSTLD  scripts/mod/modpost
| make[3]: *** No rule to make target 'arch/arm/boot/dts/imx7d-colibri-emmc-eval-v3.dtb'.  Stop.
| arch/arm/Makefile:322: recipe for target 'imx7d-colibri-emmc-eval-v3.dtb' failed
| make[2]: *** [imx7d-colibri-emmc-eval-v3.dtb] Error 2
| Makefile:146: recipe for target 'sub-make' failed
| make[1]: *** [sub-make] Error 2
| Makefile:24: recipe for target '__sub-make' failed
| make: *** [__sub-make] Error 2
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/user/oe-core/build/tmp-glibc/work/colibri_imx7_emmc-angstrom-linux-gnueabi/linux-toradex-rt/4.1-2.0.x-2.7.5-rt/temp/log.do_compile.12024)
ERROR: Task (/home/user/oe-core/build/../layers/meta-toradex-nxp/recipes-kernel/linux/linux-toradex-rt_4.1-2.0.x.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 616 tasks of which 609 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory

Summary: 1 task failed:

I removed all custom layers but still there is this error. When changing the machine to “colibri-imx7” (e.g. without emmc) the error disappears…

Seems like '‘imx7d-colibri-emmc-eval-v3.dtsi’ is missing at revision 82f0f4f012a646a735d6b44de77b7c9d0712c714 in linux-toradex-rt_4.1-2.0.x.bb which is different to the revision specified in linux-toradex_4.1-2.0.x.bb.

You are right, real time is not supported in bsp 2.7 with imx7-emmc machine. If you want the real time in bsp 2.7, then you update the revision to newer one but then you might also have to apply the newer real time patch or you update to Bsp 2.8.
Best regards, Jaski

I wrote a recipe append which copies the missing dts files before compiling there kernel. Now the kernel builds successfully, but however, CAN does not work anymore… Does CAN work with BSP 2.8-RT?

Could you provide the output of dmesg | grep can in Bsp 2.7 RT?

In Bsp 2.8 with RT Patch CAN is Initialized at the startup of Linux.

root@colibri-imx7-emmc:~# dmesg | grep can 
[    0.386705] i2c i2c-0: can't use DMA, using PIO instead.
[    0.387597] i2c i2c-3: can't use DMA, using PIO instead.
[   10.740027] mcp251x spi2.0 can0: MCP2515 successfully initialized.
[   63.239123] can: controller area network core (rev 20120528 abi 9)
[   63.256627] can: raw protocol (rev 20120528)

Perect, that it works with Bsp 2.8. Thanks for the feedback.

I can confirm that CAN works with BSP 2.8 with RT patch. Unfortunately i deleted the BSP2.7-RT image.