Cannot install peak-linux-driver

This forum covers PCAN-Linux and Linux development issues concerning our products
Post Reply
alexvr6
Posts: 2
Joined: Wed 30. Jun 2021, 09:37

Cannot install peak-linux-driver

Post by alexvr6 » Wed 30. Jun 2021, 09:42

Hello,
I'm trying to install the driver on a Raspberry Pi. Unfortunately, it doesn't work. Can you help me?
With make comes the following message:

Code: Select all

root@raspberrypi:/home/atrinks/peak-linux-driver-8.12.0# make
make[1]: Verzeichnis „/home/atrinks/peak-linux-driver-8.12.0/driver“ wird betreten
***
*** Making pcan driver in chardev mode
***
*** Host OS Release=Raspbian GNU/Linux v10
*** Host machine kernel version=5.10.17+
*** Driver kernel version=5.10.17+ (5.10.17)
*** Path to kernel sources=/usr/src/linux-headers-5.10.17+
*** use KBUILD=yes
*** use DKMS=no
*** gcc version=8
***
make -C /usr/src/linux-headers-5.10.17+  EXTRA_CFLAGS="-I/home/atrinks/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 -DNO_NETDEV_SUPPORT -DNO_RT   -Wno-date-time" V=0 modules M=/home/atrinks/peak-linux-driver-8.12.0/driver
make[2]: Verzeichnis „/usr/src/linux-headers-5.10.17+“ wird betreten
  CC [M]  /home/atrinks/peak-linux-driver-8.12.0/driver/src/pcan_main.o
  CC [M]  /home/atrinks/peak-linux-driver-8.12.0/driver/src/pcan_fops.o
  CC [M]  /home/atrinks/peak-linux-driver-8.12.0/driver/src/pcan_fifo.o
  CC [M]  /home/atrinks/peak-linux-driver-8.12.0/driver/src/pcan_filter.o
  CC [M]  /home/atrinks/peak-linux-driver-8.12.0/driver/src/pcan_parse.o
  CC [M]  /home/atrinks/peak-linux-driver-8.12.0/driver/src/pcan_sja1000.o
  CC [M]  /home/atrinks/peak-linux-driver-8.12.0/driver/src/pcan_common.o
  CC [M]  /home/atrinks/peak-linux-driver-8.12.0/driver/src/pcan_timing.o
  CC [M]  /home/atrinks/peak-linux-driver-8.12.0/driver/src/pcanfd_core.o
  CC [M]  /home/atrinks/peak-linux-driver-8.12.0/driver/src/pcanfd_ucan.o
  CC [M]  /home/atrinks/peak-linux-driver-8.12.0/driver/src/pcan_usb_core.o
  CC [M]  /home/atrinks/peak-linux-driver-8.12.0/driver/src/pcan_usb.o
  CC [M]  /home/atrinks/peak-linux-driver-8.12.0/driver/src/pcan_usbpro.o
  CC [M]  /home/atrinks/peak-linux-driver-8.12.0/driver/src/pcanfd_usb.o
  CC [M]  /home/atrinks/peak-linux-driver-8.12.0/driver/src/pcan_pci.o
  CC [M]  /home/atrinks/peak-linux-driver-8.12.0/driver/src/pcanfd_pci.o
/home/atrinks/peak-linux-driver-8.12.0/driver/src/pcanfd_pci.c: In function ‘show_pcan_rx_dma_laddr’:
/home/atrinks/peak-linux-driver-8.12.0/driver/src/pcanfd_pci.c:254:10: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘dma_addr_t’ {aka ‘unsigned int’} [-Wformat=]
    "0x%llx\n",
       ~~~^
       %x
/home/atrinks/peak-linux-driver-8.12.0/driver/src/pcanfd_pci.c:256:4:
    pdev->port.pci.rx_dma_laddr);
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/atrinks/peak-linux-driver-8.12.0/driver/src/pcanfd_pci.c: In function ‘show_pcan_tx_dma_laddr’:
/home/atrinks/peak-linux-driver-8.12.0/driver/src/pcanfd_pci.c:274:10: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘dma_addr_t’ {aka ‘unsigned int’} [-Wformat=]
    "0x%llx\n",
       ~~~^
       %x
/home/atrinks/peak-linux-driver-8.12.0/driver/src/pcanfd_pci.c:276:4:
    pdev->port.pci.tx_dma_laddr);
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CC [M]  /home/atrinks/peak-linux-driver-8.12.0/driver/src/pcan_pci_spi.o
  CC [M]  /home/atrinks/peak-linux-driver-8.12.0/driver/src/pcan_pciec.o
  CC [M]  /home/atrinks/peak-linux-driver-8.12.0/driver/src/pcan_isa.o
  LD [M]  /home/atrinks/peak-linux-driver-8.12.0/driver/pcan.o
  MODPOST /home/atrinks/peak-linux-driver-8.12.0/driver/Module.symvers
ERROR: modpost: "pci_iounmap" [/home/atrinks/peak-linux-driver-8.12.0/driver/pcan.ko] undefined!
make[3]: *** [scripts/Makefile.modpost:111: /home/atrinks/peak-linux-driver-8.12.0/driver/Module.symvers] Fehler 1
make[3]: *** Datei „/home/atrinks/peak-linux-driver-8.12.0/driver/Module.symvers“ wird gelöscht
make[2]: *** [Makefile:1708: modules] Fehler 2
make[2]: Verzeichnis „/usr/src/linux-headers-5.10.17+“ wird verlassen
make[1]: *** [Makefile:516: all] Fehler 2
make[1]: Verzeichnis „/home/atrinks/peak-linux-driver-8.12.0/driver“ wird verlassen
make: *** [Makefile:72: all] Fehler 2

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

Re: Cannot install peak-linux-driver

Post by M.Heidemann » Wed 30. Jun 2021, 09:47

Hello,

Have you followed the following thread by my colleague Michael?
https://forum.peak-system.com/viewtopi ... =59&t=3381


It describes in detail how to install the PCAN-Linux drivers on a Raspberry platform.

Please report back to us if this helped you solve the issue

Best Regards

Marvin

alexvr6
Posts: 2
Joined: Wed 30. Jun 2021, 09:37

Re: Cannot install peak-linux-driver

Post by alexvr6 » Wed 30. Jun 2021, 11:12

Hello Marvin,

Michael's instructions worked. I used "make PCC = NO PCI = NO ISA = NO DNG = NO NET = NETDEV_SUPPORT", without netdev it didn't work for me. Thanks for the quick support.

Perhaps you can pin the instructions to the top of the forum so that they can be found more quickly.

Best regards

Alex

Post Reply