Building External Kernel Module with TorizonCore Builder

I am trying to work through the following guide on an Ubuntu machine:
https://developer.toradex.com/knowledge-base/building-external-kernel-modules-with-torizon

I have torizoncore_builder setup using the tcb-env-setup.sh script and I have a a Toradex easy installer image downloaded. I also cloned the linux-toradex git repository into my working directory. Therefore, I have the following in my working directory:
./linux-toradex
./source_dir
./tcb-env-setup.sh
./torizon-core-docker-verdin-imx8mm-Tezi_5.1.0+build.1

From the working directory, I run the tcb script and try running the following command:

torizoncore-builder kernel build_module source_dir

but I get the error:
File “/builder/tcbuilder/cli/kernel.py”, line 71, in do_kernel_build_module
assert linux_src, “panic: missing Linux kernel source!”

Looking through all the guides, I can’t figure out what I’ve missed. How do I tell the builder where the Linux source code is?

Do I actually need the linux-toradex repository or is the kernel source referenced through the Tezi image?

Greetings @NickWhitelonis,

We include enough of the linux source in the TorizonCore images to build kernel modules. However we only started including the sources starting with TorizonCore 5.2. Meaning you’ll need to be working on a TorizonCore 5.2 image. Also don’t forget to unpack the image into the tool with the images sub-command.

Best Regards,
Jeremias