Hi ml
Any suggestions?
Yes, ignore my last post, it was incorrect.
The original Makefile looks like this:
all: clean rtc_ds1339.o
rtc_ds1339.o: rtc_ds1339.c
arm-9dtmi-linux-gnu-gcc -O5 -ffast-math -fexpensive-optimizations -Wall -DLINUX -D__KERNEL__ -DMODULE -I. -c rtc_ds1339.c
clean:
@echo 'Removing all objects !'
-rm -f *.o
but should probably look more like this:
all: clean rtc_ds1339.o
rtc_ds1339.o: rtc_ds1339.c
i686-pc-linux-gnu-gcc -O5 -ffast-math -fexpensive-optimizations -Wall -DLINUX -D__KERNEL__ -DMODULE -I. -c rtc_ds1339.c
clean:
@echo 'Removing all objects !'
-rm -f *.o
Unfortunately the result is a lot of errors. The files not found cause many more errors and warnings.
i686-pc-linux-gnu-gcc -O5 -ffast-math -fexpensive-optimizations -Wall -DLINUX -D__KERNEL__ -DMODULE -I. -c rtc_ds1339.c
rtc_ds1339.c:54:26: error: linux/config.h: No such file or directory
rtc_ds1339.c:55:26: error: linux/module.h: No such file or directory
rtc_ds1339.c:59:30: error: linux/miscdevice.h: No such file or directory
rtc_ds1339.c:60:26: error: linux/ioport.h: No such file or directory
In file included from /usr/include/asm/fcntl.h:1,
from /usr/include/linux/fcntl.h:4,
from rtc_ds1339.c:61:
/usr/include/asm-generic/fcntl.h:113: error: expected specifier-qualifier-list before 'pid_t'
rtc_ds1339.c:62:31: error: linux/mc146818rtc.h: No such file or directory
rtc_ds1339.c:63:24: error: linux/init.h: No such file or directory
rtc_ds1339.c:65:27: error: linux/proc_fs.h: No such file or directory
rtc_ds1339.c:66:28: error: linux/spinlock.h: No such file or directory
In file included from rtc_ds1339.c:67:
/usr/include/linux/sysctl.h:40: error: expected specifier-qualifier-list before 'size_t'
rtc_ds1339.c:69:75: error: linux/slab.h: No such file or directory
rtc_ds1339.c:70:75: error: linux/mm.h: No such file or directory
rtc_ds1339.c:76:75: error: linux/delay.h: No such file or directory
rtc_ds1339.c:77:75: error: asm/io.h: No such file or directory
The files are from 2004 and I think there were some changes made to the kernel tree that are causing
some of these errors. I know config.h was removed. I think it was replaced with autoconfig.h. The others
may be because they were moved in the kernel or because of a missing or incorrect include directive
in the makefile. The -O5 also doesn't look correct, I don't think it goes up to 5. Since this is a module
there are some directives used that I'm not familiar with.
Bottom line is I'm in over my head at this point. Maybe someone more capable in this area can provide
a few pointers and set me straight.