- From: Bernd Porr <Bernd.Porr_at_cn.stir.ac.uk>
- Date: Sat, 02 Aug 2003 16:27:56 +0100
Dear all, we are going to have fun to make comedi running under 2.6 (see below). The question is how to proceed. There are four possible options and I would like to discuss these options. First the problem I see: the configuration of comedi is just now based on a hack which compiles a fake module to get all the compiler flags. In a second step these compilter flags are taken and then comedi is compiled with an older hacked verion of a kernel makefile. It worked for 2.2. and 2.4 but for 2.6 it doesn't and probably its getting more and more difficult. There are 4 options: 1) Modify the existing configure script and try to make it work with 2.6. Modify the source. etc. 2) Get basically rid of the configuration script in this form and try to use more of the build utils from the kernel. Just now it is not possible as the kernel is not able to include external header files (from my knowledge, please correct me) and it's up to the kernel people to supply us with the option. Modify the source to run with all kernel versions (is it possible any more?). 3) Make comedi part of the kernel tree and compile then with the standard "make modules". No need to submit it to Linus (why not?). But make it so that comedi installs itself as part of the main linux tree. This eliminates the include problem and also elimiates the fake linux include directories. shipped with comedi. Probably we have to have 3 different Makefiles for the different kernel versions (2.2, 2.4, 2.6) and some (loads of) #defines to get rid of error msgs and to make run with any kernel-src. 4) Make specific versions for comdi for different kernel versions (David won't like it, probably?). It's a nice feature that comedi woks with all kernel versions but it also becomes more and more difficult to achieve it. Create a comedi tree which basically resides in the kernel tree (see 3) and doesn't have the overhead for all the other versions. Like the pcmcia subsystem which is also externally developed. Of course there are compromises possible. Develop now a version for 2.6 and backport to a unified version for 2.2/2.4. For me it seems to be just now the best solution. 2.6 has a different build system. Personally I'm interested in both versions 2.4. and 2.6. What does the community think? /Bernd 2.6.0-test2: copied all comedi header files in the main linux tree: snoopy:/home/bp1/c/usb/2.6/comedi/comedi# make -C /usr/src/linux-2.6.0-test2 SUBDIRS=$PWD V=1 modules make -f scripts/Makefile.build obj=/home/bp1/c/usb/2.6/comedi/comedi gcc -Wp,-MD,/home/bp1/c/usb/2.6/comedi/comedi/.comedi_fops.o.d -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=athlon -Iinclude/asm-i386/mach-default -nostdinc -iwithprefix include -DMODULE -DKBUILD_BASENAME=comedi_fops -DKBUILD_MODNAME=comedi -c -o /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.o /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c In file included from /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:42: include/linux/comedidev.h: In function `comedi_get_device_by_minor': include/linux/comedidev.h:247: error: invalid operands to binary + /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c: In function `comedi_ioctl': /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:91: error: invalid operands to binary & /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:101: warning: int format, kdev_t arg (arg 2) /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:101: warning: int format, kdev_t arg (arg 2) /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c: In function `do_devconfig_ioctl': /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:161: warning: implicit declaration of function `suser' /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c: In function `do_bufconfig_ioctl': /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:267: warning: int format, kdev_t arg (arg 2) /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:267: warning: int format, kdev_t arg (arg 2) /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c: In function `do_subdinfo_ioctl': /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:364: error: invalid operands to binary << /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c: In function `do_chaninfo_ioctl': /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:445: error: invalid operands to binary << /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c: In function `comedi_mmap_v22': /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:1252: error: invalid operands to binary & /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:1262: warning: int format, kdev_t arg (arg 2) /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:1262: warning: int format, kdev_t arg (arg 2) /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:1295: warning: implicit declaration of function `REMAP_PAGE_RANGE' /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c: In function `comedi_poll_v22': /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:1324: error: invalid operands to binary & /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:1328: warning: int format, kdev_t arg (arg 2) /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:1328: warning: int format, kdev_t arg (arg 2) /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c: In function `comedi_write_v22': /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:1366: error: invalid operands to binary & /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:1370: warning: int format, kdev_t arg (arg 2) /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:1370: warning: int format, kdev_t arg (arg 2) /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c: In function `comedi_read_v22': /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:1452: error: invalid operands to binary & /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:1456: warning: int format, kdev_t arg (arg 2) /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:1456: warning: int format, kdev_t arg (arg 2) /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c: In function `comedi_lseek_v22': /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:1570: error: invalid operands to binary & /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c: In function `comedi_fop_open': /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:1593: error: invalid operands to binary & /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:1597: error: invalid operands to binary >= /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:1623: warning: int format, kdev_t arg (arg 4) /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:1635: warning: `MOD_INC_USE_COUNT' is deprecated (declared at include/linux/module.h:482) /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:1638: warning: implicit declaration of function `__MOD_INC_USE_COUNT' /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c: In function `comedi_close_v22': /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:1652: error: invalid operands to binary & /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:1671: warning: `MOD_DEC_USE_COUNT' is deprecated (declared at include/linux/module.h:494) /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:1673: warning: implicit declaration of function `__MOD_DEC_USE_COUNT' /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c: In function `comedi_fasync': /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c:1690: error: invalid operands to binary & /home/bp1/c/usb/2.6/comedi/comedi/comedi_fops.c: In function `comedi_init': -- http://www.cn.stir.ac.uk/~bp1/ mailto:bp1_at_cn.stir.ac.uk
Received on 2003-08-02Z14:27:56