On Mon, 19 Sep 2016 10:58:35 -0400, Aruna Hewapathirane said:

> make menuconfig:
> An ncurses-based pseudo-graphical menu (only text input). Navigate through
> the menu to modify the
> desired options. Within menuconfig, use the / key to search modules by name.

Actually, / searches (in a case-insensitive manner, so feel free to
type in lower case) for CONFIG_WHATEVER variables, not modules.

The distinction is important for 2 reasons:

1) Sometimes, the config variable that controls building a module
isn't the uppercase version of the module name.  It's rare, but does
happen.  For example, a Fedora 4.3.0 kernel has 2,739 =m entries in its
.config.  Of those:

[/lib/modules/4.3.0-0.rc0.git14.1.fc24.x86_64] for i in `grep =m 
/boot/config-4.3.0-0.rc0.git14.1.fc24.x86_64 |  sed -e 's/^CONFIG_//' -e 
's/=m$//' | tr 'A-Z' 'a-z'`; do find . -name ${i}.ko.xz; done | wc -l
Only 531 are the lowercase of the config name.

[/lib/modules/4.3.0-0.rc0.git14.1.fc24.x86_64] for i in `grep =m 
/boot/config-4.3.0-0.rc0.git14.1.fc24.x86_64 |  sed -e 's/^CONFIG_//' -e 
's/=m$//' | tr '_A-Z' '-a-z'`; do find . -name ${i}.ko.xz; done | wc
And some more have underscores changed to dashes (CONFIG_FOO_BAR -> foo-bar.ko)

And the *majority* of them play games of one form or another:

obj-$(CONFIG_BATTERY_OLPC)      += olpc_battery.o
obj-$(CONFIG_BLK_DEV_LOOP)     += loop.o
obj-$(CONFIG_LOOPBACK_TARGET)        += tcm_loop.o
obj-$(CONFIG_NVME_TARGET_LOOP)           += nvme-loop.o

and so on...

2) It's also good for finding yes/no variables that don't control
building a module. For example:


> make defconfig:
> Generates a new config with default from the ARCH supplied defconfig file.
> Use this option to get back the
> default configuration file that came with the sources.

Actually, that *won't* get you back "the config that came with the sources".
If you look in a release source tarball from kernel.org, there *isn't* a
.config in there, you need to create one somehow (copying a distro .config
and then running 'make localmodconfig' is a popular choice).

And there's no guarantee that 'make defconfig' will re-create whatever
your distro shipped - in fact, it probably *won't* do so, because distros
rarely, if ever, ship a kernel that's built with a Linus-approved defconfig.

Attachment: pgpZgudLCqIvE.pgp
Description: PGP signature

Kernelnewbies mailing list

Reply via email to