Problem while compiling driver for ARM9 EP9307A.
Dear All,
I am facing problems while compiling driver for ARM9 EP9307A.Its a very small "hello kernel" related C program.I am posting the driver logs and Makefile for you:
[root@localhost Driver]# /usr/local/arm/4.1.1-920t/bin/arm-linux-gcc -02 -D__KERNEL__ -DMODULE -I /root/linux-crater/arm/arm-linux/include -c test.c
arm-linux-gcc: unrecognized option '-02'
In file included from test.c:1:
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/module.h:9:28: error: linux/spinlock.h: No such file or directory
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/module.h:10:24: error: linux/list.h: No such file or directory
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/module.h:12:28: error: linux/compiler.h: No such file or directory
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/module.h:13:25: error: linux/cache.h: No such file or directory
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/module.h:14:24: error: linux/kmod.h: No such file or directory
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/module.h:16:29: error: linux/stringify.h: No such file or directory
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/module.h:17:27: error: linux/kobject.h: No such file or directory
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/module.h:18:31: error: linux/moduleparam.h: No such file or directory
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/module.h:19:23: error: asm/local.h: No such file or directory
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/module.h:21:24: error: asm/module.h: No such file or directory
In file included from test.c:1:
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/module.h:48: error: field 'attr' has incomplete type
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/module.h:59: error: field 'kobj' has incomplete type
In file included from test.c:2:
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/kernel.h:11:27: error: linux/linkage.h: No such file or directory
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/kernel.h:15:26: error: linux/bitops.h: No such file or directory
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/kernel.h:16:24: error: linux/log2.h: No such file or directory
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/kernel.h:18:21: error: asm/bug.h: No such file or directory
In file included from test.c:2:
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/kernel.h:102: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/kernel.h:107: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'NORET_TYPE'
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/kernel.h:109: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/kernel.h:127: error: expected ')' before 'gfp'
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/kernel.h:164: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'printk_timed_ratelimit'
test.c:8: error: expected ')' before string constant
And the Makefile:
KERNELDIR=/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4
#include $(KERNELDIR)/.config
CC = /usr/local/arm/4.1.1-920t/bin/arm-linux-gcc
LD = /usr/local/arm/4.1.1-920t/bin/arm-linux-ld
CFLAGS = -D__KERNEL__ -DMODULE -I$(KERNELDIR)/include \
-I$(KERNELDIR)/arch/arm \
-O -Wall
ifdef CONFIG_SMP
CFLAGS += -D__SMP__ -DSMP
endif
test.o: test.c
Please support me sorting this error.
Regards,
Ravi
|