简体   繁体   中英

How to configure for building a kernel module same as loaded one

I'm trying to modify one of the Linux kernel drivers.

But when I tried to insmod , the kernel keeps making "unknown symbol" error message.

I think I configured something different from the original for build. :(

So here is my question.

How can I configure the exact the same config as the original module?

Is there any way to configure easily for a certain kernel image?

There are two possibilities for this error:

  1. Unknown symbols suggests that you are using any symbol which can be FUNCTION or Variable in your Driver program that Kernel is not able to find while loading your module. when you do insmod of your driver, do dmesg and see what all Symbols, Kernel is not able to find. It could be possible that in your modification of the driver, you by mistake have used some variable or function which are not defined anywhere. Look for any 'extern variables' or any spelling mistakes in your modified code ;).

  2. Your Driver is dependent on some other module. Here, dependent meaning, there are few functions or variable which your driver is using which are loaded to Kernel by some other module. In that case, you have to load that module first and then your module.

Unknown symbols is not a config issue . Config issue would have given other error.

If you need more help on it, please paste the dmesg output here..

Regards.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM