MTTCAN as a Kernel Built-in Driver
When you build the MTTCAN driver along with the kernel, it is part of the kernel binary.
- Follow the steps above in MTTCAN as a Module.
- Set the following
CONFIG
options indefconfig
.For more information, see Compiling the Kernel in the NVIDIA DRIVE OS 6.0 Linux PDK Development Guide.
CONFIG_CAN=y CONFIG_CAN_RAW=y CONFIG_CAN_DEV=y CONFIG_MTTCAN=y CONFIG_MTTCAN_IVC=n
Note:Only one of the two configurations can be enabled CONFIG_MTTCAN or CONFIG_MTTCAN_IVC. Both cannot be statically linked simultaneously.
- 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
- Exit and save.
- Build the kernel and copy the modules from the kernel Image and zImage as
follows:
cp ${PWD}/out-linux/arch/arm64/boot/zImage <top>/drive-linux/kernel cp ${PWD}/out-linux/arch/arm64/boot/Image <top>/drive-linux/kernel
For more information, see Compiling the Kernel in the NVIDIA DRIVE OS 6.0 Linux PDK Development Guide.
- Reflash the target system.
For more information, see Flashing.