LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   can4linux compilation and installation (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/can4linux-compilation-and-installation-692471/)

619pacx 12-23-2008 07:39 AM

can4linux compilation and installation
 
I am working in Arcom Viper PXA255 PC104 hardware loaded with embedded linux. I have to Load CAN Driver for it, the CAN device is AIM104-CAN, utilizing SJA1000 Standalone CAN Controller. When i searched Arcom site, i got to know that can4linux is suitable for it. So i need to install the can driver.I downloaded the driver "can4linux-3.5.3" from site

http://www.port.de/engl/download/download.html

I need help in compiling the code using Makefile, also in installation. Could u please tell me what should be the TARGET specified while executing make command? i have tried lot and i got the errors as listed below.

so should i proceed further in the same or does any one know what driver can be used for my hardware. please give the compiling steps also installing steps with commands. I am new to linux.
Please help me
Thanks in advance

errors i got:


[root@elgardesa can]# make -f Makefile-k2.4
Kernel: 2.6.15-1.2054_FC5smp; Test=Nein
--- Compiling core.c for ATCANMINI_PELICAN on LINUXOS ...
In file included from /usr/include/linux/init.h:4,
from core.c:231:
/usr/include/linux/config.h:5:2: error: #error Incorrectly using glibc headers for a kernel module
In file included from core.c:235:
defs.h:64:25: error: linux/slab.h: No such file or directory
In file included from defs.h:73,
from core.c:235:
/usr/include/asm/io.h:4:2: warning: #warning <asm/io.h> is deprecated, use <sys/io.h> instead
In file included from defs.h:77,
from core.c:235:
/usr/include/asm/dma.h:14:25: error: linux/delay.h: No such file or directory
In file included from defs.h:77,
from core.c:235:
/usr/include/asm/dma.h:138: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘dma_spin_lock’
/usr/include/asm/dma.h: In function ‘claim_dma_lock’:
/usr/include/asm/dma.h:143: error: ‘dma_spin_lock’ undeclared (first use in this function)
/usr/include/asm/dma.h:143: error: (Each undeclared identifier is reported only once
/usr/include/asm/dma.h:143: error: for each function it appears in.)
/usr/include/asm/dma.h: In function ‘release_dma_lock’:
/usr/include/asm/dma.h:149: error: ‘dma_spin_lock’ undeclared (first use in this function)
/usr/include/asm/dma.h:298:2: warning: #warning Using kernel headers in userspace!
In file included from core.c:235:
defs.h:79:22: error: linux/mm.h: No such file or directory
In file included from /usr/include/linux/signal.h:4,
from defs.h:80,
from core.c:235:
/usr/include/asm/signal.h: At top level:
/usr/include/asm/signal.h:107: error: expected specifier-qualifier-list before ‘sigset_t’
/usr/include/asm/signal.h:119: error: expected specifier-qualifier-list before ‘size_t’
In file included from /usr/include/linux/signal.h:5,
from defs.h:80,
from core.c:235:
/usr/include/asm/siginfo.h:26: error: expected specifier-qualifier-list before ‘pid_t’
/usr/include/asm/siginfo.h:38: error: expected specifier-qualifier-list before ‘pid_t’
/usr/include/asm/siginfo.h:45: error: expected specifier-qualifier-list before ‘pid_t’
defs.h:81:25: error: linux/timer.h: No such file or directory
defs.h:83:25: error: asm/uaccess.h: No such file or directory
In file included from core.c:235:
defs.h:114: warning: ‘struct inode’ declared inside parameter list
defs.h:114: warning: its scope is only this definition or declaration, which is probably not what you want
defs.h: In function ‘iminor’:
defs.h:116: warning: implicit declaration of function ‘MINOR’
defs.h:116: error: dereferencing pointer to incomplete type
In file included from core.c:235:
defs.h: At top level:
defs.h:271: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘can_read’
defs.h:272: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘can_write’
defs.h:273: warning: ‘struct poll_table_struct’ declared inside parameter list
defs.h:273: warning: ‘struct file’ declared inside parameter list
defs.h:274: warning: ‘struct file’ declared inside parameter list
defs.h:274: warning: ‘struct inode’ declared inside parameter list
defs.h:275: warning: ‘struct file’ declared inside parameter list
defs.h:275: warning: ‘struct inode’ declared inside parameter list
defs.h:276: warning: ‘struct file’ declared inside parameter list
defs.h:276: warning: ‘struct inode’ declared inside parameter list
defs.h:277: warning: ‘struct file’ declared inside parameter list
In file included from defs.h:300,
from core.c:235:
sja1000.h:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘CanTiming’
sja1000.h:142: error: expected specifier-qualifier-list before ‘u8’
sja1000.h:149: error: expected specifier-qualifier-list before ‘u8’
sja1000.h:156: error: expected specifier-qualifier-list before ‘u8’
In file included from defs.h:425,
from core.c:235:
can4linux.h:79: error: field ‘timestamp’ has incomplete type
In file included from core.c:235:
defs.h:473: error: expected specifier-qualifier-list before ‘wait_queue_head_t’
defs.h:502: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Can_isopen’
defs.h:510: warning: ‘struct pt_regs’ declared inside parameter list
defs.h:514: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘CanWait’
defs.h:515: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘CanOutWait’
defs.h:518: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘write_splock’
In file included from defs.h:534,
from core.c:235:
/usr/include/linux/sysctl.h:37: error: expected specifier-qualifier-list before ‘size_t’
In file included from core.c:235:
defs.h:536: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘can_sysctl_table’
defs.h:611: warning: ‘struct pt_regs’ declared inside parameter list
core.c:267: error: variable ‘can_fops’ has initializer but incomplete type
core.c:268: error: unknown field ‘owner’ specified in initializer
core.c:268: error: ‘__this_module’ undeclared here (not in a function)
core.c:268: warning: excess elements in struct initializer
core.c:268: warning: (near initialization for ‘can_fops’)
core.c:269: error: unknown field ‘open’ specified in initializer
core.c:269: warning: excess elements in struct initializer
core.c:269: warning: (near initialization for ‘can_fops’)
core.c:270: error: unknown field ‘release’ specified in initializer
core.c:270: warning: excess elements in struct initializer
core.c:270: warning: (near initialization for ‘can_fops’)
core.c:271: error: unknown field ‘read’ specified in initializer
core.c:271: error: ‘can_read’ undeclared here (not in a function)
core.c:271: warning: excess elements in struct initializer
core.c:271: warning: (near initialization for ‘can_fops’)
core.c:272: error: unknown field ‘write’ specified in initializer
core.c:272: error: ‘can_write’ undeclared here (not in a function)
core.c:272: warning: excess elements in struct initializer
core.c:272: warning: (near initialization for ‘can_fops’)
core.c:273: error: unknown field ‘poll’ specified in initializer
core.c:273: warning: excess elements in struct initializer
core.c:273: warning: (near initialization for ‘can_fops’)
core.c:274: error: unknown field ‘ioctl’ specified in initializer
core.c:274: warning: excess elements in struct initializer
core.c:274: warning: (near initialization for ‘can_fops’)
core.c:275: error: unknown field ‘fasync’ specified in initializer
core.c:275: warning: excess elements in struct initializer
core.c:275: warning: (near initialization for ‘can_fops’)
core.c: In function ‘init_module’:
core.c:300: warning: implicit declaration of function ‘register_chrdev’
core.c:301: warning: implicit declaration of function ‘printk’
core.c:301: error: ‘KERN_ERR’ undeclared (first use in this function)
core.c:301: error: expected ‘)’ before string constant
core.c:305: warning: implicit declaration of function ‘class_create’
core.c:305: warning: assignment makes pointer from integer without a cast
core.c:306: warning: implicit declaration of function ‘IS_ERR’
core.c:308: warning: implicit declaration of function ‘PTR_ERR’
core.c:320: warning: implicit declaration of function ‘device_create’
core.c:320: warning: implicit declaration of function ‘MKDEV’
core.c:324: error: ‘KERN_INFO’ undeclared (first use in this function)
core.c:324: error: expected ‘)’ before string constant
core.c:335: error: expected ‘)’ before string constant
core.c:338: error: expected ‘)’ before string constant
core.c:339: error: expected ‘)’ before string constant
core.c:346: warning: implicit declaration of function ‘atomic_set’
core.c:346: error: ‘Can_isopen’ undeclared (first use in this function)
core.c:360: warning: implicit declaration of function ‘spin_lock_init’
core.c:360: error: ‘write_splock’ undeclared (first use in this function)
core.c:480: warning: implicit declaration of function ‘class_destroy’
core.c:482: warning: implicit declaration of function ‘unregister_chrdev’
core.c:479: warning: label ‘out_class’ defined but not used
core.c:291: warning: unused variable ‘minor’
core.c: In function ‘cleanup_module’:
core.c:503: warning: implicit declaration of function ‘atomic_read’
core.c:504: error: ‘KERN_WARNING’ undeclared (first use in this function)
core.c:504: error: expected ‘)’ before string constant
core.c:536: error: ‘KERN_INFO’ undeclared (first use in this function)
core.c:536: error: expected ‘)’ before string constant
core.c:540: warning: implicit declaration of function ‘device_destroy’
core.c:498: warning: unused variable ‘minor’
make: *** [core.o] Error 1
[root@elgardesa can]#


All times are GMT -5. The time now is 09:52 AM.