Convert all modutils/* applets to "new style" applet definitions
No binary (build failed)
—
(log yok)
| @@ -7,117 +7,6 @@ menu "Linux Module Utilities" | |
| INSERT | |
| - | config MODPROBE_SMALL |
| - | bool "Simplified modutils" |
| - | default y |
| - | select PLATFORM_LINUX |
| - | help |
| - | Simplified modutils. |
| - | |
| - | With this option modprobe does not require modules.dep file |
| - | and does not use /etc/modules.conf file. |
| - | It scans module files in /lib/modules/`uname -r` and |
| - | determines dependencies and module alias names on the fly. |
| - | This may make module loading slower, most notably |
| - | when one needs to load module by alias (this requires |
| - | scanning through module _bodies_). |
| - | |
| - | At the first attempt to load a module by alias modprobe |
| - | will try to generate modules.dep.bb file in order to speed up |
| - | future loads by alias. Failure to do so (read-only /lib/modules, |
| - | etc) is not reported, and future modprobes will be slow too. |
| - | |
| - | NB: modules.dep.bb file format is not compatible |
| - | with modules.dep file as created/used by standard module tools. |
| - | |
| - | Additional module parameters can be stored in |
| - | /etc/modules/$module_name files. |
| - | |
| - | Apart from modprobe, other utilities are also provided: |
| - | - insmod is an alias to modprobe |
| - | - rmmod is an alias to modprobe -r |
| - | - depmod generates modules.dep.bb |
| - | |
| - | config FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE |
| - | bool "Accept module options on modprobe command line" |
| - | default y |
| - | depends on MODPROBE_SMALL |
| - | select PLATFORM_LINUX |
| - | help |
| - | Allow insmod and modprobe take module options from command line. |
| - | |
| - | config FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED |
| - | bool "Skip loading of already loaded modules" |
| - | default y |
| - | depends on MODPROBE_SMALL |
| - | help |
| - | Check if the module is already loaded. |
| - | |
| - | config INSMOD |
| - | bool "insmod" |
| - | default n |
| - | depends on !MODPROBE_SMALL |
| - | select PLATFORM_LINUX |
| - | help |
| - | insmod is used to load specified modules in the running kernel. |
| - | |
| - | config RMMOD |
| - | bool "rmmod" |
| - | default n |
| - | depends on !MODPROBE_SMALL |
| - | select PLATFORM_LINUX |
| - | help |
| - | rmmod is used to unload specified modules from the kernel. |
| - | |
| - | config LSMOD |
| - | bool "lsmod" |
| - | default n |
| - | depends on !MODPROBE_SMALL |
| - | select PLATFORM_LINUX |
| - | help |
| - | lsmod is used to display a list of loaded modules. |
| - | |
| - | config FEATURE_LSMOD_PRETTY_2_6_OUTPUT |
| - | bool "Pretty output" |
| - | default n |
| - | depends on LSMOD |
| - | select PLATFORM_LINUX |
| - | help |
| - | This option makes output format of lsmod adjusted to |
| - | the format of module-init-tools for Linux kernel 2.6. |
| - | Increases size somewhat. |
| - | |
| - | config MODPROBE |
| - | bool "modprobe" |
| - | default n |
| - | depends on !MODPROBE_SMALL |
| - | select PLATFORM_LINUX |
| - | help |
| - | Handle the loading of modules, and their dependencies on a high |
| - | level. |
| - | |
| - | config FEATURE_MODPROBE_BLACKLIST |
| - | bool "Blacklist support" |
| - | default n |
| - | depends on MODPROBE |
| - | select PLATFORM_LINUX |
| - | help |
| - | Say 'y' here to enable support for the 'blacklist' command in |
| - | modprobe.conf. This prevents the alias resolver to resolve |
| - | blacklisted modules. This is useful if you want to prevent your |
| - | hardware autodetection scripts to load modules like evdev, frame |
| - | buffer drivers etc. |
| - | |
| - | config DEPMOD |
| - | bool "depmod" |
| - | default n |
| - | depends on !MODPROBE_SMALL |
| - | select PLATFORM_LINUX |
| - | help |
| - | depmod generates modules.dep (and potentially modules.alias |
| - | and modules.symbols) that contain dependency information |
| - | for modprobe. |
| - | |
| comment "Options common to multiple modutils" | |
| config FEATURE_2_4_MODULES | |
| @@ -7,10 +7,3 @@ | |
| lib-y:= | |
| INSERT | |
| - | lib-$(CONFIG_MODPROBE_SMALL) += modprobe-small.o |
| - | lib-$(CONFIG_DEPMOD) += depmod.o modutils.o |
| - | lib-$(CONFIG_INSMOD) += insmod.o modutils.o |
| - | lib-$(CONFIG_LSMOD) += lsmod.o modutils.o |
| - | lib-$(CONFIG_MODPROBE) += modprobe.o modutils.o |
| - | lib-$(CONFIG_RMMOD) += rmmod.o modutils.o |
| - | lib-$(CONFIG_FEATURE_2_4_MODULES) += modutils-24.o |
| @@ -7,9 +7,20 @@ | |
| * | |
| * Licensed under GPLv2 or later, see file LICENSE in this source tree. | |
| */ | |
| + | //config:config DEPMOD |
| + | //config: bool "depmod" |
| + | //config: default n |
| + | //config: depends on !MODPROBE_SMALL |
| + | //config: select PLATFORM_LINUX |
| + | //config: help |
| + | //config: depmod generates modules.dep (and potentially modules.alias |
| + | //config: and modules.symbols) that contain dependency information |
| + | //config: for modprobe. |
| //applet:IF_DEPMOD(APPLET(depmod, BB_DIR_SBIN, BB_SUID_DROP)) | |
| + | //kbuild:lib-$(CONFIG_DEPMOD) += depmod.o modutils.o |
| + | |
| #include "libbb.h" | |
| #include "modutils.h" | |
| #include <sys/utsname.h> /* uname() */ | |
| @@ -6,9 +6,18 @@ | |
| * | |
| * Licensed under GPLv2 or later, see file LICENSE in this source tree. | |
| */ | |
| + | //config:config INSMOD |
| + | //config: bool "insmod" |
| + | //config: default n |
| + | //config: depends on !MODPROBE_SMALL |
| + | //config: select PLATFORM_LINUX |
| + | //config: help |
| + | //config: insmod is used to load specified modules in the running kernel. |
| //applet:IF_INSMOD(APPLET(insmod, BB_DIR_SBIN, BB_SUID_DROP)) | |
| + | //kbuild:lib-$(CONFIG_INSMOD) += insmod.o modutils.o |
| + | |
| #include "libbb.h" | |
| #include "modutils.h" | |
| @@ -7,9 +7,28 @@ | |
| * | |
| * Licensed under GPLv2 or later, see file LICENSE in this source tree. | |
| */ | |
| + | //config:config LSMOD |
| + | //config: bool "lsmod" |
| + | //config: default n |
| + | //config: depends on !MODPROBE_SMALL |
| + | //config: select PLATFORM_LINUX |
| + | //config: help |
| + | //config: lsmod is used to display a list of loaded modules. |
| + | //config: |
| + | //config:config FEATURE_LSMOD_PRETTY_2_6_OUTPUT |
| + | //config: bool "Pretty output" |
| + | //config: default n |
| + | //config: depends on LSMOD |
| + | //config: select PLATFORM_LINUX |
| + | //config: help |
| + | //config: This option makes output format of lsmod adjusted to |
| + | //config: the format of module-init-tools for Linux kernel 2.6. |
| + | //config: Increases size somewhat. |
| //applet:IF_LSMOD(APPLET(lsmod, BB_DIR_SBIN, BB_SUID_DROP)) | |
| + | //kbuild:lib-$(CONFIG_LSMOD) += lsmod.o modutils.o |
| + | |
| //usage:#if !ENABLE_MODPROBE_SMALL | |
| //usage:#define lsmod_trivial_usage | |
| //usage: "" | |
| @@ -7,6 +7,51 @@ | |
| * | |
| * Licensed under GPLv2, see file LICENSE in this source tree. | |
| */ | |
| + | //config:config MODPROBE_SMALL |
| + | //config: bool "Simplified modutils" |
| + | //config: default y |
| + | //config: select PLATFORM_LINUX |
| + | //config: help |
| + | //config: Simplified modutils. |
| + | //config: |
| + | //config: With this option modprobe does not require modules.dep file |
| + | //config: and does not use /etc/modules.conf file. |
| + | //config: It scans module files in /lib/modules/`uname -r` and |
| + | //config: determines dependencies and module alias names on the fly. |
| + | //config: This may make module loading slower, most notably |
| + | //config: when one needs to load module by alias (this requires |
| + | //config: scanning through module _bodies_). |
| + | //config: |
| + | //config: At the first attempt to load a module by alias modprobe |
| + | //config: will try to generate modules.dep.bb file in order to speed up |
| + | //config: future loads by alias. Failure to do so (read-only /lib/modules, |
| + | //config: etc) is not reported, and future modprobes will be slow too. |
| + | //config: |
| + | //config: NB: modules.dep.bb file format is not compatible |
| + | //config: with modules.dep file as created/used by standard module tools. |
| + | //config: |
| + | //config: Additional module parameters can be stored in |
| + | //config: /etc/modules/$module_name files. |
| + | //config: |
| + | //config: Apart from modprobe, other utilities are also provided: |
| + | //config: - insmod is an alias to modprobe |
| + | //config: - rmmod is an alias to modprobe -r |
| + | //config: - depmod generates modules.dep.bb |
| + | //config: |
| + | //config:config FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE |
| + | //config: bool "Accept module options on modprobe command line" |
| + | //config: default y |
| + | //config: depends on MODPROBE_SMALL |
| + | //config: select PLATFORM_LINUX |
| + | //config: help |
| + | //config: Allow insmod and modprobe take module options from command line. |
| + | //config: |
| + | //config:config FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED |
| + | //config: bool "Skip loading of already loaded modules" |
| + | //config: default y |
| + | //config: depends on MODPROBE_SMALL |
| + | //config: help |
| + | //config: Check if the module is already loaded. |
| //applet:IF_MODPROBE_SMALL(APPLET(modprobe, BB_DIR_SBIN, BB_SUID_DROP)) | |
| //applet:IF_MODPROBE_SMALL(APPLET_ODDNAME(depmod, modprobe, BB_DIR_SBIN, BB_SUID_DROP, depmod)) | |
| @@ -14,6 +59,8 @@ | |
| //applet:IF_MODPROBE_SMALL(APPLET_ODDNAME(lsmod, modprobe, BB_DIR_SBIN, BB_SUID_DROP, lsmod)) | |
| //applet:IF_MODPROBE_SMALL(APPLET_ODDNAME(rmmod, modprobe, BB_DIR_SBIN, BB_SUID_DROP, rmmod)) | |
| + | //kbuild:lib-$(CONFIG_MODPROBE_SMALL) += modprobe-small.o |
| + | |
| #include "libbb.h" | |
| /* After libbb.h, since it needs sys/types.h on some systems */ | |
| #include <sys/utsname.h> /* uname() */ | |
| @@ -7,9 +7,31 @@ | |
| * | |
| * Licensed under GPLv2 or later, see file LICENSE in this source tree. | |
| */ | |
| + | //config:config MODPROBE |
| + | //config: bool "modprobe" |
| + | //config: default n |
| + | //config: depends on !MODPROBE_SMALL |
| + | //config: select PLATFORM_LINUX |
| + | //config: help |
| + | //config: Handle the loading of modules, and their dependencies on a high |
| + | //config: level. |
| + | //config: |
| + | //config:config FEATURE_MODPROBE_BLACKLIST |
| + | //config: bool "Blacklist support" |
| + | //config: default n |
| + | //config: depends on MODPROBE |
| + | //config: select PLATFORM_LINUX |
| + | //config: help |
| + | //config: Say 'y' here to enable support for the 'blacklist' command in |
| + | //config: modprobe.conf. This prevents the alias resolver to resolve |
| + | //config: blacklisted modules. This is useful if you want to prevent your |
| + | //config: hardware autodetection scripts to load modules like evdev, frame |
| + | //config: buffer drivers etc. |
| //applet:IF_MODPROBE(APPLET(modprobe, BB_DIR_SBIN, BB_SUID_DROP)) | |
| + | //kbuild:lib-$(CONFIG_MODPROBE) += modprobe.o modutils.o |
| + | |
| #include "libbb.h" | |
| #include "modutils.h" | |
| #include <sys/utsname.h> | |
| @@ -58,6 +58,8 @@ | |
| * Licensed under GPLv2 or later, see file LICENSE in this source tree. | |
| */ | |
| + | //kbuild:lib-$(CONFIG_FEATURE_2_4_MODULES) += modutils-24.o |
| + | |
| #include "libbb.h" | |
| #include "modutils.h" | |
| #include <sys/utsname.h> | |
| @@ -7,9 +7,18 @@ | |
| * | |
| * Licensed under GPLv2 or later, see file LICENSE in this source tree. | |
| */ | |
| + | //config:config RMMOD |
| + | //config: bool "rmmod" |
| + | //config: default n |
| + | //config: depends on !MODPROBE_SMALL |
| + | //config: select PLATFORM_LINUX |
| + | //config: help |
| + | //config: rmmod is used to unload specified modules from the kernel. |
| //applet:IF_RMMOD(APPLET(rmmod, BB_DIR_SBIN, BB_SUID_DROP)) | |
| + | //kbuild:lib-$(CONFIG_RMMOD) += rmmod.o modutils.o |
| + | |
| //usage:#if !ENABLE_MODPROBE_SMALL | |
| //usage:#define rmmod_trivial_usage | |
| //usage: "[-wfa] [MODULE]..." | |