Issue building an out-of-tree module with torizonCore builder #2

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

The error message you’re encountering, “panic: missing Linux kernel source!”, suggests that the TorizonCore Builder tool is unable to locate the Linux kernel source required for building your out-of-tree module. Here are some steps to help you resolve this issue:

  1. Verify Kernel Source Path: Ensure that the path to the Linux kernel source is correctly specified in your build environment. The TorizonCore Builder tool needs this path to find the necessary files.

  2. Check Environment Variables: Confirm that the environment variable KERNEL_SRC or KDIR is correctly set in your Makefile. This variable should point to the directory where the Linux kernel source is located.

  3. Download Kernel Source: If you haven’t already, download the appropriate version of the Linux kernel source that matches your TorizonCore image. This can typically be obtained from the Toradex GitHub repository or other official sources.

  4. Review Configuration File: Check your tcbuild.yaml configuration file to ensure that the kernel: modules: source-dir parameter is correctly pointing to the directory containing your kernel module source code.

  5. Re-run Commands: After verifying the above steps, try re-running the torizoncore-builder build command to see if the issue persists.

By ensuring that the kernel source is correctly set up and accessible, you should be able to proceed with building your custom kernel module. If the problem continues, double-check the paths and environment settings to ensure there are no typos or misconfigurations.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

Device tree modification in Yocto for Colibri i.MX7 emmc.