Re: [opencbm-user] Errors compiling opencbm on Linux.
Brought to you by:
strik
|
From: <gr...@gm...> - 2007-11-07 22:50:21
|
Hello Spiro,
Spiro Trikaliotis wrote:
> But the problem with the rights still occurs, right?
Yes.
> 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.
Ok, it is here attached. It is the one generated with the
aforementioned command with the branch v0_4_0_bugfix_branch.
> 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?
luca@c65:~/opencbm/cbm4win2/cbm4linux$ find /lib/modules/ -iname cbm.ko
-exec ls -la {} +
-rw-r--r-- 1 root root 15788 2007-11-04 16:19
/lib/modules/2.6.20/kernel/drivers/char/cbm.ko
-rw-r--r-- 1 root root 15788 2007-11-03 22:42
/lib/modules/2.6.20/misc/cbm.ko
So since i compiled it with the version of the 4th of November, the one
in /lib/modules/2.6.20/kernel/drivers/char/cbm.ko should be the one
generated in the build.
>> 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?
Yes, the fresh checkout was in cbm4win2/cbm4linux.
>> 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.
Ok, it worked with nicely with:
c65:/home/luca/opencbm/cbm4win2/cbm4linux# modprobe -v cbm lp=0
insmod /lib/modules/2.6.20/kernel/drivers/char/cbm.ko lp=0
> I believe the documentation is wrong here, I will fix it!
>
> 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.
Ok.
>
>> 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.
Ok, thanks for your great job on this useful tool!
See you,
Luca
|