From: Marc L. <Mar...@un...> - 2002-04-05 12:09:12
|
Hi, I have been very happy to discover this week the existence of linux-gpib.sourceforge.net. A long time ago, I had had a look at linux-gpib (I have been using linux since 1995) but unfortunately none of the GP-IB boards we had at that time were supported. Recently, we have purchased GPIB-PCI card by Ines as they advertised it to be supported under linux. Admittedly, they provide kernel modules for linux 2.2 and 2.4, and one or two sample programs, but without the source, and no high-level library. Therefore, I was very happy to find out that (1) linux-gpib had been resurrected and (2) that it supported Ines boards. I am thus currently evaluating it.=20 However, I have some problems just compiling the stuff. I have began fixing some things, but I would like to have some feedback. This on a Pentium II machine running Red Hat Linux 7.2 (will all updates applied). I usually compile my kernels, but I have found the 2.4 series a bit unresponsive, and none of the kernels I tried (up to 2.4.19-pre5) has been able to equal the performance of the Red Hat kernels, contrary to what I was accustomed to. Thus, I would like to stick to the latest kernel update (2.4.9-31) to keep the platform stable once everything is in order. What I have done :=20 1) rpm -i kernel-source.XXXX.rpm (unpacks in /usr/src/linux-2.4.9-31),=20 cd /usr/src/linux-2.4.9-31 modify Makefile so that EXTRAVERSION is -31 cp configs/kernel-2.4.9-i586.config/ .config make oldconfig make dep 2) go to the freshly untarred linux-gpib-3.1.2 directory; make [I indicate /usr/src/linux-2.4.9-31 as the kernel source directory, and select the Ines driver only]=20 compilation begins, with lots of error messages such as=20 make[2]: Entering directory `/home/lefranc/MANIP/gpib/linux-gpib-3.1.2/dr= iver/nec7210' gcc -I. -I../include -I../../include -DEXPORT_SYMTAB -c -o cmd.o cmd.c In file included from /usr/include/linux/module.h:21, from board.h:25, from cmd.c:19: /usr/include/linux/modversions.h:1:2: #error Modules should never use ker= nel-headers system headers, /usr/include/linux/modversions.h:2:2: #error but rather headers from an a= ppropriate kernel-source package. /usr/include/linux/modversions.h:3:2: #error Change -I/usr/src/linux/incl= ude (or similar) to /usr/include/linux/modversions.h:4:2: #error -I/lib/modules/$(uname -r)/b= uild/include /usr/include/linux/modversions.h:5:2: #error to build against the current= ly-running kernel. OK. I have a look at the Makefiles in driver/* and notice that only driver/protocol/Makefile has INCLUDES =3D -I. -I../include -I../../include -I$(LINUXDIR)/include , while all the others have INCLUDES =3D -I. -I../include -I../../include Thus, I add the -I$(LINUXDIR)/include to Makefiles in driver/{nec7210,tms9914,sys But then I get errors such as=20 make[2]: Entering directory `/home/lefranc/MANIP/gpib/linux-gpib-3.1.2/dr= iver/nec7210' gcc -I. -I../include -I../../include -I"/usr/src/linux-2.4.9-31"/include = -DEXPORT_SYMTAB -c -o cmd.o cmd.c In file included from ../include/gpib_types.h:22, from ../include/gpibP.h:9, from board.h:23, from cmd.c:19: /usr/include/stdint.h:37: warning: redefinition of `int8_t' /usr/src/linux-2.4.9-31/include/linux/types.h:98: warning: `int8_t' previ= ously declared here /usr/include/stdint.h:38: warning: redefinition of `int16_t' /usr/src/linux-2.4.9-31/include/linux/types.h:100: warning: `int16_t' pre= viously declared here The problem here is a conflict between standard include files and those of the kernel. SInce I have done a bit of kernel programming in the past (writing a driver for an DAQ board), this rings a bell, and I wonder about the absence of a -D__KERNEL__ in the CFLAGS for compiling bits of amodule. SInce all driver/*/Makefile have a line CFLAGS +=3D $(INCLUDES) $(OPTIONS) -DEXPORT_SYMTAB I add the following line in driver/Makefile OPTIONS =3D -D__KERNEL__ (actually, I had to manually add a -D__KERNEL__ to the CFLAGS line of driver/sys/Makefile) With these modifications, the whole stuff seems to compile fine.=20 For installation, I had the problem that MODLIB was not defined for whatever reason so that I had to do make MODLIB=3D/lib/modules/2.4.9-31 install I then get : [...] install -D ines-gpib.o /lib/modules/2.4.9-31/misc/ines-gpib.o make[2]: Leaving directory `/home/lefranc/MANIP/gpib/linux-gpib-3.1.2/dri= ver/ines' depmod -a=20 depmod: *** Unresolved symbols in /lib/modules/2.4.9-31/misc/gpib-common.= o depmod: *** Unresolved symbols in /lib/modules/2.4.9-31/misc/ines-gpib.o depmod: *** Unresolved symbols in /lib/modules/2.4.9-31/misc/nec7210.o depmod: *** Unresolved symbols in /lib/modules/2.4.9-31/misc/tms9914.o make[1]: *** [install] Error 1 make[1]: Leaving directory `/home/lefranc/MANIP/gpib/linux-gpib-3.1.2/dri= ver' make: *** [install] Error 2 Is 2.4.9 too old ?=20 Thank you very much in advance. Marc P.S. If that can help, here his the output of=20 nm /lib/modules/2.4.9-31/misc/gpib-common.o : 00002368 T AP_Init 000023d0 T AP_LocalLock 000023f4 T AP_LocalUnLock 00002338 T AP_Lock 00002350 T AP_UnLock 000003e0 C AP_Vector 00000170 D AP_virgin 0000015c D AutoP_mutex 00000030 r DRIVERBITS 000001b0 r DRIVERBITS 000004b0 r DRIVERBITS 00000570 r DRIVERBITS 00000630 r DRIVERBITS 00000690 r DRIVERBITS 00000790 r DRIVERBITS 000007f0 r DRIVERBITS 00000910 r DRIVERBITS 00000990 r DRIVERBITS 000009f0 r DRIVERBITS 00000a50 r DRIVERBITS 00000ad0 r DRIVERBITS 00000b50 r DRIVERBITS 00000bd0 r DRIVERBITS 00000cb0 r DRIVERBITS 00000d50 r DRIVERBITS 00000db0 r DRIVERBITS 00000e70 r DRIVERBITS U __const_udelay 0000110c t __constant_c_memset 00001010 t __constant_copy_from_user 00000f24 t __constant_copy_to_user U __down_failed U __down_failed_interruptible U __generic_copy_from_user U __generic_copy_to_user 00000000 ? __kstrtab_gpib_register_driver 00000040 ? __kstrtab_gpib_unregister_driver 00000000 ? __ksymtab_gpib_register_driver 00000008 ? __ksymtab_gpib_unregister_driver 000014e8 t __list_add 00001500 t __list_del U __up_wakeup U __vmalloc U __wake_up U add_timer 00000680 C board_array 00000900 T board_type_ioctl U boot_cpu_data 00001400 T cleanup_module 00001624 t clear_bit 00001ba4 t clear_bit 0000211c t clear_bit 00000b04 T command_ioctl 00001a2c t constant_test_bit 00001d40 t constant_test_bit U del_timer 000027a8 t down 00000e84 t down_interruptible 000027b8 t down_interruptible 00000158 D drvstat 0000212c T dvrsp 00000020 D ffmt 00000000 t gcc2_compiled. 00001148 t gcc2_compiled. 00001538 t gcc2_compiled. 0000164c t gcc2_compiled. 0000167c t gcc2_compiled. 000016d4 t gcc2_compiled. 00001804 t gcc2_compiled. 00001858 t gcc2_compiled. 00001a50 t gcc2_compiled. 00001a9c t gcc2_compiled. 00001bb4 t gcc2_compiled. 00001c54 t gcc2_compiled. 00001cb4 t gcc2_compiled. 00001d64 t gcc2_compiled. 00001da0 t gcc2_compiled. 00001f50 t gcc2_compiled. 0000200c t gcc2_compiled. 0000212c t gcc2_compiled. 00002338 t gcc2_compiled. 00000eb4 t get_current 0000115c T gpib_register_driver 00001190 T gpib_unregister_driver 0000271c T ibAPE 00002418 T ibAPWait 00002660 T ibAPrsp 00000004 D ib_exclusive 000000a0 D ib_fops 00000000 D ib_opened 0000167c T ibcac 00000078 T ibclose 000016d4 T ibcmd 00001e98 T ibeos 00001804 T ibgts 00000124 T ibioctl 00001a50 T iblines 00001858 T ibonl 00000000 T ibopen 00001da0 T ibpad 00001a9c T ibrd 00001bb4 T ibrpp 00001c54 T ibrsv 00001df4 T ibsad 00001cb4 T ibsic 00001d64 T ibsre 00001f1c T ibstatus 00001e64 T ibtmo 00001f50 T ibwait 0000200c T ibwrt 000014b0 t init_MUTEX 0000278c t init_MUTEX 000011bc T init_board_array 0000138c T init_module 000014cc t init_timer 00001494 t init_waitqueue_head 00002810 t init_waitqueue_head U interruptible_sleep_on_timeout U jiffies 00001448 t list_add 00001468 t list_del 00000108 D myPAD 0000010c D mySAD 0000164c T osChngBase 0000166c T osChngDMA 0000165c T osChngIRQ 00001148 T osInit 000015e0 T osRemoveTimer 00001154 T osReset 00001574 T osStartTimer 00000104 D pollTimeidx 00001104 t prefetch U printk 000009d8 T read_ioctl U register_chrdev 000000e8 D registered_drivers 00001510 t sema_init 000027e8 t sema_init 00001614 t set_bit 00001b94 t set_bit 00001d30 t set_bit 0000210c t set_bit 00000dcc T status_ioctl 00000e50 t strcmp 00000110 D timeTable 00000100 D timeidx 00001634 t timer_pending U tvec_bases U unregister_chrdev 00000ea4 t up 000027d8 t up 00000ed0 t verify_area U vfree 000019d8 t vmalloc 00001538 T watchdog_timeout 00000c64 T write_ioctl =20 --=20 _____________________________________________________________ Marc Lefranc, Charg=E9 de Recherche au CNRS Laboratoire de Physique des Lasers, Atomes, Mol=E9cules Bat P5, UFR de Physique Universit=E9 des Sciences et Technologies de Lille F-59655 Villeneuve d'Ascq CEDEX (FRANCE) e-mail: Mar...@un... Tel : +33 (0)3 20 33 64 50 ; FAX : +33 (0)3 20 33 70 20 _____________________________________________________________ |