[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: [LI] Modules ??



On Tue, Jan 11, 2000 at 04:22:24PM +0530, Syed Khader Vali wrote:

> This might look very silly as I am learning the
> kernel internals just now. Is it possible that
> I can create a module that works with any
> version of the kernel ( for 2.2.xx kernels and beyond ) without meddling with the kernel.

Probably not 2.2.x AND 2.3.x, but within n.m.x where n and m are
fixed - yes it is possible.  Even within that you may have to have
a separate version for SMP and one for UP, though...

I have no idea _how_ to do it, but I do know that it can be done
and is done.  Example: download the OSS drivers from
opensound.com.  They are "shareware" - you try it, and if it works
for you, you pay $20 to get a license.

Ditributed in binary, there are separate modules for 2.2 SMP and
for UP.  Last time I checked, anyway...

I did use them for a while too, but didnt like them too much and
now there is a free driver from Zach brown at RH.  This one comes
as source - you just compile it into a ".o" and "insmod" it (after
first "insmod"-ing "soundcore".

As simple as that, and it is supposed to work with any 2.2.x
kernel...

So yes indeed it can be done.  Just dont ask me how - I've never
written a kernel module in my life.

(If you want to see the Maestro 2E sources, I think it is at
http://people.redhat.com/zab/maestro - check it out.)

To whet your curiosity, here's an excerpt from the above page:

    Included here is all you need to compile and insert the driver
    on a 2.2 box. 2.3 should be close. If you're replacing the
    driver as distributed in a kernel, dropping maestro.c from the
    tarball into the kernel tree on top of the old maestro.c (make
    a backup first!) should come close to working. 

And needless to say - you don't really have to recompile your
kernel itself for any of this to work.
--------------------------------------------------------------------
The Linux India Mailing List Archives are now available.  Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.