LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices

Reply
 
Search this Thread
Old 12-21-2010, 11:35 PM   #1
blink182
LQ Newbie
 
Registered: Oct 2010
Posts: 29

Rep: Reputation: 0
Errors when adding device drivers to uClinux


Hi . I am very new to linux and it is my first time to work on uClinux . My target is to add device drivers to the kernel of uClinux . Before that , I try to compile those source files in uClinux-dist/linux-2.6.x/ first . However , I have encountered errors during the compilation process . The following is the error message :

Code:
Script started on Wednesday, December 22, 2010 PM12:12:13 HKT
]0;root@steven-desktop: /home/steven/uClinux-dist/linux-2.6.xroot@steven-desktop:/home/steven/uClinux-dist/linux-2.6.x# make
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CHK     include/linux/compile.h
  VDSOSYM arch/x86/vdso/vdso32-int80-syms.lds
  VDSOSYM arch/x86/vdso/vdso32-sysenter-syms.lds
  VDSOSYM arch/x86/vdso/vdso32-syms.lds
  LD      arch/x86/vdso/built-in.o
echo "#define SDIOEMB_BUILD_DATE \"$(date +'%d %b %Y %H:%M:%S')\"" > drivers/wifi/sdioemb/sdio_version.h
echo "#define SDIOEMB_BUILDID $(cat drivers/wifi/sdioemb/.buildid)" >> drivers/wifi/sdioemb/sdio_version.h
if [ -d drivers/wifi/sdioemb/packaging ]; then \
		echo "#define SDIOEMB_BUILDID_EXTRA \"*\"" >> drivers/wifi/sdioemb/sdio_version.h ; \
	else \
		echo "#define SDIOEMB_BUILDID_EXTRA \"\"" >> drivers/wifi/sdioemb/sdio_version.h ; \
	fi
  CC [M]  drivers/wifi/sdioemb/sdio_core.o
  LD [M]  drivers/wifi/sdioemb/sdio.o
  LD [M]  drivers/wifi/sdioemb/sdio_uif.o
  LD [M]  drivers/wifi/sdioemb/slot_shc.o
  CC      drivers/wifi/unifi-linux/common/synergy_framework/linuxkernel/csr_extensions.o
  CC      drivers/wifi/unifi-linux/common/synergy_framework/linuxkernel/csr_get_time.o
  CC      drivers/wifi/unifi-linux/common/synergy_framework/linuxkernel/csr_pmalloc.o
  LD      drivers/wifi/unifi-linux/common/synergy_framework/linuxkernel/built-in.o
  CC      drivers/wifi/unifi-linux/lib_hip/card_sdio.o
  CC      drivers/wifi/unifi-linux/lib_hip/card_sdio_mem.o
  CC      drivers/wifi/unifi-linux/lib_hip/dump.o
  CC      drivers/wifi/unifi-linux/lib_hip/card_sdio_intr.o
  CC      drivers/wifi/unifi-linux/lib_hip/chiphelper.o
  CC      drivers/wifi/unifi-linux/lib_hip/ta_sampling.o
  CC      drivers/wifi/unifi-linux/lib_hip/xbv.o
  CC      drivers/wifi/unifi-linux/lib_hip/download.o
  CC      drivers/wifi/unifi-linux/lib_hip/signals.o
  CC      drivers/wifi/unifi-linux/lib_hip/unifi_signal_names.o
  CC      drivers/wifi/unifi-linux/lib_hip/packing.o
  CC      drivers/wifi/unifi-linux/lib_hip/udi.o
  CC      drivers/wifi/unifi-linux/lib_hip/send.o
  LD      drivers/wifi/unifi-linux/lib_hip/built-in.o
  CC [M]  drivers/wifi/unifi-linux/os_linux/driver/../../lib_hip/card_sdio.o
  CC [M]  drivers/wifi/unifi-linux/os_linux/driver/../../lib_hip/card_sdio_mem.o
  CC [M]  drivers/wifi/unifi-linux/os_linux/driver/../../lib_hip/card_sdio_intr.o
  CC [M]  drivers/wifi/unifi-linux/os_linux/driver/../../lib_hip/send.o
  CC [M]  drivers/wifi/unifi-linux/os_linux/driver/../../lib_hip/signals.o
  CC [M]  drivers/wifi/unifi-linux/os_linux/driver/../../lib_hip/ta_sampling.o
  CC [M]  drivers/wifi/unifi-linux/os_linux/driver/../../lib_hip/udi.o
  CC [M]  drivers/wifi/unifi-linux/os_linux/driver/../../lib_hip/unifi_signal_names.o
  CC [M]  drivers/wifi/unifi-linux/os_linux/driver/../../lib_hip/dump.o
  CC [M]  drivers/wifi/unifi-linux/os_linux/driver/../../lib_hip/download.o
  CC [M]  drivers/wifi/unifi-linux/os_linux/driver/../../lib_hip/xbv.o
  CC [M]  drivers/wifi/unifi-linux/os_linux/driver/../../lib_hip/chiphelper.o
  CC [M]  drivers/wifi/unifi-linux/os_linux/driver/../../lib_hip/packing.o
  CC [M]  drivers/wifi/unifi-linux/os_linux/driver/../../common/synergy_framework/linuxkernel/csr_extensions.o
  CC [M]  drivers/wifi/unifi-linux/os_linux/driver/../../common/synergy_framework/linuxkernel/csr_pmalloc.o
  CC [M]  drivers/wifi/unifi-linux/os_linux/driver/../../common/synergy_framework/linuxkernel/csr_get_time.o
  LD [M]  drivers/wifi/unifi-linux/os_linux/driver/unifi_sdio.o
  CC      drivers/wifi/unifi-linux/unifi_helper/common/ipc/linux/ipc_chardevice.o
drivers/wifi/unifi-linux/unifi_helper/common/ipc/linux/ipc_chardevice.c:23:19: error: stdio.h: No such file or directory
drivers/wifi/unifi-linux/unifi_helper/common/ipc/linux/ipc_chardevice.c:24:20: error: stdlib.h: No such file or directory
drivers/wifi/unifi-linux/unifi_helper/common/ipc/linux/ipc_chardevice.c:25:20: error: malloc.h: No such file or directory
drivers/wifi/unifi-linux/unifi_helper/common/ipc/linux/ipc_chardevice.c:26:19: error: errno.h: No such file or directory
drivers/wifi/unifi-linux/unifi_helper/common/ipc/linux/ipc_chardevice.c:27:20: error: string.h: No such file or directory
drivers/wifi/unifi-linux/unifi_helper/common/ipc/linux/ipc_chardevice.c:28:19: error: fcntl.h: No such file or directory
drivers/wifi/unifi-linux/unifi_helper/common/ipc/linux/ipc_chardevice.c:29:24: error: sys/socket.h: No such file or directory
drivers/wifi/unifi-linux/unifi_helper/common/ipc/linux/ipc_chardevice.c:30:23: error: sys/ioctl.h: No such file or directory
drivers/wifi/unifi-linux/unifi_helper/common/ipc/linux/ipc_chardevice.c:32:24: error: sys/select.h: No such file or directory
drivers/wifi/unifi-linux/unifi_helper/common/ipc/linux/ipc_chardevice.c:33:22: error: sys/time.h: No such file or directory
drivers/wifi/unifi-linux/unifi_helper/common/ipc/linux/ipc_chardevice.c:34:23: error: sys/types.h: No such file or directory
drivers/wifi/unifi-linux/unifi_helper/common/ipc/linux/ipc_chardevice.c:35:20: error: unistd.h: No such file or directory
make[3]: *** [drivers/wifi/unifi-linux/unifi_helper/common/ipc/linux/ipc_chardevice.o] Error 1
make[2]: *** [drivers/wifi/unifi-linux/unifi_helper/common/ipc/linux] Error 2
make[1]: *** [drivers/wifi] Error 2
make: *** [drivers] Error 2
]0;root@steven-desktop: /home/steven/uClinux-dist/linux-2.6.xroot@steven-desktop:/home/steven/uClinux-dist/linux-2.6.x# exit
exit

Script done on Wednesday, December 22, 2010 PM12:24:08 HKT
Could somebody tell me how to solve those errors ? Thanks !
 
Old 12-22-2010, 09:06 PM   #2
blink182
LQ Newbie
 
Registered: Oct 2010
Posts: 29

Original Poster
Rep: Reputation: 0
Error is solved by setting additional include path to gcc compiler .

PHP Code:
C_INCLUDE_PATH=/usr/local/arm-elf/include/ 
export C_INCLUDE_PATH 
However , new error pops up . The error said :

Code:
In file included from /usr/local/arm-elf/include/bits/socket.h:31,
                 from /usr/local/arm-elf/include/sys/socket.h:35,
                 from drivers/wifi/unifi-linux/unifi_helper/common/ipc/linux/ipc_chardevice.c:29:
/usr/local/arm-elf/include/limits.h:124:26: error: no include path in which to search for limits.h
In file included from include/asm/posix_types.h:3,
                 from include/linux/posix_types.h:47,
                 from include/linux/types.h:11,
                 from /home/steven/uClinux-dist/linux-2.6.x/drivers/wifi/oska/linux/types.h:12,
                 from /home/steven/uClinux-dist/linux-2.6.x/drivers/wifi/oska/include/oska/types.h:29,
                 from /home/steven/uClinux-dist/linux-2.6.x/drivers/wifi/unifi-linux/common/synergy_framework/linuxkernel/csr_types.h:11,
                 from drivers/wifi/unifi-linux/unifi_helper/common/ipc/linux/ipc_chardevice.c:37:
include/asm/posix_types_32.h:43: error: conflicting types for ‘__kernel_fsid_t’
/usr/local/arm-elf/include/bits/kernel_types.h:41: note: previous declaration of ‘__kernel_fsid_t’ was here
In file included from include/asm/bitops.h:316,
                 from include/linux/bitops.h:17,
                 from include/asm/cpufeature.h:118,
                 from include/asm/processor.h:20,
                 from include/linux/prefetch.h:14,
                 from include/linux/list.h:8,
                 from include/linux/module.h:9,
                 from /home/steven/uClinux-dist/linux-2.6.x/drivers/wifi/unifi-linux/common/synergy_framework/linuxkernel/csr_util.h:16,
                 from /home/steven/uClinux-dist/linux-2.6.x/drivers/wifi/unifi-linux/common/synergy_framework/linuxkernel/csr_pmalloc.h:13,
                 from drivers/wifi/unifi-linux/unifi_helper/common/ipc/linux/ipc_chardevice.c:38:
include/asm/bitops_32.h:117: error: static declaration of ‘ffs’ follows non-static declaration
/usr/local/arm-elf/include/string.h:305: note: previous declaration of ‘ffs’ was here
it seems the gcc has included multiple paths which contain header files with same name that caused the conflicts . How do i remove the redundant path so that the error could be solved ? Thanks in advance !

Last edited by blink182; 12-22-2010 at 11:16 PM.
 
Old 12-24-2010, 12:47 AM   #3
cnxsoft
Member
 
Registered: Nov 2010
Location: Thailand
Distribution: Fedora 12, Ubuntu 10.10
Posts: 166

Rep: Reputation: 29
Usually the cross-compiler should know the header files location.

Which version of uCLinux are you using and which target are you compiling it for ?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
linux device drivers : how can i unregister a character device ? zampa Linux - General 5 06-21-2012 06:34 AM
[SOLVED] Question in adding device drivers for kernel compilation of uClinux blink182 Linux - Embedded & Single-board computer 4 11-07-2010 10:42 PM
uclinux custom device driver not loading, possibly multiple problems godzilla Linux - Kernel 12 09-10-2007 07:39 PM
Adding a device Azhrarn Linux - Hardware 1 02-09-2006 12:27 PM
how to install dynamic device driver in uClinux chandansingh Programming 1 04-26-2005 04:02 PM


All times are GMT -5. The time now is 03:34 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration