2006-12-12 14:06:37

by Jaswinder Singh Rajput

[permalink] [raw]
Subject: Support 2.4 modules features in 2.6

Hello,

I want to support old 2.4 modules features in 2.6 kernel modules:-
1. no kernel source tree is required to build modules.
2. support modular plugins.
3. modules EXPORT by default.

Is any patch available, or somebody working on it ?

Thank you,

Jaswinder Singh.


2006-12-12 14:11:17

by Arjan van de Ven

[permalink] [raw]
Subject: Re: Support 2.4 modules features in 2.6

On Tue, 2006-12-12 at 19:36 +0530, Jaswinder Singh wrote:
> Hello,
>
> I want to support old 2.4 modules features in 2.6 kernel modules:-
> 1. no kernel source tree is required to build modules.

this is a 2.6 not a 2.4 feature btw

> 2. support modular plugins.

?
> 3. modules EXPORT by default.

why?


--
if you want to mail me at work (you don't), use arjan (at) linux.intel.com
Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org

2006-12-12 15:11:50

by Jaswinder Singh Rajput

[permalink] [raw]
Subject: Re: Support 2.4 modules features in 2.6

On 12/12/06, Arjan van de Ven <[email protected]> wrote:
> On Tue, 2006-12-12 at 19:36 +0530, Jaswinder Singh wrote:
> > Hello,
> >
> > I want to support old 2.4 modules features in 2.6 kernel modules:-
> > 1. no kernel source tree is required to build modules.
>
> this is a 2.6 not a 2.4 feature btw
>

Really!! , Please let me know what is the procedure to build the
modules after deleting kernel linux-2.6*


> > 2. support modular plugins.
>
> ?

modular plugins means :-

module2 uses symbols of module1.
module3 uses symbols of module1 & module2.

Regards,

Jaswinder Singh.

2006-12-12 15:37:36

by Arjan van de Ven

[permalink] [raw]
Subject: Re: Support 2.4 modules features in 2.6

On Tue, 2006-12-12 at 20:41 +0530, Jaswinder Singh wrote:
> On 12/12/06, Arjan van de Ven <[email protected]> wrote:
> > On Tue, 2006-12-12 at 19:36 +0530, Jaswinder Singh wrote:
> > > Hello,
> > >
> > > I want to support old 2.4 modules features in 2.6 kernel modules:-
> > > 1. no kernel source tree is required to build modules.
> >
> > this is a 2.6 not a 2.4 feature btw
> >
>
> Really!! , Please let me know what is the procedure to build the
> modules after deleting kernel linux-2.6*

you only need include/* for this in 2.6

you can't do this at all with 2.4 kernels, it needs the whole lot.

(in both cases the code and headers are needed so that your module can
use the data structures and compile in the kernel code you select to use
from inlines)
>
>
> > > 2. support modular plugins.
> >
> > ?
>
> modular plugins means :-

you can still do that. Just you're better off building them in one go;


can you give us a pointer to the source of this 2.4 module you have?
Maybe some of the mechanisms that you want this for are now very
outdated and obsoleted by easier functionality.


--
if you want to mail me at work (you don't), use arjan (at) linux.intel.com
Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org

2006-12-12 16:48:15

by Jaswinder Singh Rajput

[permalink] [raw]
Subject: Re: Support 2.4 modules features in 2.6

On 12/12/06, Arjan van de Ven <[email protected]> wrote:
> On Tue, 2006-12-12 at 20:41 +0530, Jaswinder Singh wrote:
> > On 12/12/06, Arjan van de Ven <[email protected]> wrote:
> > > On Tue, 2006-12-12 at 19:36 +0530, Jaswinder Singh wrote:
> > > > Hello,
> > > >
> > > > I want to support old 2.4 modules features in 2.6 kernel modules:-
> > > > 1. no kernel source tree is required to build modules.
> > >
> > > this is a 2.6 not a 2.4 feature btw
> > >
> >
> > Really!! , Please let me know what is the procedure to build the
> > modules after deleting kernel linux-2.6*
>
> you only need include/* for this in 2.6
>
> you can't do this at all with 2.4 kernels, it needs the whole lot.
>
> (in both cases the code and headers are needed so that your module can
> use the data structures and compile in the kernel code you select to use
> from inlines)
> >
> >

Really!!

This is my Makefile :-
obj-m += hello-1.o

all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean


Now do one thing:-
# mv /lib/modules/$(uname -r)/build /lib/modules/$(uname -r)/build0

now make it.

If you want point to your header files in /usr/include and then try to build.

Regards,

Jaswinder Singh.

2006-12-13 00:23:30

by Matthias Schniedermeyer

[permalink] [raw]
Subject: Re: Support 2.4 modules features in 2.6

Jaswinder Singh wrote:
> Hello,
>
> I want to support old 2.4 modules features in 2.6 kernel modules:-
> 1. no kernel source tree is required to build modules.

I don't think that is possible.

There are a few "questions" that are quite fundamental when you want to
build a module that can be loaded by a given kernel.

About the most important fundamental "questions" i can think of ATM:
- UP/SMP
- Preempt yes/no
- RegParm yes/no
(x86)- High Memory off/4g/64G(IOW PAE yes/no)
And maybe a few more "not so fundamental" points.

AFAIK there is no way to build a module that would work in all of the
8/16 possible "kernel-types" you get with these 3/4 fundamental options
alone.





Bis denn

--
Real Programmers consider "what you see is what you get" to be just as
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated,
cryptic, powerful, unforgiving, dangerous.

2006-12-13 00:32:33

by Robert Hancock

[permalink] [raw]
Subject: Re: Support 2.4 modules features in 2.6

Jaswinder Singh wrote:
>> you only need include/* for this in 2.6
>>
>> you can't do this at all with 2.4 kernels, it needs the whole lot.
>>
>> (in both cases the code and headers are needed so that your module can
>> use the data structures and compile in the kernel code you select to use
>> from inlines)
>> >
>> >
>
> Really!!
>
> This is my Makefile :-
> obj-m += hello-1.o
>
> all:
> make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
>
> clean:
> make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
>
>
> Now do one thing:-
> # mv /lib/modules/$(uname -r)/build /lib/modules/$(uname -r)/build0
>
> now make it.

Of course you can't, there are no kernel header files left.

>
> If you want point to your header files in /usr/include and then try to
> build.

Those are userspace header files, not for building modules. They may
have worked in certain setups for doing this in the past but this was
never recommended. Current distributions no longer include any
kernel-internal headers in /usr/include anymore.

You do need at least a partial kernel source tree to build modules against.

--
Robert Hancock Saskatoon, SK, Canada
To email, remove "nospam" from [email protected]
Home Page: http://www.roberthancock.com/

2006-12-13 08:34:54

by Arjan van de Ven

[permalink] [raw]
Subject: Re: Support 2.4 modules features in 2.6


> > > Really!! , Please let me know what is the procedure to build the
> > > modules after deleting kernel linux-2.6*
> >
> > you only need include/* for this in 2.6
> >
> > you can't do this at all with 2.4 kernels, it needs the whole lot.
> >
> > (in both cases the code and headers are needed so that your module can
> > use the data structures and compile in the kernel code you select to use
> > from inlines)
> > >
> > >
>
> Really!!
>
> This is my Makefile :-
> obj-m += hello-1.o
>
> all:
> make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
>
> clean:
> make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
>
>
> Now do one thing:-
> # mv /lib/modules/$(uname -r)/build /lib/modules/$(uname -r)/build0
>
> now make it.
>
> If you want point to your header files in /usr/include and then try to build.

so you first copy a big chunk of your 2.4 source tree, delete the
original and then say "look it can compile without". Please be real and
honest :)

anyway I suggest that you answer the question on where the code is so
that we can help you....

--
if you want to mail me at work (you don't), use arjan (at) linux.intel.com
Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org