Hello, I set up a new TCB yesterday. I downloaded the kernel source and device-trees source per the instructions.
Today, I was able to create my OS in Yocto. I moved my OS file Colibri-iMX7-eMMC_MP-OS-Image-Tezi_7.2.0-devel-20250312170710+build.0.tar into ./images in my TCB directory.
I ran torizoncore-builder images unpack ./images/Colibri-iMX7-eMMC_MP-OS-Image-Tezi_7.2.0-devel-20250312170710+build.0.tar
Then torizoncore-builder build, but it results in this error:
Traceback (most recent call last):
File "/builder/torizoncore-builder", line 230, in <module>
mainargs.func(mainargs)
File "/builder/tcbuilder/cli/build.py", line 665, in do_build
build(args.config_fname, args.storage_directory,
File "/builder/tcbuilder/cli/build.py", line 628, in build
fs_changes = handle_customization_section(
File "/builder/tcbuilder/cli/build.py", line 197, in handle_customization_section
handle_kernel_customization(props["kernel"], storage_dir=storage_dir)
File "/builder/tcbuilder/cli/build.py", line 253, in handle_kernel_customization
kernel_cli.kernel_build_module(
File "/builder/tcbuilder/cli/kernel.py", line 81, in kernel_build_module
assert linux_src, "panic: missing Linux kernel source!"
AssertionError: panic: missing Linux kernel source!
I suppose the issue has something to do with my custom Yocto output. Can you point me in the right direction?
Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
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:
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.
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.
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.
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.
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:
Initially, I thought I needed to patch the kernel so Yocto was my option. It looks like an FSL update may have removed that requirement for me.
The OSTree comparison (torizoncore-builder isolate) feature seems very useful, for example. It seemed to me from my reading that I could create a custom image in Yocto, then use it in TCB… but I suppose that’s not correct?
I’m good at this point @allan.tx I’m proceeding with a default Torizon image for now, I may revisit Yocto again once we make some progress on the rest of the tooling.