I compile a driver following the documentations. But when I try loading them via
insmod onebox_wlan_nongpl.ko
, I receive an error message:
insmod: Error: could not insert module onebox_wlan_nongpl.ko: Unknown symbol in module
I know this is due to wrong order of loading .ko
files but it does not tell me which module does it depend on. I would like to know what symbol is unknown to file the module that I should load first.
You can simply check the missing symbols in dmesg using
dmesg | tail
. If you want to check if the symbols are actually in your symbol table, check usingcat /proc/kallsyms | grep <function_name>
Similar issue: https://ubuntuforums.org/showthread.php?t=1360950To see which symbols are actually missing, look into the kernel log using
dmesg
. It will show you the exact symbols. If you wrote the kernel module yourself and it for example relies on a framework like the device mapping framework, the dependecy has to be loaded first. Here an example I ran into:I wrote a device mapper, which depends on the device mapping framework. On insertion, this happens:
Inspect the kernel log:
Inspect the loaded modules:
Insert the device mapping target driver:
Now insert the original module an the error is resolved.