Difference Between Linux Loadable and Embedded Modules

What is the difference between loadable modules and built-in (statically linked) modules?

I got this question by finding out the answer to the difference between system calls subsys_initcall()andmodule_init()

+4
source share
1 answer

The Linux kernel supports the insertion of modules (aka device drivers) in two ways:

  • Built-in kernel modules . When the kernel boots, the kernel automatically inserts this driver into the kernel (it looks more like it is already part of the kernel code).
  • (LKM). , , insmod driver.ko modprobe driver.ko

, . , , . , , , (rmmod driver.ko modprobe -r driver.ko), . , - , ​​ .

:
, .config :

DRIVER_1=y // y indicate a builtin module
DRIVER_1=m //m inicates a loadable module

: lsmod dynamically loaded modules built-in.

: http://www.tldp.org/HOWTO/Module-HOWTO/x73.html

+11

Source: https://habr.com/ru/post/1535481/


All Articles