cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Anonymous
Not applicable
3,195 Views

compilation error for can4linux 4.2

I tried to compile the latest version of can4linux driver i.e. version 4.2 and I get errors!! The sources are compiled against kernel version 3.6

The cross-zedboard file is attached. Can someone help out to fix it?

 

root@PC:/home/naiad/tmp/can4linux_svn273/can4linux# make TARGET=ZEDBOARD
CURDIR = /home/naiad/tmp/can4linux_svn273/can4linux
CC = /opt/Xilinx/14.7/ISE_DS/EDK/gnu/arm/lin/bin/arm-xilinx-linux-gnueabi-gcc
test ! -d /home/naiad/tmp/linux-xlnx-xilinx-v14.4 || make -C /home/naiad/tmp/linux-xlnx-xilinx-v14.4 M=/home/naiad/tmp/can4linux_svn273/can4linux TARGET=ZEDBOARD modules
make[1]: Entering directory `/home/naiad/tmp/linux-xlnx-xilinx-v14.4'
CC [M] /home/naiad/tmp/can4linux_svn273/can4linux/core.o
CC [M] /home/naiad/tmp/can4linux_svn273/can4linux/open.o
CC [M] /home/naiad/tmp/can4linux_svn273/can4linux/read.o
CC [M] /home/naiad/tmp/can4linux_svn273/can4linux/write.o
CC [M] /home/naiad/tmp/can4linux_svn273/can4linux/ioctl.o
CC [M] /home/naiad/tmp/can4linux_svn273/can4linux/select.o
CC [M] /home/naiad/tmp/can4linux_svn273/can4linux/debug.o
CC [M] /home/naiad/tmp/can4linux_svn273/can4linux/util.o
CC [M] /home/naiad/tmp/can4linux_svn273/can4linux/sysctl.o
CC [M] /home/naiad/tmp/can4linux_svn273/can4linux/async.o
CC [M] /home/naiad/tmp/can4linux_svn273/can4linux/close.o
CC [M] /home/naiad/tmp/can4linux_svn273/can4linux/xcanpsfuncs.o
CC [M] /home/naiad/tmp/can4linux_svn273/can4linux/zedboard.o
/home/naiad/tmp/can4linux_svn273/can4linux/zedboard.c: In function 'xcan_probe':
/home/naiad/tmp/can4linux_svn273/can4linux/zedboard.c:65:5: error: 'struct platform_device' has no member named 'id_auto'
/home/naiad/tmp/can4linux_svn273/can4linux/zedboard.c:48:16: warning: unused variable 'dev' [-Wunused-variable]
/home/naiad/tmp/can4linux_svn273/can4linux/zedboard.c: At top level:
/home/naiad/tmp/can4linux_svn273/can4linux/zedboard.c:194:13: warning: 'print_device_tree_node' defined but not used [-Wunused-function]
make[2]: *** [/home/naiad/tmp/can4linux_svn273/can4linux/zedboard.o] Error 1
make[1]: *** [_module_/home/naiad/tmp/can4linux_svn273/can4linux] Error 2
make[1]: Leaving directory `/home/naiad/tmp/linux-xlnx-xilinx-v14.4'
make: *** [all] Error 2

0 Kudos
3 Replies
Highlighted
Scholar
Scholar
3,188 Views
Registered: ‎05-28-2013

You're building against an older linux version. It is possible to fix, but the simper path is to either upgrade your linux, or use a slightly older version of can4linux. For example, it builds fine against linux 3.9.
0 Kudos
Highlighted
Anonymous
Not applicable
3,178 Views

Thank you!! It worked with can4linux version 4.1 

0 Kudos
Highlighted
Scholar
Scholar
3,175 Views
Registered: ‎05-28-2013

Great!

If you are using extended frames (CAN 2.0B) then there is a bugfix you'll want to include: http://sourceforge.net/p/can4linux/code/273 otherwise you may find some CAN transfers mysteriously don't work.
0 Kudos