Step to build a built in kernel module?

device, driver, kernel, linux, module

Solution

I believe your question is similar to the question Compiling a driver as a part of a kernel, not as a module

The answer to that question mentioned modifying the kernel Makefiles to include your module object or directory.

In summary the steps are:

- Copy your driver source code directory under `<linux kernel src>/drivers`.

Edit the Makefile to add the line:

`obj-y += your_driver_dir`

Edit the Makefile in your driver directory to add the line:

`obj-y := your_driver.o`

Problem

I can build a loadable module and it is working with the application successfully. Now I'm trying to include this driver in kernel driver folder as a built-in driver. But when i tried this, there is no device file created in /dev folder. What are the necessary steps to do this built-in module ? Is there any modification needed in the existing module ? Thanks in advance

Original source

Related problems