[Techtalk] sonypid/spicctrl

Akkana akkana at shallowsky.com
Sun Aug 18 14:19:55 EST 2002


Conni writes:
> First problem:  I can't figure out how to get the files unzipped.  They're
> .bz2, and gunzip nor unzip won't work.

Which files?  You shouldn't need to download anything to get the sonypi
driver -- it should already be in your kernel if you're using the Redhat
7.2 kernel.  But the -j flag of tar will handle bz2 (I always forget
that it's -j, but man tar has it in its long list of options).

> Second problem:  I am not very technically inclined.  How do I find out
> what minor device my system will use?  

It used to be that:
dmesg | grep -i sony
included information about what minor device it wanted to use, but
in 2.4.18 it doesn't seem to any more.  It might in your kernel.

The documentation (which, if you installed kernel source, you can
read in /usr/src/linux/Documentation/sonypi.txt) talks a little
about minor device numbers, and says that if you don't specify and
let the driver allocate automatically, you should "see /proc/misc
or kernel logs" to find out the minor number.  /proc/misc should
be a very short file which includes a line like
61 sonypi
-- the number there is the minor device that sonypi is using.

61 sems to work on my machine, but I think different models want
different minor numbers; I don't understand why.  I specify it
by putting this line in /etc/modules.conf:
options sonypi minor=61

> How do I use modprobe?  (would that
> just be 'modprobe sonypi on'?)  I'm also inclined to install it as a

Just: modprobe sonypi
But you don't need to do that if you put this line in modules.conf:
alias char-major-10-61 sonypi
Then whenever yoy try to open a device with major 10, minor 61, the
kernel will know to load the module called sonypi.

> I've also had no success getting the jogdial thing working right; maybe if
> I get this sonypi installed right, I'll be able to fix that.

Sonypi is the driver for the jogdial, so there's no chance your jogdial
will work if sonypi isn't loaded.

> Third issue:  If I want to use the enhanced sonypid.c or the bright.c,
> where do I put them?  (I am not a programmer.  I'm a pharmacy student.)
> Where do I paste the other spiffy functionality things?

Put the source anywhere you like.  Many people make a directory under
their home directory called "src" (short for "source") where they put
the source code to their programs.  Myself, I have src (for my own
programs) and outsrc (for other people's programs).

<p>
After reading your questions, I made a tarball that contains the
two programs and a Makefile to build them, and more instructions
on how to do that.  Let me know if I missed anything there.

	...Akkana



More information about the Techtalk mailing list