Re: [opencbm-user] Errors compiling opencbm on Linux.
Brought to you by:
strik
|
From: <gr...@gm...> - 2007-10-31 21:45:26
|
Hello Spiro,
I managed to build opencbm0.4.0, with the following changes:
Index: LINUX/config.make
===================================================================
RCS file: /cvsroot/opencbm/cbm4win/LINUX/config.make,v
retrieving revision 1.7.4.4
diff -u -r1.7.4.4 config.make
--- LINUX/config.make 28 Oct 2007 10:56:30 -0000 1.7.4.4
+++ LINUX/config.make 31 Oct 2007 21:33:06 -0000
@@ -16,7 +16,7 @@
MANDIR = $(PREFIX)/man/man1
INFODIR = $(PREFIX)/info
INCDIR = $(PREFIX)/include
-MODDIR = `for d in /lib/modules/\`uname
-r\`/{extra,misc,kernel/drivers/char}; do test -d $$d && echo $$d; done
| head -n 1`
+MODDIR = `for d in /lib/modules/\`uname -r\`/build; do test -d $$d
&& echo $$d; done | head -n 1`
UDEV_RULES = /etc/udev/rules.d/
@@ -40,10 +40,10 @@
# (removed, use the later implementation instead. I left them in in
case the
# later implementation does not work on a particular machine.)
#KERNEL_SOURCE = /usr/src/linux # for kernel 2.4
-#KERNEL_SOURCE = /lib/modules/`uname -r`/build # for kernel 2.6
+KERNEL_SOURCE = /lib/modules/`uname -r`/build # for kernel 2.6
# from patch #1189489 on SourceForge, with fix from #1189492):
-KERNEL_SOURCE = ${shell for d in {/lib/modules/`uname
-r`/build,/usr/src/linux}; do test -d $$d && echo $$d; done | head -n 1}
+#KERNEL_SOURCE = ${shell for d in {/lib/modules/`uname
-r`/build,/usr/src/linux}; do test -d $$d && echo $$d; done | head -n 1}
#
# Find out if we should include linux/autoconf.h or linux/conf.h in
the kernel module
Index: docs/LINUX/Makefile
===================================================================
RCS file: /cvsroot/opencbm/cbm4win/docs/LINUX/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- docs/LINUX/Makefile 28 Apr 2006 12:57:35 -0000 1.4
+++ docs/LINUX/Makefile 31 Oct 2007 21:33:08 -0000
@@ -48,7 +48,7 @@
gzip -c9 $(INFO) > $(INFODIR)/$(INFO).gz
install: install-files
- test -z `type -p mkinfodir` || mkinfodir || /bin/true
+ #test -z `type -p mkinfodir` || mkinfodir || /bin/true
uninstall:
rm -f $(INFODIR)/$(INFO).gz
Then i executed:
luca@c65:~/opencbm/cbm4win$ sudo /sbin/depmod
luca@c65:~/opencbm/cbm4win$ sudo /sbin/modprobe parport
luca@c65:~/opencbm/cbm4win$ sudo /sbin/insmod cbm lp-0
insmod: can't read 'cbm': No such file or directory
The error is due to the fact that the cbm.ko file resides only in the
./sys/linux directory, dunno why.
Anyway, i issued this command;
luca@c65:~/opencbm/cbm4win$ sudo insmod sys/linux/cbm.ko lp-0
insmod: error inserting 'sys/linux/cbm.ko': -1 Unknown symbol in module
and I got that error. Instead if i run it with no parameters, like:
luca@c65:~/opencbm/cbm4win$ sudo insmod sys/linux/cbm.ko
i get no error messages (but no successful messages either :))
The syslog whilst the last command reports these lines:
Oct 31 22:42:38 c65 kernel: cbm_init: using passive (XM1541) cable
(auto), irq 7
Oct 31 22:42:38 c65 kernel: cbm: resetting devices
Oct 31 22:42:38 c65 kernel: cbm: waiting for free bus...
Oct 31 22:44:21 c65 kernel: Quiting because of timeoutcbm: resetting devices
Oct 31 22:44:21 c65 kernel: cbm: waiting for free bus...
I tryed to issue some commands then, but without success, like
luca@c65:~/opencbm/cbm4win$ sudo cbmctrl status 8
99, driver error,00,00
cbmctrl: status: No such device
Any help? :)
Greetings,
Luca
|