Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    How to add a device to Linux kernel


    I am working on a platform where loadable module is not an option(for security reason). When the kernel boots, if I look into /dev, I assume it shows all the device that are compiled as part of the kernel. My question is, how to I add a device to the kernel? For example, gpio driver source code is available in the /linux/driver/gpio directly. What do I need to do so it will be compiled as part of the kernel and, when the kernel boots, I will see a gpio device in /dev?

    Thank you!
    Wei Xu

  2. #2
    Linux Guru
    Join Date
    Dec 2013
    Victoria, B.C. Canada

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    The link gregm provided is a starting point. If you run "make menuconfig" or "make xconfig", you can tell the kernel build system that some items / drivers are to be built directly into the kernel. You can also manually edit the .config file in your kernel source (root) directory to effect the same, as the menuconfig (text mode) or xconfig (gui mode) make targets generate configuration applications that when saved will update .config, assuming you have the appropriate sources and they can be built as integrated modules, and not loadable ones.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts