Page 1 of 1

Unable to compile the Peak Driver 8.7 on a NVIDIA TX1

Posted: Wed 13. Feb 2019, 15:52
by vjexposito
Hello,

I have some problems with the installation of the Peak driver on a NVIDIA TX1. When I compile the driver in the standard way (make or make -C driver) I have no problem and everything seems to work. If I use the option: NET=NETDEV_SUPPORT, I get the following output.

Code: Select all

$ make -C driver NET=NETDEV_SUPPORT
make: Entering directory '/home/nvidia/Downloads/peak-linux-driver-8.7.0/driver'
***
*** Host machine kernel version=4.4.38-tegra
*** Driver kernel version=4.4.38-tegra (4.4.38)
*** Path to kernel sources=/usr/src/linux-headers-4.4.38-tegra
*** use KBUILD=yes
*** cc version=5.5.0
***
make -C /usr/src/linux-headers-4.4.38-tegra  SUBDIRS=/home/nvidia/Downloads/peak-linux-driver-8.7.0/driver EXTRA_CFLAGS=" -I/home/nvidia/Downloads/peak-linux-driver-8.7.0/driver -DNO_DEBUG -DMODVERSIONS -DPARPORT_SUBSYSTEM -DUSB_SUPPORT -DPCI_SUPPORT -DPCIEC_SUPPORT -DISA_SUPPORT -DDONGLE_SUPPORT -DPCCARD_SUPPORT -DNETDEV_SUPPORT -DNO_RT  -Wno-date-time" V=0 modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.38-tegra'
  CC [M]  /home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/src/pcan_main.o
  CC [M]  /home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/src/pcan_fops.o
  CC [M]  /home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/src/pcan_fifo.o
  CC [M]  /home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/src/pcan_filter.o
  CC [M]  /home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/src/pcan_parse.o
  CC [M]  /home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/src/pcan_sja1000.o
  CC [M]  /home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/src/pcan_common.o
  CC [M]  /home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/src/pcan_timing.o
  CC [M]  /home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/src/pcanfd_core.o
  CC [M]  /home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/src/pcanfd_ucan.o
  CC [M]  /home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/src/pcan_usb_core.o
  CC [M]  /home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/src/pcan_usb.o
  CC [M]  /home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/src/pcan_usbpro.o
  CC [M]  /home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/src/pcanfd_usb.o
  CC [M]  /home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/src/pcan_pci.o
  CC [M]  /home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/src/pcanfd_pci.o
  CC [M]  /home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/src/pcan_pciec.o
  CC [M]  /home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/src/pcan_isa.o
  CC [M]  /home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/src/pcan_dongle.o
  CC [M]  /home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/src/pcan_pccard_core.o
  CC [M]  /home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/src/pcan_pccard.o
  CC [M]  /home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/src/pcan_netdev.o
  LD [M]  /home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/pcan.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: "register_candev" [/home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/pcan.ko] undefined!
WARNING: "alloc_can_err_skb" [/home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/pcan.ko] undefined!
WARNING: "can_bus_off" [/home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/pcan.ko] undefined!
WARNING: "close_candev" [/home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/pcan.ko] undefined!
WARNING: "can_change_mtu" [/home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/pcan.ko] undefined!
WARNING: "unregister_candev" [/home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/pcan.ko] undefined!
WARNING: "alloc_can_skb" [/home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/pcan.ko] undefined!
WARNING: "open_candev" [/home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/pcan.ko] undefined!
WARNING: "alloc_canfd_skb" [/home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/pcan.ko] undefined!
  CC      /home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/pcan.mod.o
  LD [M]  /home/nvidia/Downloads/peak-linux-driver-8.7.0/driver/pcan.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.4.38-tegra'
make: Leaving directory '/home/nvidia/Downloads/peak-linux-driver-8.7.0/driver'
And, although, I can install the driver; I got an error every time I plug in the adapter.

Output two:

Code: Select all

[   11.083162] pcan: Unknown symbol alloc_can_skb (err 0)
[  114.064833] pcan: Unknown symbol alloc_can_skb (err 0)
[ 3312.677650] pcan: Unknown symbol alloc_canfd_skb (err 0)
[ 3312.683118] pcan: Unknown symbol open_candev (err 0)
[ 3312.688118] pcan: Unknown symbol alloc_can_skb (err 0)
[ 3312.693649] pcan: Unknown symbol unregister_candev (err 0)
[ 3312.699190] pcan: Unknown symbol can_change_mtu (err 0)
[ 3312.704472] pcan: Unknown symbol close_candev (err 0)
[ 3312.709618] pcan: Unknown symbol can_bus_off (err 0)
[ 3312.714670] pcan: Unknown symbol alloc_can_err_skb (err 0)
[ 3312.720165] pcan: Unknown symbol register_candev (err 0)

Does anyone have an idea to solve this problem? I have tried the proposed ones from the forum but I could not find a way to run the adapter on the TX1. I am able to use the adapter without any problem on a Ubuntu 16.04 VM.

Thanks in advance!
Regards

Re: Unable to compile the Peak Driver 8.7 on a NVIDIA TX1

Posted: Wed 13. Feb 2019, 17:09
by S.Grosjean
Hello,

I don't know if your TX1 boots on Grub. If it does, please check if CAN is enabled in your Kernel config:

Code: Select all

$ grep CONFIG_CAN /boot/config-`uname -r`
If it doesn't, you might get the config of your current Kernel with:

Code: Select all

$ zcat /proc/config.gz
(if the option had been configured, which is not the case under Ubuntu, for example)

You should at least see:

Code: Select all

CONFIG_CAN=m
CONFIG_CAN_DEV=m
...
Regards,

Re: Unable to compile the Peak Driver 8.7 on a NVIDIA TX1

Posted: Wed 13. Feb 2019, 17:35
by vjexposito
Hello Stéphane,

Thanks for the fast answer. Unfortunately, it seems that CAN is not enabled in my TX1. I get these messages when I check the kernel configuration.

Code: Select all

$ grep CONFIG_CAN /boot/config-`uname -r`
grep: /boot/config-4.4.38-tegra: No such file or directory

Code: Select all

# CONFIG_CAN is not set
How could I enable CAN in my kernel?

Thanks again in advance,
Regards

Re: Unable to compile the Peak Driver 8.7 on a NVIDIA TX1

Posted: Thu 14. Feb 2019, 09:49
by S.Grosjean
Hello,

Please first get support from the provider of your Nvidia TX1. Either he will be able to provide you a Kernel with the CAN options enabled, or he should be able to provide you the whole build environment to rebuild your own. In that last case, then you'll have to run:

Code: Select all

$ make menuconfig
and select:

Code: Select all

[*] Networking support  --->
    <M>   CAN bus subsystem support  --->
        <M>   Raw CAN Protocol (raw access with CAN-ID filtering)
         CAN Device Drivers  --->
            <M> Platform CAN drivers with Netlink support
            [*]   CAN bit-timing calculation
Regards,

Re: Unable to compile the Peak Driver 8.7 on a NVIDIA TX1

Posted: Fri 15. Feb 2019, 14:06
by vjexposito
Hello Stéphane,

I will try it. Thanks for your help.

Regards