I am trying to build a kernel module (.ko) out of a driver that doesn't have module configuration by default. I want to avoid having a built-in driver because I get firmware loading errors.

I did the following,

  1. Bt_driver.c:

  2. Menuconfig:

    obj-$(CONFIG_BT_DRI) := Bt_driver.o
  3. Kconfig:

    tristate "Bt Module " // So, I can select Y, N and M option
  4. defconfig


After the build was done, I didn't find a Bt_driver.ko module in the build location.

  • Thank you @Bodo for editing Oct 4, 2021 at 18:56
  • Without more details we cannot guess what's wrong. Please edit your question and show the commands that get executed when you try to build your module and the corresponding output or error message(s)
    – Bodo
    Oct 4, 2021 at 19:02

1 Answer 1


After adding module_init() and module_exit() you may need to add the module license: MODULE_LICENSE("GPL"), for example.

Unless the module will not be built (tainted).

If its still not building the loadable module kernel, try to build using your own Makefile (for this module).

  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Oct 6, 2021 at 7:00

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.