Page 1 of 1

Redhat 2.6.9.34 - peak driver 8.9.0 make

Posted: Thu 12. Sep 2019, 08:53
by w7h7jm1
Can you please advise. After extracting Peak driver 8.9.0 onto an old Redhat 2.6.9.34 system when I run the make prior to install it fails due to missing headers hrtimer.h and ktime.h. If I copy these headers from a later 64 bit version of Linux then I get a syntax error in ktime.h, see below.

Is there a way to install NETDEV_SUPPORT socket driver on Redhat 2.6.9.34?

Thanks

Code: Select all

[root@in-ftd-01-ios-01a peak-linux-driver-8.9.0]# make -C driver NET=NETDEV_SUPPORT
make: Entering directory `/root/peak-linux-driver-8.9.0/driver'
***
*** Making pcan driver in netdev mode
***
*** Host machine kernel version=2.6.9-34.EL.HAWK0003smp
*** Driver kernel version=2.6.9-34.EL.HAWK0003smp (2.6.9)
*** Path to kernel sources=/lib/modules/2.6.9-34.EL.HAWK0003smp/build
*** use KBUILD=yes
*** gcc version=3.4.3
***
make -C /lib/modules/2.6.9-34.EL.HAWK0003smp/build  EXTRA_CFLAGS="-DLINUX_CAN_RESTART_TIMER -I/root/peak-linux-driver-8.9.0/driver -DNO_DEBUG -DMODVERSIONS -DPARPORT_SUBSYSTEM -DUSB_SUPPORT -DPCI_SUPPORT -DPCIEC_SUPPORT -DISA_SUPPORT -DDONGLE_SUPPORT -DPCCARD_SUPPORT -DNETDEV_SUPPORT -DNO_RT " V=0 modules SUBDIRS=/root/peak-linux-driver-8.9.0/driver
make[1]: Entering directory `/usr/src/kernels/2.6.9-34.EL.HAWK0003-smp-i686'
  CC [M]  /root/peak-linux-driver-8.9.0/driver/src/pcan_main.o
In file included from include/linux/hrtimer.h:19,
                 from /root/peak-linux-driver-8.9.0/driver/src/pcan_common.h:166,
                 from /root/peak-linux-driver-8.9.0/driver/src/pcan_main.c:46:
include/linux/ktime.h:320: error: syntax error before "ktime_after"
include/linux/ktime.h:321: warning: return type defaults to `int'
include/linux/ktime.h:332: error: syntax error before "ktime_before"
include/linux/ktime.h:333: warning: return type defaults to `int'
include/linux/ktime.h: In function `ktime_to_ms':
include/linux/ktime.h:346: error: `MSEC_PER_SEC' undeclared (first use in this function)

Re: Redhat 2.6.9.34 - peak driver 8.9.0 make

Posted: Thu 12. Sep 2019, 11:15
by S.Grosjean
Hi,

Well socket-CAN has been added to Kernel 2.6.25 so I'm afraid that it won't be possible to build nor run any driver of that kind on any older Kernel. Moreover, these first error messages show that you're going to face to lots of other compilation errors, especially with such an old gcc version too! What kind of PEAK System hardware do you want to use, please?

Re: Redhat 2.6.9.34 - peak driver 8.9.0 make

Posted: Thu 12. Sep 2019, 12:23
by w7h7jm1
Hi Stéphane,
Thanks for the prompt response. I am using a Peak USB to CAN interface unit and it is working fine on my CENTOS 7 system. Since you state that the CAN socket support was only added at 2.6.25 then I will have to update the legacy machines when I add CAN bus to the system.
Thanks,
John