Re: [opencbm-user] Errors compiling opencbm on Linux.
Brought to you by:
strik
|
From: <gr...@gm...> - 2007-11-03 18:49:24
|
Hello Spiro,
Spiro Trikaliotis wrote:
> Do you use the bash as your default shell, or another one?
I never touched that setting, and indeed you are right: /bin/sh points
to the 'dash' shell. By the way, I want to clarify that I usually use a
gnome-terminal, which runs a bash shell and not a dash one.
> Thus, here, sh is just a synonym for bash! So, now, I believe that on
> your machine, sh does not execute bash, but the "real" sh shell. I
> expect this to be the source of our problem.
>
> So, could you please:
>
> A. send me the output of the "ls -ld /usr/*sh" command on your machine?
luca@c65:~/jobs_svn/trunk/resume/tools$ ls -ld /bin/*sh
-rwxr-xr-x 1 root root 677184 2006-12-11 22:20 /bin/bash
-rwxr-xr-x 1 root root 79956 2007-09-25 11:08 /bin/dash
lrwxrwxrwx 1 root root 4 2006-12-24 19:05 /bin/rbash -> bash
lrwxrwxrwx 1 root root 4 2006-12-24 19:06 /bin/sh -> dash
> B. if /usr/sh is not a symbolic link to /usr/bash, please rename the
> /bin/sh file, generate a symbolic link to /usr/bash, and retry to
> compile opencbm? Do you still have these problems?
> Don't forget to change the "original" sh back!
Hmm, now I believe to be the guilty one: I recofigured the dash package
dpkg-reconfigure dash
and when it asked me if i want to set it as the default one (it also
says that it is "smaller and faster than bash"... so maybe I been caught
in this trap long time ago when I installed dash!). Now i answered 'No',
and so the bash shell is the default one.
With the /bin/sh pointing to bash, I got a fresh checkout of the branch
called v0_4_0_bugfix_branch, and followed successfully all the steps in
"3.1.2. Compilation". Then I followed the steps in the section
"3.1.3. Loading the module", and I got an error only with the last
command, i.e.:
luca@c65:~/opencbm/cbm4win2/cbm4linux$ sudo /sbin/insmod cbm lp=0
insmod: can't read 'cbm': No such file or directory
I searched for that file this way:
luca@c65:~/opencbm/cbm4win2/cbm4linux$ sudo find / -iname "cbm.ko" -exec
ls -la {} +
-rw-r--r-- 1 luca luca 15820 2007-11-03 18:25
/home/luca/opencbm/cbm4win2/cbm4linux/sys/linux/cbm.ko
-rw-r--r-- 1 luca luca 15820 2007-11-03 00:20
/home/luca/opencbm/cbm4win/sys/linux/cbm.ko
-rw-r--r-- 1 root root 15820 2007-11-03 18:34
/lib/modules/2.6.20/misc/cbm.ko
-rw-r--r-- 1 root root 15820 2007-11-03 00:28
/usr/src/linux-source-2.6.20/cbm.ko
the two ones in /lib/modules/2.6.20/misc/cbm.ko and
/home/luca/opencbm/cbm4win/sys/linux/cbm.ko has been prolly copied along
with the last compilation, but I am nore sure about the first one. Do
you have an idea of when those files are created? And why my error?
Notice that to load the module i had to go into sys/linux directory and
insmod'ed the cbm.ko from there.
> Do you use udev or not?
Yeah, I use udev.
> For udev, "make install" should have copied the
> file sys/linux/45-opencbm-parallel-rule into the directory
> $(UDEV_RULES), that is, to /etc/udev/rules.d/. Is the file there?
Yes, it is.
luca@c65:~/opencbm/cbm4win2/cbm4linux$ ll /etc/udev/rules.d/ | grep parall
-rw-r--r-- 1 root root 175 2007-11-03 18:34 45-opencbm-parallel.rules
> If you are not using udev, than a simple "chmod 666 /dev/cbm" will fix
> the problem by allowing EVERY user to use the device. You might want to
> adjust the permissions in a more sensible way.
Well, the file gets copied in there, so i wonder why it does not work. I
tryed also to /etc/init.d/udev restart with no luck.
I could provide some useful info here below to track down the error.
luca@c65:~/opencbm/cbm4win2/cbm4linux/sys/linux$ ll /dev/cbm
crw-rw-r-- 1 root users 10, 177 2007-11-03 19:45 /dev/cbm
luca@c65:~/opencbm/cbm4win2/cbm4linux/sys/linux$ id
uid=1000(luca) gid=1000(luca)
groups=20(dialout),24(cdrom),25(floppy),29(audio),30(dip),44(video),1000(luca),1002(vboxusers)
So, i added my accout "luca" to the group user, and then i run 'newgrp
users', now i my account is able to use /dev/cbm device. Not sure it is
a sensible way to fix the error though.
Besides, /var/log/syslog, when i call insmode, reports the following
"debug" log output, maybe could help understanding the error:
Nov 3 19:39:20 c65 udevd[897]: udev_event_run: seq 1781 forked, pid
[13710], 'add' 'module', 0 seconds old
Nov 3 19:39:20 c65 kernel: cbm_init: using passive (XM1541) cable
(auto), irq 7
Nov 3 19:39:20 c65 kernel: cbm: resetting devices
Nov 3 19:39:20 c65 udevd[897]: udev_event_run: seq 1783 forked, pid
[13711], 'add' 'misc', 0 seconds old
Nov 3 19:39:20 c65 udevd[897]: udev_done: seq 1781, pid [13710] exit
with 0, 0 seconds old
Nov 3 19:39:20 c65 udevd[897]: udev_event_run: seq 1782 forked, pid
[13712], 'add' 'module', 0 seconds old
Nov 3 19:39:20 c65 udevd-event[13711]: udev_rules_get_name: no node
name set, will use kernel name ''
Nov 3 19:39:20 c65 udevd-event[13710]: pass_env_to_socket: passed -1
bytes to socket '/org/kernel/udev/monitor',
Nov 3 19:39:20 c65 udevd-event[13710]: pass_env_to_socket: passed 117
bytes to socket '/org/freedesktop/hal/udev_event',
Nov 3 19:39:20 c65 udevd-event[13710]: udev_event_run: seq 1781
finished with 0
Nov 3 19:39:20 c65 udevd[897]: udev_done: seq 1782, pid [13712] exit
with 0, 0 seconds old
Nov 3 19:39:20 c65 udevd-event[13712]: pass_env_to_socket: passed -1
bytes to socket '/org/kernel/udev/monitor',
Nov 3 19:39:20 c65 udevd-event[13712]: pass_env_to_socket: passed 101
bytes to socket '/org/freedesktop/hal/udev_event',
Nov 3 19:39:20 c65 udevd-event[13712]: udev_event_run: seq 1782
finished with 0
Nov 3 19:39:20 c65 udevd[897]: udev_done: seq 1783, pid [13711] exit
with 0, 0 seconds old
Nov 3 19:39:20 c65 udevd-event[13711]: udev_db_get_device: no db file
to read /dev/.udev/db/\x2fclass\x2fmisc\x2fcbm: No such file or directory
Nov 3 19:39:20 c65 udevd-event[13711]: udev_node_add: creating device
node '/dev/cbm', major=10, minor=177, mode=0664, uid=0, gid=100
Nov 3 19:39:20 c65 udevd-event[13711]: udev_node_mknod: preserve file
'/dev/cbm', because it has correct dev_t
Nov 3 19:39:20 c65 udevd-event[13711]: name_index: creating index:
'/dev/.udev/names/cbm/\x2fclass\x2fmisc\x2fcbm'
Nov 3 19:39:20 c65 udevd-event[13711]: pass_env_to_socket: passed -1
bytes to socket '/org/kernel/udev/monitor',
Nov 3 19:39:20 c65 udevd-event[13711]: pass_env_to_socket: passed 143
bytes to socket '/org/freedesktop/hal/udev_event',
Nov 3 19:39:20 c65 udevd-event[13711]: udev_event_run: seq 1783
finished with 0
Nov 3 19:39:20 c65 kernel: cbm: waiting for free bus...
Nov 3 19:39:37 c65 kernel: Quiting because of timeout
Many thanks for having helped me to solve the problems, thanks!
See you,
Luca
|