I try to build and install the pcan driver (8.15.1) on a Docker image:
The compilation and linking of the driver seems to not cause any problems, but the installation runs into a problem and I have hard times to understand the error message:# uname -a
Linux 685b04ac64b0 5.10.104-linuxkit #1 SMP PREEMPT Thu Mar 17 17:05:54 UTC 2022 aarch64 Linux
According to the error message, there should be a problem in line 683 of driver/Makefile:# cd /peak-linux-driver-8.15.1 && make -C driver all install
make: Entering directory '/peak-linux-driver-8.15.1/driver'
***
*** Making pcan driver in chardev mode
***
*** Host OS Release=Alpine Linux v3.13.5
*** Host machine kernel version=5.10.104-linuxkit
*** Driver kernel version=5.10.104-linuxkit (5.10.104)
*** Path to kernel sources=/usr/src/linux-headers-5.10.104-linuxkit
*** use KBUILD=yes
*** use DKMS=
*** gcc version=10.2.1
***
make -C /usr/src/linux-headers-5.10.104-linuxkit EXTRA_CFLAGS="-I/peak-linux-driver-8.15.1/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=/peak-linux-driver-8.15.1/driver
make[1]: Entering directory '/usr/src/linux-headers-5.10.104-linuxkit'
CC [M] /peak-linux-driver-8.15.1/driver/src/pcan_main.o
CC [M] /peak-linux-driver-8.15.1/driver/src/pcan_fops.o
CC [M] /peak-linux-driver-8.15.1/driver/src/pcan_fifo.o
CC [M] /peak-linux-driver-8.15.1/driver/src/pcan_filter.o
CC [M] /peak-linux-driver-8.15.1/driver/src/pcan_parse.o
CC [M] /peak-linux-driver-8.15.1/driver/src/pcan_sja1000.o
CC [M] /peak-linux-driver-8.15.1/driver/src/pcan_common.o
CC [M] /peak-linux-driver-8.15.1/driver/src/pcan_timing.o
CC [M] /peak-linux-driver-8.15.1/driver/src/pcanfd_core.o
CC [M] /peak-linux-driver-8.15.1/driver/src/pcanfd_ucan.o
CC [M] /peak-linux-driver-8.15.1/driver/src/pcan_usb_core.o
CC [M] /peak-linux-driver-8.15.1/driver/src/pcan_usb.o
CC [M] /peak-linux-driver-8.15.1/driver/src/pcan_usbpro.o
CC [M] /peak-linux-driver-8.15.1/driver/src/pcanfd_usb.o
CC [M] /peak-linux-driver-8.15.1/driver/src/pcan_pci.o
CC [M] /peak-linux-driver-8.15.1/driver/src/pcanfd_pci.o
CC [M] /peak-linux-driver-8.15.1/driver/src/pcan_pci_spi.o
CC [M] /peak-linux-driver-8.15.1/driver/src/pcan_pciec.o
CC [M] /peak-linux-driver-8.15.1/driver/src/pcan_isa.o
LD [M] /peak-linux-driver-8.15.1/driver/pcan.o
MODPOST /peak-linux-driver-8.15.1/driver/Module.symvers
CC [M] /peak-linux-driver-8.15.1/driver/pcan.mod.o
LD [M] /peak-linux-driver-8.15.1/driver/pcan.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.10.104-linuxkit'
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
make: *** [Makefile:683: install_udev] Error 2
make: Leaving directory '/peak-linux-driver-8.15.1/driver'
Code: Select all
kvernum=$(KVERNUM);\
for m in $(shell awk '/^blacklist/ { print $$2 }' udev/blacklist-peak.conf); do\
if [ $$m = "peak_pci" ] && [ $$kvernum -lt 30400 ]; then\
peak_pci=`lsmod | grep -ce peak_pci`;\ <------- Line 683
else\
rmmod $$m 2> /dev/null;\
fi;\
done;\
if [ $$peak_pci -ne 0 ]; then\
echo "Info: peak_pci can't be removed from the Kernel";\
echo " You should reboot to complete the installation.";\
fi
cp -f udev/blacklist-peak.conf $(shell dirname $(MODCONF))
TIA
Torsten