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 additional information, refer to Compiling the Kernel (Kernel 5.15).
CONFIG_CAN=y CONFIG_CAN_RAW=y CONFIG_CAN_DEV=y CONFIG_MTTCAN=y
- Alternatively, these options can be set as described in Compiling the Kernel (Kernel 5.15), 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 additional information, refer to Compiling the Kernel (Kernel 5.15)
- Reflash the target system.
For additional information, refer to Flashing.