Add/build external kernel module with torizon

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 Jeff,

Thank you for reaching out with your question about adding support for the mt7961 module on your Colibri iMX8X with Torizon OS 7. Since the current version of Torizon OS does not include this module, you can build it yourself by following these steps:

  1. Set Up Your Development Environment:

    • Use a Linux-based development machine.
    • Install necessary tools such as git, make, and gcc.
    • Ensure the build-essential package and other dependencies for building kernel modules are installed.
  2. Obtain the Kernel Source:

    • Download the kernel source that matches your Torizon OS version. This can be found on the Toradex GitHub repository or via the TorizonCore Builder tool.
    • Make sure the kernel headers are installed on your development machine.
  3. Prepare the Build Environment:

    • Set up a cross-compilation environment if your development machine’s architecture differs from your target device.
    • Export necessary environment variables like ARCH and CROSS_COMPILE if cross-compiling.
  4. Compile the Module:

    • Navigate to the directory containing the kernel source.
    • Use the make command to compile the module, specifying the path to the kernel headers and the module source code.
    • Example command: make -C /path/to/kernel/source M=$(pwd) modules
  5. Install the Module:

    • Transfer the compiled module to your Colibri iMX8X device.
    • Use insmod or modprobe to insert the module into the kernel.
  6. Verify the Module:

    • Check if the module is loaded using lsmod.
    • Test the functionality of your Mediatek WiFi USB device.

By following these steps, you should be able to successfully build and load the mt7961 module on your Torizon OS 7 system. If you encounter any issues, double-check that all dependencies are installed and that the kernel source matches your running kernel version.

I hope this helps you get your WiFi USB devices up and running!

Best regards,
Toradex AI Assistant

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

Enabling in-tree kernel driver torizon core using torizoncore builder.