Page 1 of 1
Driver compilation failure on Debian
Posted: Tue 19. Mar 2019, 18:29
by corky
On an older Debian 5.10 system, I'm having trouble compiling the driver for PCI Card (i've tried various newest, back to 3.17!).
Installed linux-headers (2.6.26-686)
build essentiais
tar -xzf peak-linux-driver.6.0.tar.gz
cd peak-linux-driver-6.0/
make clean
make
This fails with Error 1 : No rule to make target modules. Stop.
Leaving Directory /usr/src/linux
Am I missing a symbolic link or something? There's no UEFI boot for Secure boot to be switched on on the system?
Thanks,
Corky
Re: Driver compilation failure on Debian
Posted: Wed 20. Mar 2019, 10:27
by M.Maidhof
Hi,
which kernel version do you use? Please post output of uname -a.
best regards
Michael
Re: Driver compilation failure on Debian
Posted: Wed 20. Mar 2019, 11:25
by corky
Hi Michael,
Thanks for the response.
uname -a gives:
Its 2.6.26.2-686 GNU/Linux
Re: Driver compilation failure on Debian
Posted: Wed 20. Mar 2019, 12:22
by corky
Here are the results of running 8.7 driver install
make clean
Code: Select all
make[1]: Entering directory `/home/ccmuser/linuxy/peak-linux-driver-8.7.0/driver'
rm -f src/*o src/*~ src/.*cmd *o *ko *~ .*cmd pcan.mod.c Module.symvers modules.order .cache.mk
make[1]: Leaving directory `/home/ccmuser/linuxy/peak-linux-driver-8.7.0/driver'
make[1]: Entering directory `/home/ccmuser/linuxy/peak-linux-driver-8.7.0/lib'
rm -f src/*~
rm -rf obj lib obj32 lib32
make[1]: Leaving directory `/home/ccmuser/linuxy/peak-linux-driver-8.7.0/lib'
make[1]: Entering directory `/home/ccmuser/linuxy/peak-linux-driver-8.7.0/test'
rm -f src/*~ src/*.o *~ receivetest transmitest bitratetest filtertest pcanfdtst pcan-settings
make[1]: Leaving directory `/home/ccmuser/linuxy/peak-linux-driver-8.7.0/test'
make
Code: Select all
make[1]: Entering directory `/home/ccmuser/linuxy/peak-linux-driver-8.7.0/driver'
make[1]: Nothing to be done for `depend'.
make[1]: Leaving directory `/home/ccmuser/linuxy/peak-linux-driver-8.7.0/driver'
make[1]: Entering directory `/home/ccmuser/linuxy/peak-linux-driver-8.7.0/driver'
***
*** Host machine kernel version=2.6.26-2-686
*** Driver kernel version=2.6.26-2-686 (2.6.26)
*** Path to kernel sources=/usr/src/linux-headers-2.6.26-2-686
*** use KBUILD=yes
*** cc version=4.3.2
***
make -C /usr/src/linux-headers-2.6.26-2-686 SUBDIRS=/home/ccmuser/linuxy/peak-linux-driver-8.7.0/driver EXTRA_CFLAGS="-I/home/ccmuser/linuxy/peak-linux-driver-8.7.0/driver -DNO_DEBUG -DMODVERSIONS -DPARPORT_SUBSYSTEM -DUSB_SUPPORT -DPCI_SUPPORT -DPCIEC_SUPPORT -DISA_SUPPORT -DDONGLE_SUPPORT -DPCCARD_SUPPORT -DNO_NETDEV_SUPPORT -DNO_RT " V=0 modules
make[2]: Entering directory `/usr/src/linux-headers-2.6.26-2-686'
CC [M] /home/ccmuser/linuxy/peak-linux-driver-8.7.0/driver/src/pcan_main.o
In file included from /home/ccmuser/linuxy/peak-linux-driver-8.7.0/driver/src/pcan_main.c:46:
/home/ccmuser/linuxy/peak-linux-driver-8.7.0/driver/src/pcan_common.h: In function ‘pcan_getnow_ts’:
/home/ccmuser/linuxy/peak-linux-driver-8.7.0/driver/src/pcan_common.h:182: error: implicit declaration of function ‘getrawmonotonic’
/home/ccmuser/linuxy/peak-linux-driver-8.7.0/driver/src/pcan_main.c: In function ‘pcan_sysfs_dev_node_create_ex’:
/home/ccmuser/linuxy/peak-linux-driver-8.7.0/driver/src/pcan_main.c:849: warning: passing argument 4 of ‘device_create’ from incompatible pointer type
/home/ccmuser/linuxy/peak-linux-driver-8.7.0/driver/src/pcan_main.c: In function ‘pcan_sync_times’:
/home/ccmuser/linuxy/peak-linux-driver-8.7.0/driver/src/pcan_main.c:1209: error: expected ‘)’ before ‘pr_fmt’
/home/ccmuser/linuxy/peak-linux-driver-8.7.0/driver/src/pcan_main.c:1223: error: expected ‘)’ before ‘pr_fmt’
/home/ccmuser/linuxy/peak-linux-driver-8.7.0/driver/src/pcan_main.c:1253: error: implicit declaration of function ‘DIV_ROUND_UP_SECTOR_T’
/home/ccmuser/linuxy/peak-linux-driver-8.7.0/driver/src/pcan_main.c: In function ‘pcan_remove_dev_from_list’:
/home/ccmuser/linuxy/peak-linux-driver-8.7.0/driver/src/pcan_main.c:2369: error: expected ‘)’ before ‘pr_fmt’
/home/ccmuser/linuxy/peak-linux-driver-8.7.0/driver/src/pcan_main.c: In function ‘init_module’:
/home/ccmuser/linuxy/peak-linux-driver-8.7.0/driver/src/pcan_main.c:3639: error: expected ‘)’ before ‘pr_fmt’
make[3]: *** [/home/ccmuser/linuxy/peak-linux-driver-8.7.0/driver/src/pcan_main.o] Error 1
make[2]: *** [_module_/home/ccmuser/linuxy/peak-linux-driver-8.7.0/driver] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-2.6.26-2-686'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/ccmuser/linuxy/peak-linux-driver-8.7.0/driver'
make: *** [all] Error 2
Re: Driver compilation failure on Debian
Posted: Fri 22. Mar 2019, 10:07
by S.Grosjean
Hello,
This (very) old version of the driver doesn't handle all kinds of Linux distros and considers that the Linux kernel headers are stored in /usr/src/linux. According to what Makefile of 8.7.0 displays, please edit peak-linux-6.0/driver/Makefile and change:
Code: Select all
#****************************************************************************
# please modify only here if your kernel path is elsewhere located
#
KERNEL_LOCATION = /usr/src/linux
with:
Code: Select all
#****************************************************************************
# please modify only here if your kernel path is elsewhere located
#
KERNEL_LOCATION = /usr/src/linux-headers-2.6.26-2-686
Regards,
Re: Driver compilation failure on Debian
Posted: Mon 25. Mar 2019, 16:02
by corky
Thanks a lot Stephan, that complied no problem. The issue now (after a sudo /sbin/modprobe pcan) is that a cat proc/pcan does not see the pci card.
Code: Select all
*------------- PEAK-System CAN interfaces (http://www.peak-system.com) -------------
*------------- Release_20110113_n --------------
*---------------- [mod] [isa] [pci] [dng] [par] [usb] [pcc] -----------------
*--------------------- 0 interfaces @ major 249 found -----------------------
*n -type- ndev --base-- irq --btr- --read-- --write- --irqs-- -errors- status
Does not see the PCI card.
lspci -v shows:
Code: Select all
03:00:0 Network Controller: PEAK-System Technik GmbH Device 0003 (rev 02)
Subsystem: PEAK-System Technik GmbH Device 0002
Flags: fast devsel, IRQ 10
Memory at fd4e0000 (32 bit non-prefetchable) (size=64k)
Memory at fd4f0000 (32 bit non-prefetchable) (size=64k)
Capabilities: [50] Power Management version 0
Capabilities: [70] Message Signalled Interupts: Mask 64bit+ Queue=0/0
Enable-
Capabilities: [90] Express Endpoint, MSI 00
Capabilities: [100] Vendor Specific Information <?>
Does that look correct? Or should it say 'kernel driver in use: <type> ' after Capabilities?
Any ideas why i cannot see a device in cat /proc/pcan?
Re: Driver compilation failure on Debian
Posted: Mon 25. Mar 2019, 16:56
by S.Grosjean
Hello,
I think it's normal: once again, this very old version of the driver didn't handle this quite new PCI device. You'll have to modify the driver by your own for that:
Edit file "src/pcan_pci.c" and change:
into:
Save then exit the file. Rebuild then reinstall the driver:
Re: Driver compilation failure on Debian
Posted: Tue 2. Apr 2019, 16:31
by corky
Just wanted to say thanks for Stephane and Michael's help - indeed Stephane's suggestion got the driver in no problem.
I would much rather use a newer distribution, but am trying to recreate something very old, which unfortunately has old dependencies.
Cheers,
Corky