遇到的問題
http://forum.ubuntu.org.cn/viewtopic.php?f=97&t=328032


http://ubuntuforums.org/showthread.php?t=1360950
add EXTRA_CFLAGS += -I${PWD}/include



http://bluequiet.blogspot.tw/2011/10/exportsymbolkernelkernel.html
EXPORT_SYMBOL定義的函數對全部kernel代碼公開,不用修改kernel code就可以在您的kernel模組中直接使用。您還可以手動修改kernel code来導出另外的函數,用於重新编譯並加戴新kernel後的測試。


Linux symbol export method:

[1] If we want export the symbol in a module, just use the EXPORT_SYMBOL(xxxx) in the C or H file.
And compile the module by adding the compile flag -DEXPORT_SYMTAB.
Then we can use the xxxx in the other module.


[2] If we want export some symbol in Kernel that is not in a module such as xxxx in the /arch/ppc/fec.c.
Firstly, define the xxxx in the fec.c;
Secondly, make a new file which contain the "extern" define the xxxx(for example, extern int xxxx);
Lastly, in the ppc_ksyms.c we includes the new file, and add the EXPORT_SYMBOL(xxxx).
Then we can use the xxxx.

ref:夜深人靜

BTW:
  • EXPORT_SYMBOL和EXPORT_SYMBOL_GPL共存,不知二者有何區别?
        ==>如果你module的協議不是GPL, 那麼EXPORT_SYMBOL_GPL導出的那些symbol,你就不能用 (= =")

  • 所有EXPORT_SYMBOL的變數函式都在  /proc/kallsyms  (2.6.32




http://blog.lexical.tw/2010/09/dkmskernelrelease.html

KERNELRELEASE變數



    全站熱搜

    立你斯 發表在 痞客邦 留言(0) 人氣()