Linux verdin-imx8mp-15404404 5.4.193-5.7.2+git.b60d3160fd04
I’d like to install PCIe device on my i.MX8MP board.
First of all, I installed Torizon os with container.
And I can connect the device with ssh client.
But there is no kernel headerfile to build linux pcie device driver.
/lib/modules/5.4.193-5.7.2+git.b60d3160fd04/build/include/generated/autoconf.h,
/lib/modules/5.4.193-5.7.2+git.b60d3160fd04/build/include/config/auto.conf
How can I build pcie device driver for this linux environment.
Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
To build a PCIe device driver for your Verdin iMX8M Plus board running TorizonCore, you need to follow these steps:
Prerequisites
TorizonCore Builder Tool: Ensure you have the TorizonCore Builder tool installed. This tool simplifies the process of adding kernel modules to TorizonCore images.
Steps to Build and Install the PCIe Device Driver
1. Install TorizonCore Builder
If you haven’t already installed TorizonCore Builder, follow the installation instructions provided in the TorizonCore Builder documentation.
2. Prepare Your Kernel Module Source Code
Organize your PCIe device driver source code into a directory. For example, let’s call this directory pcie-driver.
3. Create a Makefile
Ensure your pcie-driver directory contains a Makefile. The Makefile should include the environment variable $(KERNEL_SRC) or $(KDIR). Here is an example Makefile:
You can create a custom TorizonCore image with your built kernel module. There are two approaches: using a configuration YAML file or standalone commands.
Approach 1: Using a Configuration YAML File
Create a tcbuild.yaml file with the following content: