MTTCAN as a Kernel Built-in Driver

When you build the MTTCAN driver along with the kernel, it is part of the kernel binary.

  1. Follow the steps above in MTTCAN as a Module.
  2. Set the following CONFIG options in defconfig.

    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.

  3. 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
  4. 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
  5. Exit and save.
  6. 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.

  7. Reflash the target system.

    For more information, see Flashing.