Driver compilation failure on Debian
Driver compilation failure on Debian
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
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
Hi,
which kernel version do you use? Please post output of uname -a.
best regards
Michael
which kernel version do you use? Please post output of uname -a.
best regards
Michael
Re: Driver compilation failure on Debian
Hi Michael,
Thanks for the response.
uname -a gives:
Its 2.6.26.2-686 GNU/Linux
Thanks for the response.
uname -a gives:
Its 2.6.26.2-686 GNU/Linux
Re: Driver compilation failure on Debian
Here are the results of running 8.7 driver install
make clean
make
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'
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
- S.Grosjean
- Software Development
- Posts: 357
- Joined: Wed 4. Jul 2012, 17:02
Re: Driver compilation failure on Debian
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:
with:
Regards,
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
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
— Stéphane
Re: Driver compilation failure on Debian
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.
Does not see the PCI card.
lspci -v shows:
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?
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
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 <?>
Any ideas why i cannot see a device in cat /proc/pcan?
- S.Grosjean
- Software Development
- Posts: 357
- Joined: Wed 4. Jul 2012, 17:02
Re: Driver compilation failure on Debian
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:
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:
Code: Select all
$ cd peak-linux-driver-6.0/driver
Code: Select all
#define PCAN_PCI_DEVICE_ID 0x0001
Code: Select all
#define PCAN_PCI_DEVICE_ID 0x0003
Code: Select all
$ make
$ sudo make install
— Stéphane
Re: Driver compilation failure on Debian
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
I would much rather use a newer distribution, but am trying to recreate something very old, which unfortunately has old dependencies.
Cheers,
Corky