3rdparty modules for 2.5.53

3rdparty modules for 2.5.53

Post by Albert Kajaka » Thu, 02 Jan 2003 19:30:08



Hello!
I have a problem with compiling modules for 2.5.
i wrote a module for 2.4. For 2.5 (51,52,53) it compiles nicely, but insmod complains about invalid format. I have the latest module init tools of Rusty installed.  I'm usin gcc 3.2. Do i have to use any special compiler/linker options or defines or whatever to generate a working module ? what could be the problem ? Even a simple hello-world module doesnt work. Although, i have a working 2.5.53 modular kernel that was built using same tools.

best,
Al.
-- everyday.com --
Kuidas elad, Eesti tudeng?
Osale T?nis Paltsu esseekonkursil li?pilastele,
auhinnafond 10 000 kr. http://www.palts.ee/?id=756
H?id phi soovides, T?nis Palts

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

3rdparty modules for 2.5.53

Post by Sam Ravnbor » Thu, 02 Jan 2003 20:30:10



> Hello!
> I have a problem with compiling modules for 2.5.
> i wrote a module for 2.4. For 2.5 (51,52,53) it compiles nicely, but insmod complains about invalid format. I have the latest module init tools of Rusty installed.  I'm usin gcc 3.2. Do i have to use any special compiler/linker options or defines or whatever to generate a working module ? what could be the problem ? Even a simple hello-world module doesnt work. Although, i have a working 2.5.53 modular kernel that was built using same tools.

Try to folllow this reciept posted by Kai G.
-------------
Well, you can do

cd my_module
echo "obj-m := my_module.o" > Makefile
vi my_module.c
make -C <path/to/kernel/src> SUBDIRS=$PWD modules

That's not too bad (and basically works for 2.4 as well)
---------------

        Sam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

3rdparty modules for 2.5.53

Post by Andi Klee » Thu, 02 Jan 2003 21:00:11



> Hello!
> I have a problem with compiling modules for 2.5.

I recently tracked down the same problem.

Add a -DKBUILD_MODNAME="yourname" compile option to one of the files,
the new loader requires a module name section. It should be only set
once for each module.

In addition make sure you're using the new style module_init/module_exit
macros instead of init_module/cleanup_module.

-Andi

P.S.: I agree that the error reporting sucks for this one. It would
be better if the kernel loader give some kind of text message back.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

3rdparty modules for 2.5.53

Post by Albert Kajaka » Fri, 03 Jan 2003 00:40:05


Thanks!

it i postponed development for weeks just because i switched to 2.5 and i couldn't solve the stupid problem.

al.


>> Hello!
>> I have a problem with compiling modules for 2.5.

>I recently tracked down the same problem.

>Add a -DKBUILD_MODNAME="yourname" compile option to one of the files,
>the new loader requires a module name section. It should be only set
>once for each module.

>In addition make sure you're using the new style module_init/module_exit
>macros instead of init_module/cleanup_module.

>-Andi

>P.S.: I agree that the error reporting sucks for this one. It would
>be better if the kernel loader give some kind of text message back.

-- everyday.com --
Kuidas elad, Eesti tudeng?
Osale T?nis Paltsu esseekonkursil li?pilastele,
auhinnafond 10 000 kr. http://www.palts.ee/?id=756
H?id phi soovides, T?nis Palts

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

3rdparty modules for 2.5.53

Post by Bjoern A. Zee » Fri, 03 Jan 2003 00:40:05



[new modules thing]

Quote:> P.S.: I agree that the error reporting sucks for this one. It would
> be better if the kernel loader give some kind of text message back.

I think we mainly lack of documentation. anybody really followed and
understood this thing or perhaps the author ;-) should
write a/update modules.txt for 'module writers' not for users:

- how to update old style to new style; what needs to be changed ?
- what needs to be done to build own modules outside kernel tree ?
- skeleton for new modules
- dos and dont's

Did I miss s.th. ?

--
Bjoern A. Zeeb                          bzeeb at Zabbadoz dot NeT
56 69 73 69 74                          http://www.zabbadoz.net/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/