<div dir="ltr">Hi, <div> This is the place where modprobe comes into play .If you have dependent module the on your module then it is recommended to use modprobe .</div><div>After compiling your module run :</div><div>1. depmod -a</div><div>2. modprobe mod1</div><div>3. modprobe mod2</div><div><br></div><div>And as far as i know CONFIG_MODVERSION is basically for the module signature according to which you can't directly insert a .ko file compiled in another system.<br><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 24 July 2015 at 11:19, Navy <span dir="ltr"><<a href="mailto:navych@126.com" target="_blank">navych@126.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<br>
To my understanding, EXPORT_SYMBOL() is used to export a symbol in<br>
kernel/modules. The the address of the all sysbols is in /proc/kallsyms.<br>
Only symbols exported by EXPORT_SYMBOL() is listed its CRC information<br>
in Module.symvers. So I think the CRC is the key to export a symbol.<br>
I do an experiment:<br>
<br>
---mdir<br>
|<br>
|---Mod1<br>
| |---mod1.c<br>
| |---Makefile<br>
|<br>
|---Mod2<br>
|---mod2.c<br>
|---Makefile<br>
<br>
mod1.c define function *void myfunc(void)* and exported by EXPORT_SYMBOL()<br>
and the CRC info is showed in Module.symvers. mod2.c reference *myfunc* and<br>
compiled successfully. BUT when mod2.ko is insmoded, "unknown symbol" is<br>
complained. mod2.ko CAN'T BE INSMOD.<br>
I solve this problem by the method in Documentation/kbuild/modules.txt and<br>
heard this is a bug from kernel 2.6.<br>
<br>
Why this bug is not be fixed?<br>
<br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" rel="noreferrer" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</blockquote></div><br></div>