Install extra driver for Kvaser USB CAN device

Hello,

I am attempting to use the Kvaser USB CAN device on the Jetson TX2 with ConnectTech’s Orbittry breakout board for size benefit.

On my Ubuntu laptop, the kvaser_usb.ko is available which recognizes the device right after plugging in (kvaser_usb is the name of the driver according to this CAN Bus - eLinux.org) and I can use SocketCAN to read CAN messages. However, I don’t see this file anywhere in the TX2 driver list.

I think I have to install this driver somehow onto TX2 to recognize the device. Can anyone point me to the right direction how to do this? I’m pretty new to this driver/kernel/modules concept, but I’m willing to learn and flash Jetpack again and again in case something breaks.

Thanks!

Here is some kernel build information, but the official docs also show this (those docs are centered on cross-compile from a host PC…this URL is centered on native commpile directly on the TX2):
[url]https://devtalk.nvidia.com/default/topic/1038175/jetson-tx2/tx2i-wifi-support/post/5274619/#5274619[/url]

The gist is that a kernel can have features integrated into it, or it can have features set as a module which can be loaded some time after boot. Not all features can be a module, but many can (probably your driver can be a module). If you were to build a module, then you would start by setting up the configuration to be an exact match of the running system. Then you would use a utility (such as “make nconfig”) to find and enable your driver as a module (direct editing of config can leave out dependencies and isn’t recommended). Then you would simply copy the module (the file with the “.ko” suffix in its name) to the right place. The above URL explains more detail…so does the kernel customization part of the official docs.

If no device tree changes are required, then it should just work (well, you’d reboot first). Some “wiring” of I/O involves GPIO, and by its nature a GPIO can be used for more than one purpose…should that be the case, then you will probably also require a device tree edit.

Similar topic on the Jetson TX1 (with solution LinuxDev!)
[url]https://devtalk.nvidia.com/default/topic/996712/jetson-tx1/compile-kvaser-linuxcan-driver-in-tx1-fail/[/url]

@linuxdev thank you for the information. I am reading through it, but it seems helpful. One question, is there any complete drive list of the kernel somewhere on the Nvidia document? I tried to look but I couldn’t find it anywhere. Thanks!

@david_evans_g Thank you, I did come across that post before. But wasn’t exactly sure what was going on in there and that seems there were bugs in older Jetpack version as well.

There may be a kernel.org list, but the best thing to do is to start with the “/proc/config.gz” of the running system, and then run something like “make nconfig”. This lets you search for symbols.

The actual file on the running system, “/proc/config.gz”, is a 100% inclusive list of what the kernel knew about at the time it was built (there can be modules which the kernel doesn’t know about, e.g., third party proprietary modules from a vendor’s web site). So for example you can do this to get a list:

zcat /proc/config.gz > config.txt