comedi + rtai3.x for kernel 2.6.x

Hi, i'm trying to compile my kernel module (that works correctliy under 2.4.22
with rtai-24.1.13 and comedi ) using rtai-3.1 and the patch downloaded from
Bernd Porr site. Now i have two questions:

Is the patch to 2.6.x kernel the only way to use comedi with this kernel
release? I've tried to compile a CVS version of comedi using configure, make etc
but the result is :

if gcc -DHAVE_CONFIG_H -I. -I. -I../..    -I../../include/
-DKBUILD_MODNAME=kcomedilib -DKBUILD_BASENAME=data -Wall -W
strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe
-msoft-float -mpreferred-stack-boundary=2 -mar
ch=pentium3 -I/lib/modules/2.6.7-adeos/build/include/asm-i386/mach-default -O2
-fomit-frame-pointer  -DMODULE -I/usr/r
ealtime/include  -g -O2 -MT kcomedilib_ko-data.o -MD -MP -MF
".deps/kcomedilib_ko-data.Tpo" \
  -c -o kcomedilib_ko-data.o `test -f 'data.c' || echo './'`data.c; \
then mv -f ".deps/kcomedilib_ko-data.Tpo" ".deps/kcomedilib_ko-data.Po"; \
else rm -f ".deps/kcomedilib_ko-data.Tpo"; exit 1; \
fi 
In file included from data.c:25:
../../include/linux/comedilib.h:33:2: #error linux/comedilib.h should not be
included by n
on-kernel-space code
In file included from /usr/include/linux/sched.h:13,
                 from ../../include/linux/sched.h:14,
                 from /usr/include/linux/mm.h:4,
                 from ../../include/linux/mm.h:23,
                 from ../../include/linux/comedidev.h:36,
                 from data.c:26:
/usr/include/linux/timex.h:173: field `time' has incomplete type
/usr/include/linux/timex.h:188: confused by earlier errors, bailing out
make[3]: *** [kcomedilib_ko-data.o] Error 1
make[3]: Leaving directory `/home/sechi/comedi2.6/comedi/comedi/kcomedilib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/sechi/comedi2.6/comedi/comedi'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/sechi/comedi2.6/comedi'
make: *** [all] Error 2

Question 2: How can i compile correctly a kernel module using a Makefile and
including rtai3.1 and comedi headers? I've tried to use, as a template, a
GNUmakefile of rtai's showroom but with no results so far.
Thanks
Alberto.

Received on 2004-07-09Z06:26:08