此内容已被标记为最终。 显示 1 回复
No one answered this query, but I figured it out and thought I'd mention what I did in case anyone else has this question later on. I had to do the following:
1) For the loadable module, wrap it with the structures for a "misc" module (.e.g. use "struct modlmisc"), complete with the init, fini, and _info device entry points.
2) In the driver that calls code from the loadable modules, add the following global variable:
char dependson = "misc/XXX";
where XXX is the name of your module file, and "misc" is the path from "/kernel".
3) Compile everything, put the loadable module's file in the right place on the target host (in this case "/kernel/misc" or "/kernel/misc/sparcv9").
When the main driver is installed, it will cause the loadable module to be automatically loaded, too, making all its functions available to the main driver.