nicesteven 发表于 2010-12-22 15:54:15

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 and I would like to test it on skyeye before purchasing a development board . I tried to compile those source files in uClinux-dist/linux-2.6.x/ first . However , I have encountered errors during the compilation process . Could somebody help me ? Thanks alot !

nicesteven 发表于 2010-12-22 15:55:04

ERROR MESSAGE :

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 drivers/wifi/sdioemb/sdio_core.o
LD drivers/wifi/sdioemb/sdio.o
LD drivers/wifi/sdioemb/sdio_uif.o
LD 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 drivers/wifi/unifi-linux/os_linux/driver/../../lib_hip/card_sdio.o
CC drivers/wifi/unifi-linux/os_linux/driver/../../lib_hip/card_sdio_mem.o
CC drivers/wifi/unifi-linux/os_linux/driver/../../lib_hip/card_sdio_intr.o
CC drivers/wifi/unifi-linux/os_linux/driver/../../lib_hip/send.o
CC drivers/wifi/unifi-linux/os_linux/driver/../../lib_hip/signals.o
CC drivers/wifi/unifi-linux/os_linux/driver/../../lib_hip/ta_sampling.o
CC drivers/wifi/unifi-linux/os_linux/driver/../../lib_hip/udi.o
CC drivers/wifi/unifi-linux/os_linux/driver/../../lib_hip/unifi_signal_names.o
CC drivers/wifi/unifi-linux/os_linux/driver/../../lib_hip/dump.o
CC drivers/wifi/unifi-linux/os_linux/driver/../../lib_hip/download.o
CC drivers/wifi/unifi-linux/os_linux/driver/../../lib_hip/xbv.o
CC drivers/wifi/unifi-linux/os_linux/driver/../../lib_hip/chiphelper.o
CC drivers/wifi/unifi-linux/os_linux/driver/../../lib_hip/packing.o
CC drivers/wifi/unifi-linux/os_linux/driver/../../common/synergy_framework/linuxkernel/csr_extensions.o
CC drivers/wifi/unifi-linux/os_linux/driver/../../common/synergy_framework/linuxkernel/csr_pmalloc.o
CC drivers/wifi/unifi-linux/os_linux/driver/../../common/synergy_framework/linuxkernel/csr_get_time.o
LD 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: *** Error 1
make: *** Error 2
make: *** Error 2
make: *** 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

nicesteven 发表于 2010-12-23 10:09:24

Error is solved by setting additional include path to gcc compiler .

in command shell :
$ C_INCLUDE_PATH=/usr/local/arm-elf/include/
$ export C_INCLUDE_PATH

However , new error pops up . The error said :

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 !

[ 本帖最后由 nicesteven 于 2010-12-23 12:22 编辑 ]
页: [1]
查看完整版本: Errors when adding device drivers to uClinux