To install modules
-
On the target, determine whether following modules are loaded, by running the
lsmod
command in the Linux shell.can.ko can-dev.ko mttcan.ko mttcan_ivc.ko
- If the modules are not loaded, determine whether they are in following,
directory:
/lib/modules
- If the modules are not in this directory, set the following
CONFIG
options indefconfig
and rebuild kernel.CONFIG_CAN=m CONFIG_CAN_RAW=m CONFIG_CAN_DEV=m CONFIG_MTTCAN=m CONFIG_MTTCAN_IVC=m
- Alternatively, these options can be set using the instructions described in
Compiling the Kernel in the NVIDIA DRIVE OS 6.0 Linux PDK Development
Guide, "To compile the kernel" topic, steps 1-3 to:
- Setup the environment macros
- Set the kernel source directory
- Create an output directory and configure the kernel for the board
- Execute the following command.
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 <M> Bosch M_TTCAN IVC Devices
- Exit and save.
- Rebuild the kernel and copy the kernel Image from the kernel
out
directory to:drive-linux/kernel
For more information, see Compiling the Kernel in the NVIDIA DRIVE OS 6.0 Linux PDK Development Guide.
- Reflash the target.
For more information, see Flashing.
- Load all required modules.
# modprobe mttcan # modprobe mttcan_ivc
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.ko insmod /lib/modules/<KERNEL_VERSION>/kernel/drivers/net/can/can-dev.ko insmod /lib/modules/<KERNEL_VERSION>/t18x/drivers/staging/mttcan/mttcan.ko insmod /lib/modules/<KERNEL_VERSION>/t18x/drivers/net/can/mttcan /ivc/mttcan_ivc.ko
Note:
The <KERNEL_VERSION>
is in the form of x.x.xx-rtxx-tegra. For example, 4.4.38-rt49-tegra.