PCAN-miniPCIe FD driver for Linux arm64/aarch64 architecture

This forum covers PCAN-Linux and Linux development issues concerning our products
Anayat
Posts: 2
Joined: Wed 4. Aug 2021, 09:15

PCAN-miniPCIe FD driver for Linux arm64/aarch64 architecture

Post by Anayat » Wed 4. Aug 2021, 09:26

Hello Everyone,

I am using nvidia jetson agx xavier development board. I want to integrate PCAN-miniPCIe FD on nvidia jetson agx xavier embedded board. The nvidia jetson agx development board has arm64/aarch64 architecture. The OS is Ubuntu 18.04. My question is: Does the driver of PCAN-miniPCIe FD support the arm64/aarch64 architecture??

Any kind of help to get the answer of this question will be highly appreciated.


Regards
Anayat

M.Heidemann
Sales & Support
Sales & Support
Posts: 673
Joined: Fri 20. Sep 2019, 13:31

Re: PCAN-miniPCIe FD driver for Linux arm64/aarch64 architecture

Post by M.Heidemann » Wed 4. Aug 2021, 09:36

Hello,

Yes, the driver can be built and installed on a arm64 platforms.

http://www.peak-system.com/fileadmin/me ... 2.0.tar.gz

If you use the mainline-kernel version > 4.14, the drivers are already installed and
you should be able to use the ip link util to configure the device and use it with the SocketCAN API.

You could check via:

Code: Select all

ip link ls
If your channels are listed.

Best Regards

Marvin

Anayat
Posts: 2
Joined: Wed 4. Aug 2021, 09:15

Re: PCAN-miniPCIe FD driver for Linux arm64/aarch64 architecture

Post by Anayat » Wed 4. Aug 2021, 10:33

Hello Marvin,

Thanks for your quick support.


Regards
Anayat

JoshBowman
Posts: 9
Joined: Mon 23. Aug 2021, 19:53

Re: PCAN-miniPCIe FD driver for Linux arm64/aarch64 architecture

Post by JoshBowman » Mon 23. Aug 2021, 20:09

Hi Anayat,

I would like to use the PCAN-PCI card with our Jetson AGX Xavier (JETPACK 4.6 / 4.9.253-tegra).

I tried the following to install the driver:
1. Download peak-linux-driver-8.12.0.tar.gz and unzip
2. cd peak-linux-driver-8.12.0
3. sudo make netdev
4. sudo make install
5. sudo modprobe pcan

After these steps, the jetson freezes/crashes and won't start again...So I have to flash the system with the SDK Manager.
Could you maybe describe your installation steps...Thanks for your help.

JoshBowman
Posts: 9
Joined: Mon 23. Aug 2021, 19:53

Re: PCAN-miniPCIe FD driver for Linux arm64/aarch64 architecture

Post by JoshBowman » Tue 24. Aug 2021, 09:44

Code: Select all

~/Downloads/peak-linux-driver-8.12.0$ sudo make netdev
make[1]: Entering directory '/home/robot/Downloads/peak-linux-driver-8.12.0/driver'
make NET=NETDEV_SUPPORT
make[2]: Entering directory '/home/robot/Downloads/peak-linux-driver-8.12.0/driver'
***
*** Making pcan driver in netdev mode
***
*** Host OS Release=Ubuntu v18.04
*** Host machine kernel version=4.9.253-tegra
*** Driver kernel version=4.9.253-tegra (4.9.253)
*** Path to kernel sources=/lib/modules/4.9.253-tegra/build
*** use KBUILD=yes
*** use DKMS=no
*** gcc version=7
***
make -C /lib/modules/4.9.253-tegra/build  EXTRA_CFLAGS="-I/home/robot/Downloads/peak-linux-driver-8.12.0/driver -DNO_DEBUG -DMODVERSIONS -DNO_PARPORT_SUBSYSTEM -DUSB_SUPPORT -DPCI_SUPPORT -DPCIEC_SUPPORT -DISA_SUPPORT -DNO_DONGLE_SUPPORT -DNO_PCCARD_SUPPORT -DNETDEV_SUPPORT -DNO_RT   -Wno-date-time" V=0 modules SUBDIRS=/home/robot/Downloads/peak-linux-driver-8.12.0/driver
make[3]: Entering directory '/usr/src/linux-headers-4.9.253-tegra-ubuntu18.04_aarch64/kernel-4.9'
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_main.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_fops.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_fifo.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_filter.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_parse.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_sja1000.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_common.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_timing.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcanfd_core.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcanfd_ucan.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_usb_core.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_usb.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_usbpro.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcanfd_usb.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_pci.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcanfd_pci.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_pci_spi.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_pciec.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_isa.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_netdev.o
  LD [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/pcan.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/robot/Downloads/peak-linux-driver-8.12.0/driver/pcan.mod.o
  LD [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/pcan.ko
make[3]: Leaving directory '/usr/src/linux-headers-4.9.253-tegra-ubuntu18.04_aarch64/kernel-4.9'
make[2]: Leaving directory '/home/robot/Downloads/peak-linux-driver-8.12.0/driver'
make[1]: Leaving directory '/home/robot/Downloads/peak-linux-driver-8.12.0/driver'
make[1]: Entering directory '/home/robot/Downloads/peak-linux-driver-8.12.0/lib'
***
*** Making pcan libraries
***
*** gcc version: 7
***
gcc -DNO_RT -I. -I../driver -fPIC -Wall -Wcast-align -Wredundant-decls  -DPCANFD_OLD_STYLE_API -c src/libpcan.c -o obj/libpcan.o
gcc -shared -Wl,-soname,libpcan.so -o lib/libpcan.so.6 obj/libpcan.o 
cd lib/; ln -sf libpcan.so.6 libpcan.so
gcc -DNO_RT -I. -I../driver -fPIC -Wall -Wcast-align -Wredundant-decls  -DPCANFD_OLD_STYLE_API -c src/libpcanfd.c -o obj/libpcanfd.o
gcc -shared -Wl,-soname,libpcanfd.so -o lib/libpcanfd.so.8 obj/libpcanfd.o 
cd lib/; ln -sf libpcanfd.so.8 libpcanfd.so
ar rcs lib/libpcanfd.a obj/libpcanfd.o

Info: only 64-bit version of libpcan can be built. 32-bit version of libpcan can't because 64-bit compiler is not able to build any 32-bit binary.

make[1]: Leaving directory '/home/robot/Downloads/peak-linux-driver-8.12.0/lib'
make[1]: Entering directory '/home/robot/Downloads/peak-linux-driver-8.12.0/test'
***
*** Making example and test programs
***
*** gcc version: 7
***
gcc -DNO_RT -I. -I../lib -I../driver  -g src/receivetest.c src/common.c -lpcanfd  -L../lib/lib -Wl,-rpath ../lib/lib -o receivetest
g++ -DNO_RT -I. -I../lib -I../driver  -g src/transmitest.cpp src/common.c src/parser.cpp -lstdc++ -lpcanfd  -L../lib/lib -Wl,-rpath ../lib/lib -o transmitest
gcc -DNO_RT -I. -I../lib -I../driver  -g src/bitratetest.c src/common.c -lpcanfd  -L../lib/lib -Wl,-rpath ../lib/lib -o bitratetest
g++ -DNO_RT -I. -I../lib -I../driver  -g src/filtertest.cpp src/common.c -lstdc++ -lpcanfd  -L../lib/lib -Wl,-rpath ../lib/lib -o filtertest
gcc -DNO_RT -I. -I../lib -I../driver  -g src/pcanfdtst.c -lpcanfd  -L../lib/lib -Wl,-rpath ../lib/lib -lpthread -o pcanfdtst
gcc -DNO_RT -I. -I../lib -I../driver  -g src/pcan-settings.c -lpopt -lpcanfd  -L../lib/lib -Wl,-rpath ../lib/lib -g -o pcan-settings
gcc -DNO_RT -I. -I../lib -I../driver  -g src/receivetest_posix.c src/common.c -lpcanfd  -L../lib/lib -Wl,-rpath ../lib/lib -lpthread -o receivetest_posix
g++ -DNO_RT -I. -I../lib -I../driver  -g src/transmitest_posix.cpp src/common.c src/parser.cpp -lstdc++ -lpcanfd  -L../lib/lib -Wl,-rpath ../lib/lib -lpthread -o transmitest_posix
make[1]: Leaving directory '/home/robot/Downloads/peak-linux-driver-8.12.0/test'
make[1]: Entering directory '/home/robot/Downloads/peak-linux-driver-8.12.0/libpcanbasic'
make[2]: Entering directory '/home/robot/Downloads/peak-linux-driver-8.12.0/libpcanbasic/pcanbasic'
***
*** Making PCANBasic library with FD support (PCAN driver >= 8.0)
***
*** target=libpcanbasic
*** version=4.4.2
*** PCAN_ROOT=/home/robot/Downloads/peak-linux-driver-8.12.0
*** gcc version=7
***
mkdir -p out
gcc -fPIC -shared "-O2" -Wall -Wcast-align -Wcast-qual -Wimplicit  -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wunused -DNO_RT -I/home/robot/Downloads/peak-linux-driver-8.12.0/driver -I/home/robot/Downloads/peak-linux-driver-8.12.0/lib   -c src/libpcanbasic.c -o out/libpcanbasic.o
gcc -fPIC -shared "-O2" -Wall -Wcast-align -Wcast-qual -Wimplicit  -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wunused -DNO_RT -I/home/robot/Downloads/peak-linux-driver-8.12.0/driver -I/home/robot/Downloads/peak-linux-driver-8.12.0/lib   -c src/pcaninfo.c -o out/pcaninfo.o
gcc -fPIC -shared "-O2" -Wall -Wcast-align -Wcast-qual -Wimplicit  -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wunused -DNO_RT -I/home/robot/Downloads/peak-linux-driver-8.12.0/driver -I/home/robot/Downloads/peak-linux-driver-8.12.0/lib   -c src/pcanlog.c -o out/pcanlog.o
gcc -fPIC -shared "-O2" -Wall -Wcast-align -Wcast-qual -Wimplicit  -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wunused -DNO_RT -I/home/robot/Downloads/peak-linux-driver-8.12.0/driver -I/home/robot/Downloads/peak-linux-driver-8.12.0/lib   -c src/pcbcore.c -o out/pcbcore.o
gcc -fPIC -shared "-O2" -Wall -Wcast-align -Wcast-qual -Wimplicit  -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wunused -DNO_RT -I/home/robot/Downloads/peak-linux-driver-8.12.0/driver -I/home/robot/Downloads/peak-linux-driver-8.12.0/lib   -c src/pcblog.c -o out/pcblog.o
gcc -fPIC -shared "-O2" -Wall -Wcast-align -Wcast-qual -Wimplicit  -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wunused -DNO_RT -I/home/robot/Downloads/peak-linux-driver-8.12.0/driver -I/home/robot/Downloads/peak-linux-driver-8.12.0/lib   -c src/pcbtrace.c -o out/pcbtrace.o
gcc -fPIC -shared "-O2" -Wall -Wcast-align -Wcast-qual -Wimplicit  -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wunused -DNO_RT -I/home/robot/Downloads/peak-linux-driver-8.12.0/driver -I/home/robot/Downloads/peak-linux-driver-8.12.0/lib   -c /home/robot/Downloads/peak-linux-driver-8.12.0/lib/src/libpcanfd.c -o out/libpcanfd.o
gcc -shared -Wl,-soname,libpcanbasic.so -o libpcanbasic.so.4.4.2 out/libpcanbasic.o out/pcaninfo.o out/pcanlog.o out/pcbcore.o out/pcblog.o out/pcbtrace.o out/libpcanfd.o -lm    
ln -sf libpcanbasic.so.4.4.2 libpcanbasic.so
make[2]: Leaving directory '/home/robot/Downloads/peak-linux-driver-8.12.0/libpcanbasic/pcanbasic'
make[2]: Entering directory '/home/robot/Downloads/peak-linux-driver-8.12.0/libpcanbasic/pcaninfo'
*** Making PCANINFO
***
*** target=pcaninfo
*** version=1.2.0
*** PCAN_ROOT=/home/robot/Downloads/peak-linux-driver-8.12.0
*** gcc version=7
***
gcc src/main.c ../pcanbasic/src/pcanlog.c ../pcanbasic/src/pcblog.c ../pcanbasic/src/pcbtrace.c ../pcanbasic/src/pcbcore.c ../pcanbasic/src/pcaninfo.c /home/robot/Downloads/peak-linux-driver-8.12.0/lib/src/libpcanfd.c -O2 -Wall -Wcast-align -Wcast-qual -Wimplicit  -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wunused -DNO_RT -I../pcanbasic/src -I/home/robot/Downloads/peak-linux-driver-8.12.0/driver -I/home/robot/Downloads/peak-linux-driver-8.12.0/lib  -lm -ldl  -o pcaninfo.1.2.0
ln -sf pcaninfo.1.2.0 pcaninfo
make[2]: Leaving directory '/home/robot/Downloads/peak-linux-driver-8.12.0/libpcanbasic/pcaninfo'
make[2]: Entering directory '/home/robot/Downloads/peak-linux-driver-8.12.0/libpcanbasic/examples'
make[3]: Entering directory '/home/robot/Downloads/peak-linux-driver-8.12.0/libpcanbasic/examples/c++'
***
*** Making PCANBasic C++ examples
***
*** target=pcanwrite pcanread pcaneventread pcaneventwrite
*** g++ version=7
*** PCANBASIC_ROOT=../../pcanbasic
***
g++ -I../../pcanbasic -I/home/robot/Downloads/peak-linux-driver-8.12.0/driver -DNO_RT src/pcanwrite.cpp -L../../pcanbasic -Wl,-rpath ../../pcanbasic -lpcanbasic -o pcanwrite
g++ -I../../pcanbasic -I/home/robot/Downloads/peak-linux-driver-8.12.0/driver -DNO_RT src/pcanread.cpp -L../../pcanbasic -Wl,-rpath ../../pcanbasic -lpcanbasic -o pcanread
g++ -I../../pcanbasic -I/home/robot/Downloads/peak-linux-driver-8.12.0/driver -DNO_RT src/pcaneventread.cpp -L../../pcanbasic -Wl,-rpath ../../pcanbasic -lpcanbasic -o pcaneventread
g++ -I../../pcanbasic -I/home/robot/Downloads/peak-linux-driver-8.12.0/driver -DNO_RT src/pcaneventwrite.cpp -L../../pcanbasic -Wl,-rpath ../../pcanbasic -lpcanbasic -o pcaneventwrite
make[3]: Leaving directory '/home/robot/Downloads/peak-linux-driver-8.12.0/libpcanbasic/examples/c++'
make[3]: Entering directory '/home/robot/Downloads/peak-linux-driver-8.12.0/libpcanbasic/examples/python'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/robot/Downloads/peak-linux-driver-8.12.0/libpcanbasic/examples/python'
make[2]: Leaving directory '/home/robot/Downloads/peak-linux-driver-8.12.0/libpcanbasic/examples'
make[1]: Leaving directory '/home/robot/Downloads/peak-linux-driver-8.12.0/libpcanbasic'

Code: Select all

~/Downloads/peak-linux-driver-8.12.0$ sudo make install
make[1]: Entering directory '/home/robot/Downloads/peak-linux-driver-8.12.0/driver'
Info: Left current 'pcan'-entry in /etc/modprobe.d/pcan.conf untouched.
mkdir -p /usr/local/bin
cp -f udev/pcan_usb_minor_check.bash /usr/local/bin
chmod 744 /usr/local/bin/pcan_usb_minor_check.bash
cp -f udev/45-pcan.rules /etc/udev/rules.d
Info: Copied 45-pcan.rules to /etc/udev/rules.d.
cp -f udev/blacklist-peak.conf /etc/modprobe.d
chmod 644 /etc/modprobe.d/blacklist-peak.conf
Info: mainline drivers removed and blacklisted in
      /etc/modprobe.d/blacklist-peak.conf
udevadm control --reload-rules
- manually installing pcan under /lib/modules/4.9.253-tegra/misc...
- Building dependencies...
make[1]: Leaving directory '/home/robot/Downloads/peak-linux-driver-8.12.0/driver'
make[1]: Entering directory '/home/robot/Downloads/peak-linux-driver-8.12.0/lib'
mkdir -p /usr/lib
cp -d lib/* /usr/lib
if [ -d lib32 ]; then \
	mkdir -p /usr/lib32; \
	cp -d lib32/* /usr/lib32; \
fi
mkdir -p /usr/include
chmod 644 libpcan.h libpcanfd.h
cp libpcan.h libpcanfd.h /usr/include
/sbin/ldconfig
make[1]: Leaving directory '/home/robot/Downloads/peak-linux-driver-8.12.0/lib'
make[1]: Entering directory '/home/robot/Downloads/peak-linux-driver-8.12.0/test'
cp receivetest transmitest bitratetest filtertest pcanfdtst pcan-settings receivetest_posix transmitest_posix /usr/local/bin
make[1]: Leaving directory '/home/robot/Downloads/peak-linux-driver-8.12.0/test'
make[1]: Entering directory '/home/robot/Downloads/peak-linux-driver-8.12.0/libpcanbasic'
make[2]: Entering directory '/home/robot/Downloads/peak-linux-driver-8.12.0/libpcanbasic/pcanbasic'
cp libpcanbasic.so.4.4.2 /usr/lib/libpcanbasic.so.4.4.2
ln -sf /usr/lib/libpcanbasic.so.4.4.2 /usr/lib/libpcanbasic.so.4
ln -sf /usr/lib/libpcanbasic.so.4.4.2 /usr/lib/libpcanbasic.so.0
ln -sf /usr/lib/libpcanbasic.so.4 /usr/lib/libpcanbasic.so
cp PCANBasic.h /usr/include/PCANBasic.h
chmod 644 /usr/include/PCANBasic.h
/sbin/ldconfig
make[2]: Leaving directory '/home/robot/Downloads/peak-linux-driver-8.12.0/libpcanbasic/pcanbasic'
make[2]: Entering directory '/home/robot/Downloads/peak-linux-driver-8.12.0/libpcanbasic/pcaninfo'
cp pcaninfo.1.2.0 /usr/local/bin/pcaninfo
chmod 755 /usr/local/bin/pcaninfo
make[2]: Leaving directory '/home/robot/Downloads/peak-linux-driver-8.12.0/libpcanbasic/pcaninfo'
make[2]: Entering directory '/home/robot/Downloads/peak-linux-driver-8.12.0/libpcanbasic/examples'
make[3]: Entering directory '/home/robot/Downloads/peak-linux-driver-8.12.0/libpcanbasic/examples/c++'
#cp pcanwrite pcanread pcaneventread pcaneventwrite /usr/local/bin
make[3]: Leaving directory '/home/robot/Downloads/peak-linux-driver-8.12.0/libpcanbasic/examples/c++'
make[3]: Entering directory '/home/robot/Downloads/peak-linux-driver-8.12.0/libpcanbasic/examples/python'
make[3]: Nothing to be done for 'install'.
make[3]: Leaving directory '/home/robot/Downloads/peak-linux-driver-8.12.0/libpcanbasic/examples/python'
make[2]: Leaving directory '/home/robot/Downloads/peak-linux-driver-8.12.0/libpcanbasic/examples'
make[1]: Leaving directory '/home/robot/Downloads/peak-linux-driver-8.12.0/libpcanbasic'

Code: Select all

$ ls -l /dev/pcan*
ls: cannot access 'dev/pcan*': No such file or directory
Atfer

Code: Select all

sudo modprobe pcan
follows this...
screen_after_crash.jpg
screen_after_crash.jpg (2.72 MiB) Viewed 855 times
Last edited by JoshBowman on Tue 24. Aug 2021, 10:11, edited 1 time in total.

M.Heidemann
Sales & Support
Sales & Support
Posts: 673
Joined: Fri 20. Sep 2019, 13:31

Re: PCAN-miniPCIe FD driver for Linux arm64/aarch64 architecture

Post by M.Heidemann » Tue 24. Aug 2021, 10:10

Please check if using option fdusemsi resolves this.

Repeat your previous steps, apart from loading the driver modprobe.

Before loading the driver, do the following:

Edit the file /etc/modprobe.d/pcan.conf
and add the following line:

Code: Select all

options pcan fdusemsi=1
save the changes and load the driver via:

Code: Select all

$ sudo modprobe pcan
Does the freeze/crash still occur?

Please report back to us with your findings.

Best Regards

Marvin

JoshBowman
Posts: 9
Joined: Mon 23. Aug 2021, 19:53

Re: PCAN-miniPCIe FD driver for Linux arm64/aarch64 architecture

Post by JoshBowman » Tue 24. Aug 2021, 10:45

I have adjusted this file, (it looks like this)

Code: Select all

options pcan fdusemsi=1
install pcan modprobe --ignore-install pcan
however the problem still occurs...

Code: Select all

$ sudo modprobe pcan
-> freeze/crash

M.Heidemann
Sales & Support
Sales & Support
Posts: 673
Joined: Fri 20. Sep 2019, 13:31

Re: PCAN-miniPCIe FD driver for Linux arm64/aarch64 architecture

Post by M.Heidemann » Tue 24. Aug 2021, 15:39

Hello,

You have mentioned that you use a PCAN-PCI,
can you confirm with us the model-nr for this device (IPEH-XXXXXX)?

As far as we know the Nvidia jetson does not feature a PCI slot but a PCIe Slot,
are you using an adaptor by any chance or is the referenced device a PCIe device?

Please report back to us regarding this.

Best Regards

Marvin

JoshBowman
Posts: 9
Joined: Mon 23. Aug 2021, 19:53

Re: PCAN-miniPCIe FD driver for Linux arm64/aarch64 architecture

Post by JoshBowman » Tue 24. Aug 2021, 16:01

You're right, it is a PCAN-PCI Express card and we don't have to use an adapter. The model-nr is IPEH-003027 (PCAN-PCI Express Dual Channel galv. isolated).
PCAN-PCI Express Slot.jpg
PCAN-PCI Express Slot.jpg (1.93 MiB) Viewed 823 times
If I just try to install the package with PCI and PCIEC, it cannot find the directory.

Code: Select all

~/Downloads/peak-linux-driver-8.12.0$ make -C driver NET=NETDEV_SUPPORT DNG=NO_DONGLE_SUPPORT USB=NO_USB_SUPPORT ISA=NO_ISA_SUPPORT PCC=NO_PCCARD_SUPPORT
make: Entering directory '/home/robot/Downloads/peak-linux-driver-8.12.0/driver'
***
*** Making pcan driver in netdev mode
***
*** Host OS Release=Ubuntu v18.04
*** Host machine kernel version=4.9.253-tegra
*** Driver kernel version=4.9.253-tegra (4.9.253)
*** Path to kernel sources=/lib/modules/4.9.253-tegra/build
*** use KBUILD=yes
*** use DKMS=no
*** gcc version=7
***
make -C /lib/modules/4.9.253-tegra/build  EXTRA_CFLAGS="-I/home/robot/Downloads/peak-linux-driver-8.12.0/driver -DNO_DEBUG -DMODVERSIONS -DNO_PARPORT_SUBSYSTEM -DNO_USB_SUPPORT -DPCI_SUPPORT -DPCIEC_SUPPORT -DNO_ISA_SUPPORT -DNO_DONGLE_SUPPORT -DNO_PCCARD_SUPPORT -DNETDEV_SUPPORT -DNO_RT   -Wno-date-time" V=0 modules SUBDIRS=/home/robot/Downloads/peak-linux-driver-8.12.0/driver
make[1]: Entering directory '/usr/src/linux-headers-4.9.253-tegra-ubuntu18.04_aarch64/kernel-4.9'
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_main.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_fops.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_fifo.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_filter.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_parse.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_sja1000.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_common.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_timing.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcanfd_core.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcanfd_ucan.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_pci.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcanfd_pci.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_pci_spi.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_pciec.o
  CC [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/src/pcan_netdev.o
  LD [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/pcan.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/robot/Downloads/peak-linux-driver-8.12.0/driver/pcan.mod.o
  LD [M]  /home/robot/Downloads/peak-linux-driver-8.12.0/driver/pcan.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.9.253-tegra-ubuntu18.04_aarch64/kernel-4.9'
make: Leaving directory '/home/robot/Downloads/peak-linux-driver-8.12.0/driver'

Code: Select all

robot@robot:~/Downloads/peak-linux-driver-8.12.0$ sudo make install
make[1]: Entering directory '/home/robot/Downloads/peak-linux-driver-8.12.0/driver'
mkdir -p /usr/local/bin
cp -f udev/pcan_usb_minor_check.bash /usr/local/bin
chmod 744 /usr/local/bin/pcan_usb_minor_check.bash
cp -f udev/45-pcan.rules /etc/udev/rules.d
Info: Copied 45-pcan.rules to /etc/udev/rules.d.
cp -f udev/blacklist-peak.conf /etc/modprobe.d
chmod 644 /etc/modprobe.d/blacklist-peak.conf
Info: mainline drivers removed and blacklisted in
      /etc/modprobe.d/blacklist-peak.conf
udevadm control --reload-rules
- manually installing pcan under /lib/modules/4.9.253-tegra/misc...
- Building dependencies...
make[1]: Leaving directory '/home/robot/Downloads/peak-linux-driver-8.12.0/driver'
make[1]: Entering directory '/home/robot/Downloads/peak-linux-driver-8.12.0/lib'
mkdir -p /usr/lib
cp -d lib/* /usr/lib
cp: cannot stat 'lib/*': No such file or directory
Makefile:183: recipe for target 'install' failed
make[1]: *** [install] Error 1
make[1]: Leaving directory '/home/robot/Downloads/peak-linux-driver-8.12.0/lib'
Makefile:90: recipe for target 'install' failed
make: *** [install] Error 2
The card works on a Linux 5.4.0-81-generic x86_64.

M.Heidemann
Sales & Support
Sales & Support
Posts: 673
Joined: Fri 20. Sep 2019, 13:31

Re: PCAN-miniPCIe FD driver for Linux arm64/aarch64 architecture

Post by M.Heidemann » Wed 25. Aug 2021, 11:23

Hello,

Are you able to only install the driver itself?

For SocketCAN you only need the driver itself

Code: Select all

sudo make -C driver install
Will the issue remain upon loading the pcan-driver?

Furthermore, whats your output for:

Code: Select all

sudo lspci -vvv -d 1c:

Please report back to us regarding this.

Best Regards

Marvin

Post Reply