[ILUG] Modules in Kernel 2.6
Robert Fitzsimons
robfitz at 273k.net
Sun Jun 12 12:07:22 IST 2005
Hello Pritam
> 1. I have couple of symbols in mymodule.c to be
> exported. I added EXPORT_SYMBOL() with those symbols
> in my mymodule.c, but it does not help.
> Do I need to do something extra
> to export symbols which will be used my other existing
> modules?
Are the exported symbols defined in a header file, and is the header
file included in the second module?
Also do you have a correct makefile for a 2.6 kernel?
> 2. I could build mymodule.ko in my private directory
> ("/home/myname/mydir/mymodule.ko").
> How can I change the boot-up scripts to start my
> module
> automatically from my private directory?
As part of your makefile you can copy the modules into the correct
/lib/modules/`uname -r`/kernel directory, and then run "depmod -ae".
Or "depmod -e /home/myname/mydir/mymodule.ko othermodules..." might do
the same.
Then when you run "modprobe mymodule" from the boot-up script the
module and it's dependence's should be loaded.
Robert Fitzsimons
robfitz at 273k.net
More information about the ILUG
mailing list