To install modules
-
On the target, determine whether following modules are loaded, by running the
lsmod
command in the Linux shell.can-raw.ko can.ko can-dev.ko mttcan.ko
- If the modules did not load, determine if they are in following
directory:
/lib/modules
- If the modules are not in this directory, use
menuconfig
to enable the CAN kernel module. The instructions are in steps 6 and 7 in Compiling the Kernel (Kernel 5.15). - In
menuconfig
, select following CAN modules.make -C kernel O=${PWD}/out-linux DEFCONFIG_PATH=$PWD/t23x/arch/arm64/configs menuconfig [*] Networking support ---> <M> CAN bus subsystem support ---> <M> Raw CAN Protocol (raw access with CAN-ID filtering) <M> CAN Device Drivers ---> <M> Platform CAN drivers with Netlink support <M> Bosch M_TTCAN Devices
- Exit and save.
- Rebuild the kernel and copy the kernel Image from the kernel
out
directory to:drive-linux/kernel
For additional information, refer to Compiling the Kernel (Kernel 5.15).
- Reflash the target.
For additional information, see Flashing.
- Load all required modules.
# modprobe mttcan
This command assumes module dependencies are properly set.
- If the
modprobe
command fails, manually load the modules:insmod /lib/modules/<KERNEL_VERSION>/kernel/net/can/can-raw.ko insmod /lib/modules/<KERNEL_VERSION>/kernel/net/can/can.ko insmod /lib/modules/<KERNEL_VERSION>/kernel/drivers/net/can/can-dev.ko insmod /lib/modules/<KERNEL_VERSIONextra/drivers/net/can/mttcan/mttcan.ko
Note:
The <KERNEL_VERSION>
is in the form of x.x.xx-rtxx-tegra. For
example, 5.15.116-rt-tegra.