Re: [opencbm-user] Errors compiling opencbm on Linux.
Brought to you by:
strik
|
From: Spiro T. <cb...@tr...> - 2007-11-04 11:21:59
|
Hello Luca,
* On Sat, Nov 03, 2007 at 10:45:08PM +0100 gr...@gm... wrote:
> Spiro Trikaliotis wrote:
> > Ok, I did some reading on GNU Make and thus, I just checked in a new
> > version, where I believe make will use /bin/bash instead of /bin/sh as
> > shell. If my assumption is right, that version should work
> > out-of-the-box on your system. Could you please test it for me?
>
> Sure, I set back dash as default shell, then checked out the last
> revision of the tag v0_4_0_bugfix_branch, and it compiled successfully,
> thanks :)
Ok, good to hear that. Thank you very much for your report.
But the problem with the rights still occurs, right?
So, anwering your previous mail:
* On Sat, Nov 03, 2007 at 07:52:46PM +0100 gr...@gm... wrote:
> 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
Well... Ok, could you please send me the new file showvars.txt again
after running "make -f LINUX/Makefile showvars-file"? Perhaps, there is
still something going wrong.
I changed the order of the determination of the modules dir, that is,
where cbm.ko is copied to. Perhaps this helps in your case?
> 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
I assume /home/luca/opencbm/cbm4win/ is the older CVS source, while
/home/luca/opencbm/cbm4win2/ is the fresh checkout, right?
> 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,
yes, obviously, as the time indicates this.
> but I am nore sure about the first one. Do
> you have an idea of when those files are created?
/home/luca/opencbm/cbm4win/sys/linux/cbm.ko seems to be your previous
installation, as it is in /home/luca/opencbm/cbm4win/. And I expect
/usr/src/linux-source-2.6.20/cbm.ko to be copied there because of the
first patch, where I already told you that I believe it is wrong.
> 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.
I tried it myself: Try to replace "insmod" with "modprobe", this should
help. For insmod, you have to add the path to the cbm.ko file. For
modprobe, this is not necessary, as it searches in the /lib/modules/XXX/
dir for it.
I believe the documentation is wrong here, I will fix it!
> > 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.
The udev rule is executed as expected:
> 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
These are exactly the permissions you should have according to the rule!
> 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)
You must "only" add yourself to the "users" group, or change the
permissions in the rule. Thus, either add yourself to the "users" group
(as you have already done), or change the line
KERNEL=="cbm", GROUP="users", MODE="0664"
to
KERNEL=="cbm", GROUP="luca", MODE="0664"
to give the group "luca" the permission (and no-one else),
or to
KERNEL=="cbm", GROUP="users", MODE="0666"
to allow everyone to use opencbm.
I will have to add a specific section to this into the documentation.
> 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.
In fact, it is exactly the way it was expected to work. I see, this
shoujld be better documented. In fact, I totally forgot about this
myself.
Regards,
Spiro.
--
Spiro R. Trikaliotis http://opencbm.sf.net/
http://www.trikaliotis.net/ http://www.viceteam.org/
|