0

I am trying to build a kernel module for a commercial gadget which runs Linux 4.9.x. The kernel module that I build crashes the kernel. I believe this is because of wrong kernel configurations. I have tried different kernel configurations to no avail.

Regular ways of getting kernel configs (/boot/config.gz, requesting manufacturer for GPL code etc) do not work in this case. Also, the kernel is not built with CONFIG_IKCONFIG.

From this thread - What are methods for recovering a Linux Kernel config? - it looks like there is a way to recover kernel configs from /proc/kallsyms.

Can anybody shed light on this? How do kallsyms lead me to kernel configs? What kind of scripting do I need to use?

1
  • Have you tried modprobe configs? – rfmodulator Sep 24 '20 at 2:52
0

The kernel config is not the only thing which is required to compile additional modules.

You also need to know:

  • Whether and how it was patched.
  • What compiler was used to build it. If you're using a different compiler, ABI might change which will lead to your exact issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.