How to make a built-in device driver in linux

后端 未结 2 707
再見小時候
再見小時候 2021-01-29 09:02

I know how to make loadable kernel modules in Linux. But i want that loadable kernel module to be a part of the kernel , and after booting that driver should automatically load,

2条回答
  •  梦毁少年i
    2021-01-29 10:05

    There are two ways to do for your query 1) building your module as statically compiled along with kernel(your source code should reside in kernel tree ),so while building build it static which come as a part of kernel, so when kernel boots your module will be loaded. 2)Same as above but while building build as dynamic loadable module so that wheneever required you can load it.

    to illustrate above concept you can try below link for simple helloworld example.

    http://www.agusbj.staff.ugm.ac.id/abjfile/Chap8.pdf

提交回复
热议问题