aboutsummaryrefslogtreecommitdiff
path: root/modutils
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-10-05 10:17:08 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-10-05 10:17:08 +0000
commit7d219aab70e6951ab82c27c202cac05016696723 (patch)
tree4c0679bfa391f71aee9b51505a5d3dc8f60a0cf7 /modutils
parent8f8f268cfdecb4cabeb2e649a73afc7a485aeff5 (diff)
downloadbusybox-w32-7d219aab70e6951ab82c27c202cac05016696723.tar.gz
busybox-w32-7d219aab70e6951ab82c27c202cac05016696723.tar.bz2
busybox-w32-7d219aab70e6951ab82c27c202cac05016696723.zip
build system overhaul
Diffstat (limited to 'modutils')
-rw-r--r--modutils/Config.in62
-rw-r--r--modutils/Kbuild11
-rw-r--r--modutils/Makefile23
-rw-r--r--modutils/Makefile.in32
4 files changed, 42 insertions, 86 deletions
diff --git a/modutils/Config.in b/modutils/Config.in
index 8974fb795..b28c66d24 100644
--- a/modutils/Config.in
+++ b/modutils/Config.in
@@ -5,24 +5,24 @@
5 5
6menu "Linux Module Utilities" 6menu "Linux Module Utilities"
7 7
8config CONFIG_INSMOD 8config INSMOD
9 bool "insmod" 9 bool "insmod"
10 default n 10 default n
11 help 11 help
12 insmod is used to load specified modules in the running kernel. 12 insmod is used to load specified modules in the running kernel.
13 13
14config CONFIG_FEATURE_INSMOD_VERSION_CHECKING 14config FEATURE_INSMOD_VERSION_CHECKING
15 bool "Module version checking" 15 bool "Module version checking"
16 default n 16 default n
17 depends on CONFIG_INSMOD && CONFIG_FEATURE_2_4_MODULES 17 depends on INSMOD && FEATURE_2_4_MODULES
18 help 18 help
19 Support checking of versions for modules. This is used to 19 Support checking of versions for modules. This is used to
20 ensure that the kernel and module are made for each other. 20 ensure that the kernel and module are made for each other.
21 21
22config CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS 22config FEATURE_INSMOD_KSYMOOPS_SYMBOLS
23 bool "Add module symbols to kernel symbol table" 23 bool "Add module symbols to kernel symbol table"
24 default n 24 default n
25 depends on CONFIG_INSMOD && CONFIG_FEATURE_2_4_MODULES 25 depends on INSMOD && FEATURE_2_4_MODULES
26 help 26 help
27 By adding module symbols to the kernel symbol table, Oops messages 27 By adding module symbols to the kernel symbol table, Oops messages
28 occuring within kernel modules can be properly debugged. By enabling 28 occuring within kernel modules can be properly debugged. By enabling
@@ -30,20 +30,20 @@ config CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS
30 table for properly debugging support. If you are not interested in 30 table for properly debugging support. If you are not interested in
31 Oops messages from kernel modules, say N. 31 Oops messages from kernel modules, say N.
32 32
33config CONFIG_FEATURE_INSMOD_LOADINKMEM 33config FEATURE_INSMOD_LOADINKMEM
34 bool "In kernel memory optimization (uClinux only)" 34 bool "In kernel memory optimization (uClinux only)"
35 default n 35 default n
36 depends on CONFIG_INSMOD && CONFIG_FEATURE_2_4_MODULES 36 depends on INSMOD && FEATURE_2_4_MODULES
37 help 37 help
38 This is a special uClinux only memory optimization that lets insmod 38 This is a special uClinux only memory optimization that lets insmod
39 load the specified kernel module directly into kernel space, reducing 39 load the specified kernel module directly into kernel space, reducing
40 memory usage by preventing the need for two copies of the module 40 memory usage by preventing the need for two copies of the module
41 being loaded into memory. 41 being loaded into memory.
42 42
43config CONFIG_FEATURE_INSMOD_LOAD_MAP 43config FEATURE_INSMOD_LOAD_MAP
44 bool "Enable load map (-m) option" 44 bool "Enable load map (-m) option"
45 default n 45 default n
46 depends on CONFIG_INSMOD && CONFIG_FEATURE_2_4_MODULES 46 depends on INSMOD && FEATURE_2_4_MODULES
47 help 47 help
48 Enabling this, one would be able to get a load map 48 Enabling this, one would be able to get a load map
49 output on stdout. This makes kernel module debugging 49 output on stdout. This makes kernel module debugging
@@ -51,36 +51,36 @@ config CONFIG_FEATURE_INSMOD_LOAD_MAP
51 If you don't plan to debug kernel modules, you 51 If you don't plan to debug kernel modules, you
52 don't need this option. 52 don't need this option.
53 53
54config CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL 54config FEATURE_INSMOD_LOAD_MAP_FULL
55 bool "Symbols in load map" 55 bool "Symbols in load map"
56 default y 56 default y
57 depends on CONFIG_FEATURE_INSMOD_LOAD_MAP 57 depends on FEATURE_INSMOD_LOAD_MAP
58 help 58 help
59 Without this option, -m will only output section 59 Without this option, -m will only output section
60 load map. With this option, -m will also output 60 load map. With this option, -m will also output
61 symbols load map. 61 symbols load map.
62 62
63config CONFIG_RMMOD 63config RMMOD
64 bool "rmmod" 64 bool "rmmod"
65 default n 65 default n
66 help 66 help
67 rmmod is used to unload specified modules from the kernel. 67 rmmod is used to unload specified modules from the kernel.
68 68
69config CONFIG_LSMOD 69config LSMOD
70 bool "lsmod" 70 bool "lsmod"
71 default n 71 default n
72 help 72 help
73 lsmod is used to display a list of loaded modules. 73 lsmod is used to display a list of loaded modules.
74 74
75config CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT 75config FEATURE_LSMOD_PRETTY_2_6_OUTPUT
76 bool "lsmod pretty output for 2.6.x Linux kernels " 76 bool "lsmod pretty output for 2.6.x Linux kernels "
77 default n 77 default n
78 depends on CONFIG_LSMOD 78 depends on LSMOD
79 help 79 help
80 This option makes output format of lsmod adjusted to 80 This option makes output format of lsmod adjusted to
81 the format of module-init-tools for Linux kernel 2.6. 81 the format of module-init-tools for Linux kernel 2.6.
82 82
83config CONFIG_MODPROBE 83config MODPROBE
84 bool "modprobe" 84 bool "modprobe"
85 default n 85 default n
86 help 86 help
@@ -90,11 +90,11 @@ config CONFIG_MODPROBE
90 Note that in the state, modprobe does not understand multiple 90 Note that in the state, modprobe does not understand multiple
91 module options from the configuration file. See option below. 91 module options from the configuration file. See option below.
92 92
93config CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS 93config FEATURE_MODPROBE_MULTIPLE_OPTIONS
94 bool 94 bool
95 prompt "Multiple options parsing" if CONFIG_NITPICK 95 prompt "Multiple options parsing" if NITPICK
96 default y 96 default y
97 depends on CONFIG_MODPROBE 97 depends on MODPROBE
98 help 98 help
99 Allow modprobe to understand more than one option to pass to 99 Allow modprobe to understand more than one option to pass to
100 modules. 100 modules.
@@ -107,51 +107,51 @@ config CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS
107 Saying Y here is not a bad idea if you're not that short 107 Saying Y here is not a bad idea if you're not that short
108 on storage capacity. 108 on storage capacity.
109 109
110config CONFIG_FEATURE_MODPROBE_FANCY_ALIAS 110config FEATURE_MODPROBE_FANCY_ALIAS
111 bool 111 bool
112 prompt "Fancy alias parsing" if CONFIG_NITPICK 112 prompt "Fancy alias parsing" if NITPICK
113 default y 113 default y
114 depends on CONFIG_MODPROBE && CONFIG_FEATURE_2_6_MODULES 114 depends on MODPROBE && FEATURE_2_6_MODULES
115 help 115 help
116 Say 'y' here to enable parsing of aliases with underscore/dash 116 Say 'y' here to enable parsing of aliases with underscore/dash
117 mismatch between module name and file name, along with bus-specific 117 mismatch between module name and file name, along with bus-specific
118 aliases (such as pci:... or usb:... aliases). 118 aliases (such as pci:... or usb:... aliases).
119 119
120comment "Options common to multiple modutils" 120comment "Options common to multiple modutils"
121 depends on CONFIG_INSMOD || CONFIG_RMMOD || CONFIG_MODPROBE || CONFIG_LSMOD 121 depends on INSMOD || RMMOD || MODPROBE || LSMOD
122 122
123config CONFIG_FEATURE_CHECK_TAINTED_MODULE 123config FEATURE_CHECK_TAINTED_MODULE
124 # Simulate indentation 124 # Simulate indentation
125 bool "Support tainted module checking with new kernels" 125 bool "Support tainted module checking with new kernels"
126 default y 126 default y
127 depends on CONFIG_INSMOD || CONFIG_LSMOD 127 depends on INSMOD || LSMOD
128 help 128 help
129 Support checking for tainted modules. These are usually binary 129 Support checking for tainted modules. These are usually binary
130 only modules that will make the linux-kernel list ignore your 130 only modules that will make the linux-kernel list ignore your
131 support request. 131 support request.
132 This option is required to support GPLONLY modules. 132 This option is required to support GPLONLY modules.
133 133
134config CONFIG_FEATURE_2_4_MODULES 134config FEATURE_2_4_MODULES
135 # Simulate indentation 135 # Simulate indentation
136 bool "Support version 2.2.x to 2.4.x Linux kernels" 136 bool "Support version 2.2.x to 2.4.x Linux kernels"
137 default y 137 default y
138 depends on CONFIG_INSMOD || CONFIG_RMMOD 138 depends on INSMOD || RMMOD
139 help 139 help
140 Support module loading for 2.2.x and 2.4.x Linux kernels. 140 Support module loading for 2.2.x and 2.4.x Linux kernels.
141 141
142config CONFIG_FEATURE_2_6_MODULES 142config FEATURE_2_6_MODULES
143 # Simulate indentation 143 # Simulate indentation
144 bool "Support version 2.6.x Linux kernels" 144 bool "Support version 2.6.x Linux kernels"
145 default y 145 default y
146 depends on CONFIG_INSMOD || CONFIG_RMMOD || CONFIG_MODPROBE 146 depends on INSMOD || RMMOD || MODPROBE
147 help 147 help
148 Support module loading for newer 2.6.x Linux kernels. 148 Support module loading for newer 2.6.x Linux kernels.
149 149
150 150
151config CONFIG_FEATURE_QUERY_MODULE_INTERFACE 151config FEATURE_QUERY_MODULE_INTERFACE
152 bool 152 bool
153 default y 153 default y
154 depends on CONFIG_FEATURE_2_4_MODULES && !CONFIG_FEATURE_2_6_MODULES 154 depends on FEATURE_2_4_MODULES && !FEATURE_2_6_MODULES
155 155
156 156
157endmenu 157endmenu
diff --git a/modutils/Kbuild b/modutils/Kbuild
new file mode 100644
index 000000000..cff02b4f2
--- /dev/null
+++ b/modutils/Kbuild
@@ -0,0 +1,11 @@
1# Makefile for busybox
2#
3# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
4#
5# Licensed under the GPL v2, see the file LICENSE in this tarball.
6
7lib-y:=
8lib-$(CONFIG_INSMOD) += insmod.o
9lib-$(CONFIG_LSMOD) += lsmod.o
10lib-$(CONFIG_MODPROBE) += modprobe.o
11lib-$(CONFIG_RMMOD) += rmmod.o
diff --git a/modutils/Makefile b/modutils/Makefile
deleted file mode 100644
index 65090c5a2..000000000
--- a/modutils/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
1# Makefile for busybox
2#
3# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
4#
5# Licensed under the GPL v2, see the file LICENSE in this tarball.
6
7ifndef top_srcdir
8top_srcdir=..
9endif
10ifndef top_builddir
11top_builddir=..
12endif
13srcdir=$(top_srcdir)/modutils
14MODUTILS_DIR:=./
15include $(top_srcdir)/Rules.mak
16include $(top_builddir)/.config
17include Makefile.in
18all: $(libraries-y)
19-include $(top_builddir)/.depend
20
21clean:
22 rm -f *.o *.a $(AR_TARGET)
23
diff --git a/modutils/Makefile.in b/modutils/Makefile.in
deleted file mode 100644
index 5c7c9238e..000000000
--- a/modutils/Makefile.in
+++ /dev/null
@@ -1,32 +0,0 @@
1# Makefile for busybox
2#
3# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
4#
5# Licensed under the GPL v2, see the file LICENSE in this tarball.
6
7MODUTILS_AR:=modutils.a
8ifndef $(MODUTILS_DIR)
9MODUTILS_DIR:=$(top_builddir)/modutils/
10endif
11srcdir=$(top_srcdir)/modutils
12
13MODUTILS-y:=
14MODUTILS-$(CONFIG_INSMOD) += insmod.o
15MODUTILS-$(CONFIG_LSMOD) += lsmod.o
16MODUTILS-$(CONFIG_MODPROBE) += modprobe.o
17MODUTILS-$(CONFIG_RMMOD) += rmmod.o
18
19ifneq ($(strip $(MODUTILS-y)),)
20libraries-y+=$(MODUTILS_DIR)$(MODUTILS_AR)
21endif
22
23MODUTILS_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(MODUTILS-y))
24MODUTILS_SRC-a:=$(wildcard $(srcdir)/*.c)
25APPLET_SRC-y+=$(MODUTILS_SRC-y)
26APPLET_SRC-a+=$(MODUTILS_SRC-a)
27
28$(MODUTILS_DIR)$(MODUTILS_AR): $(patsubst %,$(MODUTILS_DIR)%, $(MODUTILS-y))
29 $(do_ar)
30
31$(MODUTILS_DIR)%.o: $(srcdir)/%.c
32 $(compile.c)