0

I enabled a couple new kernel modules as loadable (m as opposed to builtin with y) but do not understand how the CONFIG maps to the .ko file.

modprobe CONFIG_MY_CONFIG
insmod CONFIG_MY_CONFIG
modprobe MY_CONFIG
insmod MY_CONFIG
artless noise
  • 21,212
  • 6
  • 68
  • 105
tarabyte
  • 17,837
  • 15
  • 76
  • 117

1 Answers1

0

Firstly, you need to find usage of CONFIG_<MYCONFIG> variable in one of Makefile's (except the top one). You may use grep utility for this (run from kernel source directory):

grep -r . --include Makefile -e "CONFIG_<MYCONFIG>"

Line with that usage normally looks like

obj-${CONFIG_<MYCONFIG>} += <driver>.o

Here <driver> is the name of the driver used by modprobe:

modprobe <driver>

For find exact path to the driver you may use --show-depends option for modprobe:

modprobe --show-depends <driver>

Makefile's used in Linux kernel are described in Documentation/kbuild/makefiles.txt.

Tsyvarev
  • 60,011
  • 17
  • 110
  • 153