Use kvaser on xavier

Due to the limit of can channels on xavier, I need to use kvaser on xavier. My kvaser type is “Kvaser USBcan Light 4xHS”, which is not in kernel_src/kernel/kernel-4.4/drivers/net/can/usb/Kconfig. So I followed the below link to update kvsaser_usb.ko.

When I ran “make”, it said “No rule to make target ‘modules’”. Looks like it is due to miss the kernel header files. My kernel version is 4.14.102-rt53-tegra. Can anyone tell me how to address this issue?

Here is my make file:
obj-m += kvaser_usb.o
all:
make -C /lib/modules/(shell uname -r)/build M=(PWD) modules

clean:
make -C /lib/modules/(shell uname -r)/build M=(PWD) clean

Many thanks!

Hi Phil.Chen,

In your https://devtalk.nvidia.com/default/topic/1070277/-lib-modules-4-14-102-rt53-tegra-build-no-such-file-or-directory/, we discussed about DRIVE Software kernel source availability. So if you are still not able to install kvaser drivers, I would suggest you to get the support from kvaser or you can do internet search if any other kvaser users have relevant experience on this. Thanks!

Thank you Vick! It works.

Good to hear you fixing your problem!

If you can share in details how you fixed your issue and other developers may benefit from it, it will better. Thanks!

Sure thing.

  1. Download the corresponding Kvaser files.
    My Kvaser device is light 4xHS. So, need to use the Kvaser c file from this link
    https://github.com/torvalds/linux/commit/aec5fb2268b700f3c4e8481ab431eefcd33893f6#diff-b7df765f713d9b1d4c3b55d1b00a0ade. (Note, this is 2018 version, there is some compiling issue with the 2019 version).

  2. Follow the link provided in this discussion, replace the Kvaser file under /drive-oss-src/kernel/drivers/net/can/usb on the host.

  3. Follow the link provided in this discussion, compile the kernel on the host.

  4. Copy the new built Kvaser_usb.ko file to Xavier.