PCAN on cubietruck driver installation issues

This forum covers PCAN-Linux and Linux development issues concerning our products
compauer
Posts: 11
Joined: Tue 4. Mar 2014, 11:05

PCAN on cubietruck driver installation issues

Post by compauer » Tue 4. Mar 2014, 11:18

Hi,

I try to install the driver for PCAN on a Cubietruck Debian 7.1 wheezy. My Kernel Version is 3.4.61+, and I installed the Kernel Linux Header for 3.2.0-4-all because I didn't find a version for 3.4.61 in my repo. Don't know if it is important for the next steps. At the beginning on the command 'make clean' I get an Error like this:

Code: Select all

make[1]: Entering directory `/root/Desktop/peak-linux-driver-7.10/driver'
Makefile:102: *** "Can't find /include/linux/version.h".  Stop.
make[1]: Leaving directory `/root/Desktop/peak-linux-driver-7.10/driver'
make[1]: Entering directory `/root/Desktop/peak-linux-driver-7.10/lib'
rm -f src/*~ src/*.o *~ *.so.*
make[1]: Leaving directory `/root/Desktop/peak-linux-driver-7.10/lib'
make[1]: Entering directory `/root/Desktop/peak-linux-driver-7.10/test'
rm -f src/*~ src/*.o *~ receivetest transmitest bitratetest filtertest pcan-settings
make[1]: Leaving directory `/root/Desktop/peak-linux-driver-7.10/test'
So what can I do know?

Edit: Installed the linux-headers-3.4.61, still same error (finding it on /usr/src/)
Last edited by compauer on Tue 4. Mar 2014, 11:42, edited 1 time in total.

M.Maidhof
Support
Support
Posts: 1753
Joined: Wed 22. Sep 2010, 14:00

Re: PCAN on cubietruck driver installation issues

Post by M.Maidhof » Tue 4. Mar 2014, 11:39

Hi,

to build our driver, you need the kernel headers of the installed kernel version, using a different kernel header will not work!

regards

Michael

compauer
Posts: 11
Joined: Tue 4. Mar 2014, 11:05

Re: PCAN on cubietruck driver installation issues

Post by compauer » Tue 4. Mar 2014, 12:25

M.Maidhof wrote:Hi,

to build our driver, you need the kernel headers of the installed kernel version, using a different kernel header will not work!

regards

Michael
I already installed the kernel headers (a folder 'linux-headers-3.4.6.1-030461' appeared in /usr/src/). How can I make sure, that the right kernel headers are used?

Edit:
An Error is coming when I'm typing this command:
dpkg -i linux-headers* linux-image*

Code: Select all

(Reading database ... 92613 files and directories currently installed.)
Preparing to replace linux-headers-3.4.61-030461 3.4.61-030461.201309080234 (using linux-headers-3.4.61-030461_3.4.61-030461.201309080234_all.deb) ...
Unpacking replacement linux-headers-3.4.61-030461 ...
dpkg: error processing linux-headers-3.4.61-030461-generic_3.4.61-030461.201309080234_i386 (--install):
 package architecture (i386) does not match system (armhf)
dpkg: error processing linux-headers-3.4.61-030461-generic_3.4.61-030461.201309080234_i386.deb (--install):
 package architecture (i386) does not match system (armhf)
dpkg: error processing linux-image-3.4.61-030461-generic_3.4.61-030461.201309080234_i386.deb (--install):
 package architecture (i386) does not match system (armhf)
Setting up linux-headers-3.4.61-030461 (3.4.61-030461.201309080234) ...
Errors were encountered while processing:
 linux-headers-3.4.61-030461-generic_3.4.61-030461.201309080234_i386
 linux-headers-3.4.61-030461-generic_3.4.61-030461.201309080234_i386.deb
 linux-image-3.4.61-030461-generic_3.4.61-030461.201309080234_i386.deb
Edit2:
Is it right that i used a i386 package instead of an ARM package? If yes, how can I find/install the right headers for ARM?

M.Maidhof
Support
Support
Posts: 1753
Joined: Wed 22. Sep 2010, 14:00

Re: PCAN on cubietruck driver installation issues

Post by M.Maidhof » Tue 4. Mar 2014, 15:02

Hi,

this question is not related to our PEAK Linux driver, please contact the support of your Linux distribution. We don´t know that system

regards

Michael

compauer
Posts: 11
Joined: Tue 4. Mar 2014, 11:05

Re: PCAN on cubietruck driver installation issues

Post by compauer » Tue 11. Mar 2014, 13:55

M.Maidhof wrote:Hi,

this question is not related to our PEAK Linux driver, please contact the support of your Linux distribution. We don´t know that system

regards

Michael
So I installed the right kernel headers. It also found the version.h
Now I get a new Error by typing "make clean":

Code: Select all

cpp: error: /include/linux/utsrelease.h: No such file or directory
cpp: warning: '-x c' after last input file has no effect
cpp: fatalr error: no input files
compilation terminated.
...
That utsrelease.h is not in the directory

M.Maidhof
Support
Support
Posts: 1753
Joined: Wed 22. Sep 2010, 14:00

Re: PCAN on cubietruck driver installation issues

Post by M.Maidhof » Tue 11. Mar 2014, 16:15

Hi,

please search for that file in your kernel headers. With the given information it is impossible to help you with your problem.

regards

Michael

compauer
Posts: 11
Joined: Tue 4. Mar 2014, 11:05

Re: PCAN on cubietruck driver installation issues

Post by compauer » Wed 12. Mar 2014, 15:01

M.Maidhof wrote:Hi,

please search for that file in your kernel headers. With the given information it is impossible to help you with your problem.

regards

Michael
So finally I found the needed h-files from the include/generated folder and copied it to my linux-headers. Now I wanted to do the command "make" in the peak-folder direction. So a new Error appeared:

Code: Select all

make[1]: Entering directory `/home/linaro/Desktop/peak-linux-driver-7.10/driver'
make[1]: *** No rule to make target `depend'.  Stop.
make[1]: Leaving directory `/home/linaro/Desktop/peak-linux-driver-7.10/driver'
make[1]: Entering directory `/home/linaro/Desktop/peak-linux-driver-7.10/driver'
***
*** Host machine kernel version=3.4.79
*** Driver kernel version=3.4.79+
*** Path to kernel sources=
*** use KBUILD=yes
***
make -C  SUBDIRS=/home/linaro/Desktop/peak-linux-driver-7.10/driver        EXTRA_CFLAGS="-I/home/linaro/Desktop/peak-linux-driver-7.10/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
make: Entering an unknown directory
make: *** SUBDIRS=/home/linaro/Desktop/peak-linux-driver-7.10/driver: No such file or directory.  Stop.
make: Leaving an unknown directory
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/linaro/Desktop/peak-linux-driver-7.10/driver'
make[1]: Entering directory `/home/linaro/Desktop/peak-linux-driver-7.10/lib'
# ln -sf ../driver/pcan.h pcan.h
cc src/libpcan.c -fPIC -shared -O2 -Wall -Wl,-soname,libpcan.so.0 -lc -I. -I../driver -DNO_RT -o libpcan.so.0.6
ln -sf libpcan.so.0.6 libpcan.so
make[1]: Leaving directory `/home/linaro/Desktop/peak-linux-driver-7.10/lib'
make[1]: Entering directory `/home/linaro/Desktop/peak-linux-driver-7.10/test'
cc src/receivetest.c src/common.c -I. -I../lib -I../driver -L../lib -L/lib -L/usr/lib -L/usr/local/lib -o receivetest   -lpcan -DNO_RT
cc src/transmitest.cpp src/common.c src/parser.cpp -I. -I../lib -I../driver -L../lib -L/lib -L/usr/lib -L/usr/local/lib -o transmitest   -lpcan -lstdc++ -DNO_RT
cc src/bitratetest.c src/common.c -I. -I../lib -I../driver -L../lib -L/lib -L/usr/lib -L/usr/local/lib -o bitratetest   -lpcan -DNO_RT
cc src/filtertest.cpp src/common.c -I. -I../lib -I../driver -L../lib -L/lib -L/usr/lib -L/usr/local/lib -o filtertest   -lpcan -lstdc++ -DNO_RT
cc src/pcan-settings.c -I. -I../lib -I../driver -L../lib -L/lib -L/usr/lib -L/usr/local/lib -o pcan-settings   -lpopt -g
src/pcan-settings.c:49:18: fatal error: popt.h: No such file or directory
compilation terminated.
make[1]: *** [pcan-settings] Error 1
make[1]: Leaving directory `/home/linaro/Desktop/peak-linux-driver-7.10/test'
What could be the problem of this errors? :?

M.Maidhof
Support
Support
Posts: 1753
Joined: Wed 22. Sep 2010, 14:00

Re: PCAN on cubietruck driver installation issues

Post by M.Maidhof » Wed 12. Mar 2014, 16:43

in which directory did you call the make? Please use the driver directory of our linux driver. Which parameter did you use in your make call, please see info in the Raspberry Pi thread.

compauer
Posts: 11
Joined: Tue 4. Mar 2014, 11:05

Re: PCAN on cubietruck driver installation issues

Post by compauer » Thu 13. Mar 2014, 08:03

M.Maidhof wrote:in which directory did you call the make? Please use the driver directory of our linux driver. Which parameter did you use in your make call, please see info in the Raspberry Pi thread.
I called make in the peak-linux-driver-7.10 folder. I also used the peak-linux-driver-7.10/driver directory. Just wrote "make", but also tried "make NET=NO PCI=NO PAR=NO ISA=NO PCC=NO DNG=NO DBG=DEBUG"
Tried on version 7.10, 7.8 & 7.7

If I call "make" in the peak-linux-driver-7.10/driver directory I´m getting this error:

Code: Select all

***
*** Host machine kernel version=3.4.79
*** Driver kernel version=3.4.79+
*** Path to kernel sources=
*** use KBUILD=yes
***
make -C  SUBDIRS=/home/linaro/Desktop/peak-linux-driver-7.10/driver        EXTRA_CFLAGS="-I/home/linaro/Desktop/peak-linux-driver-7.10/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
make: *** SUBDIRS=/home/linaro/Desktop/peak-linux-driver-7.10/driver: No such file or directory.  Stop.
make: *** [all] Error 2

compauer
Posts: 11
Joined: Tue 4. Mar 2014, 11:05

Re: PCAN on cubietruck driver installation issues

Post by compauer » Fri 14. Mar 2014, 08:03

Do you have any advice Michael? Really need that working :-/

Post Reply