I am trying to build the “hello world” kernel module as explained in this tutorial:
I use wsl2 on windows 10 (> 2004) and my torizonCore builder “workdir” directory is /home/rfonck/tcbworkdir.
On every shell I open I type the following commands before to try to compile:
$ cd /home/rfonck/tcbworkdir/
$ source tcb-env-setup.sh
$ torizoncore-builder images unpack torizon-core-docker-apalis-imx6-Tezi_5.1.0+build.1.tar
(the .tar file was previously downloaded)
I don’t have error message with these commands. But when I try to compile a module, the compilation fail with the following error code :
rfonck@LAPTOP:~/tcbworkdir$ torizoncore-builder kernel build_module source_dir/
An unexpected Exception occured. Please provide the following stack trace to
the Toradex TorizonCore support team:
Traceback (most recent call last):
File "/builder/torizoncore-builder", line 175, in <module>
mainargs.func(mainargs)
File "/builder/tcbuilder/cli/kernel.py", line 106, in do_kernel_build_module
kernel_build_module(source_dir=args.source_directory,
File "/builder/tcbuilder/cli/kernel.py", line 71, in kernel_build_module
assert linux_src, "panic: missing Linux kernel source!"
AssertionError: panic: missing Linux kernel source!
I thought this error might be related to the variable $KERNEL_SRC that is used in the makefile but that is not set on the shell but I suppose that it is set on the container that torizonCore builder use (I don’t know how to check that).
do you have any idea what can cause this error?
Thanks a lot
rfonck