3rdparty modules for 2.5.53
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 p�hi soovides, T�nis Palts
Quoted 5 lines · Albert Kajakas
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
Quoted 2 lines · Albert Kajakas
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.
On 1 Jan 2003, Andi Kleen wrote:
[new modules thing]
Quoted 2 lines
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. ?
Signature · 2 lines
Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT 56 69 73 69 74 http://www.zabbadoz.net/