summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-05-09 16:12:17 +0000
committerRichard Purdie <richard@openedhand.com>2006-05-09 16:12:17 +0000
commit6b703b1c319c911e2ba7b0b0323b2f6b86b5f6ab (patch)
tree9de640ac84784e2457bce7e98b5ba44b5fc433c3
parent2622e938b2432d28d6964ef5afff2492b9f5a327 (diff)
downloadpoky-6b703b1c319c911e2ba7b0b0323b2f6b86b5f6ab.tar.gz
Sync kernel module utils with OE (needed for kernel.bbclass changes)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@376 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r--openembedded/packages/module-init-tools/files/depmod-byteswap.patch288
-rw-r--r--openembedded/packages/module-init-tools/files/soc.patch97
-rw-r--r--openembedded/packages/module-init-tools/module-init-tools-cross_3.2.2.bb1
-rw-r--r--openembedded/packages/module-init-tools/module-init-tools_3.2.2.bb8
-rw-r--r--openembedded/packages/modutils/modutils-cross_2.4.27.bb3
-rw-r--r--openembedded/packages/modutils/modutils_2.4.27.bb4
6 files changed, 9 insertions, 392 deletions
diff --git a/openembedded/packages/module-init-tools/files/depmod-byteswap.patch b/openembedded/packages/module-init-tools/files/depmod-byteswap.patch
deleted file mode 100644
index 1b46708b30..0000000000
--- a/openembedded/packages/module-init-tools/files/depmod-byteswap.patch
+++ /dev/null
@@ -1,288 +0,0 @@
1diff -u module-init-tools-3.1/orig/depmod.c module-init-tools-3.1/depmod.c
2--- module-init-tools-3.1/orig/depmod.c 2005-04-07 18:50:25.829635704 -0700
3+++ module-init-tools-3.1/depmod.c 2005-04-07 19:46:43.842099752 -0700
4@@ -17,6 +17,7 @@
5 #include <dirent.h>
6 #include <sys/utsname.h>
7 #include <sys/mman.h>
8+#include <endian.h>
9
10 #include "zlibsupport.h"
11 #include "depmod.h"
12@@ -303,16 +304,38 @@
13 goto fail;
14 }
15
16- switch (((char *)new->data)[EI_CLASS]) {
17- case ELFCLASS32:
18+ switch (((char *)new->data)[EI_CLASS] + (((char *)new->data)[EI_DATA] << 8)) {
19+ case ELFCLASS32 + (ELFDATA2LSB << 8): /* 32 bit little endian */
20+#if __BYTE_ORDER == __LITTLE_ENDIAN
21 new->ops = &mod_ops32;
22+#else
23+ new->ops = &mod_ops32swap;
24+#endif
25+ break;
26+ case ELFCLASS32 + (ELFDATA2MSB << 8): /* 32 bit big endian */
27+#if __BYTE_ORDER == __LITTLE_ENDIAN
28+ new->ops = &mod_ops32swap;
29+#else
30+ new->ops = &mod_ops32;
31+#endif
32 break;
33- case ELFCLASS64:
34+ case ELFCLASS64 + (ELFDATA2LSB << 8): /* 64 bit little endian */
35+#if __BYTE_ORDER == __LITTLE_ENDIAN
36 new->ops = &mod_ops64;
37+#else
38+ new->ops = &mod_ops64swap;
39+#endif
40+ break;
41+ case ELFCLASS64 + (ELFDATA2MSB << 8): /* 64 bit big endian */
42+#if __BYTE_ORDER == __LITTLE_ENDIAN
43+ new->ops = &mod_ops64swap;
44+#else
45+ new->ops = &mod_ops64;
46+#endif
47 break;
48 default:
49- warn("Module %s has elf unknown identifier %i\n",
50- new->pathname, ((char *)new->data)[EI_CLASS]);
51+ warn("Module %s has elf unknown identifier %i,%i\n",
52+ new->pathname, ((char *)new->data)[EI_CLASS], ((char *)new->data)[EI_DATA]);
53 goto fail;
54 }
55 return new;
56diff -u module-init-tools-3.1/orig/moduleops.c module-init-tools-3.1/moduleops.c
57--- module-init-tools-3.1/orig/moduleops.c 2005-04-07 18:50:25.829635704 -0700
58+++ module-init-tools-3.1/moduleops.c 2005-04-07 19:52:11.166338904 -0700
59@@ -9,15 +9,64 @@
60 #include "moduleops.h"
61 #include "tables.h"
62
63+/* This deals with both mis-aligned reads and endianness issues,
64+ * it may seem crude however the compiler knows 'size' at compile
65+ * time (because it comes from sizeof) therefore generates fairly
66+ * optimal code.
67+ */
68+static inline void read_native(const void *src, void *dest, unsigned int size)
69+{
70+ unsigned int i;
71+ for (i = 0; i < size; i++)
72+ ((unsigned char*)dest)[i] = ((unsigned char*)src)[i];
73+}
74+
75+#define NATIVE(x)\
76+({\
77+ typeof(x) __x;\
78+ read_native(&(x), &__x, sizeof __x);\
79+ __x;\
80+})
81+
82+static inline void read_swapped(const void *src, void *dest, unsigned int size)
83+{
84+ unsigned int i;
85+ for (i = 0; i < size; i++)
86+ ((unsigned char*)dest)[i] = ((unsigned char*)src)[size - i-1];
87+}
88+
89+#define SWAPPED(x)\
90+({\
91+ typeof(x) __x;\
92+ read_swapped(&(x), &__x, sizeof __x);\
93+ __x;\
94+})
95+
96+#define PERBITCOUNT(x) x##32
97 #define PERBIT(x) x##32
98 #define ElfPERBIT(x) Elf32_##x
99 #define ELFPERBIT(x) ELF32_##x
100+#define READ(x) NATIVE(x)
101+#include "moduleops_core.c"
102+#undef PERBIT
103+#undef READ
104+#define PERBIT(x) x##32swap
105+#define READ(x) SWAPPED(x)
106 #include "moduleops_core.c"
107
108+#undef PERBITCOUNT
109 #undef PERBIT
110 #undef ElfPERBIT
111 #undef ELFPERBIT
112+#undef READ
113+#define PERBITCOUNT(x) x##64
114 #define PERBIT(x) x##64
115 #define ElfPERBIT(x) Elf64_##x
116 #define ELFPERBIT(x) ELF64_##x
117+#define READ(x) NATIVE(x)
118+#include "moduleops_core.c"
119+#undef PERBIT
120+#undef READ
121+#define PERBIT(x) x##64swap
122+#define READ(x) SWAPPED(x)
123 #include "moduleops_core.c"
124diff -u module-init-tools-3.1/orig/moduleops.h module-init-tools-3.1/moduleops.h
125--- module-init-tools-3.1/orig/moduleops.h 2005-04-07 18:50:25.829635704 -0700
126+++ module-init-tools-3.1/moduleops.h 2005-04-07 19:36:26.184997904 -0700
127@@ -24,5 +24,6 @@
128 };
129
130 extern struct module_ops mod_ops32, mod_ops64;
131+extern struct module_ops mod_ops32swap, mod_ops64swap;
132
133 #endif /* MODINITTOOLS_MODULEOPS_H */
134diff -u module-init-tools-3.1/orig/moduleops_core.c module-init-tools-3.1/moduleops_core.c
135--- module-init-tools-3.1/orig/moduleops_core.c 2005-04-07 18:50:25.829635704 -0700
136+++ module-init-tools-3.1/moduleops_core.c 2005-04-07 19:56:18.794693672 -0700
137@@ -8,14 +8,14 @@
138 char *secnames;
139
140 /* Grab section headers and strings so we can tell who is who */
141- sechdrs = (void *)hdr + hdr->e_shoff;
142- secnames = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
143+ sechdrs = (void *)hdr + READ(hdr->e_shoff);
144+ secnames = (void *)hdr + READ(sechdrs[READ(hdr->e_shstrndx)].sh_offset);
145
146 /* Find the section they want */
147- for (i = 1; i < hdr->e_shnum; i++) {
148- if (strcmp(secnames+sechdrs[i].sh_name, secname) == 0) {
149- *size = sechdrs[i].sh_size;
150- return (void *)hdr + sechdrs[i].sh_offset;
151+ for (i = 1; i < READ(hdr->e_shnum); i++) {
152+ if (strcmp(secnames+READ(sechdrs[i].sh_name), secname) == 0) {
153+ *size = READ(sechdrs[i].sh_size);
154+ return (void *)hdr + READ(sechdrs[i].sh_offset);
155 }
156 }
157 *size = 0;
158@@ -24,7 +24,7 @@
159
160 static void PERBIT(load_symbols)(struct module *module)
161 {
162- struct PERBIT(kernel_symbol) *ksyms;
163+ struct PERBITCOUNT(kernel_symbol) *ksyms;
164 char *ksymstrings;
165 unsigned long i, size;
166
167@@ -58,10 +58,10 @@
168
169 /* Old-style. */
170 ksyms = PERBIT(load_section)(module->data, "__ksymtab", &size);
171- for (i = 0; i < size / sizeof(struct PERBIT(kernel_symbol)); i++)
172+ for (i = 0; i < size / sizeof(struct PERBITCOUNT(kernel_symbol)); i++)
173 add_symbol(ksyms[i].name, module);
174 ksyms = PERBIT(load_section)(module->data, "__gpl_ksymtab", &size);
175- for (i = 0; i < size / sizeof(struct PERBIT(kernel_symbol)); i++)
176+ for (i = 0; i < size / sizeof(struct PERBITCOUNT(kernel_symbol)); i++)
177 add_symbol(ksyms[i].name, module);
178 }
179
180@@ -100,16 +100,16 @@
181
182 hdr = module->data;
183 handle_register_symbols = 0;
184- if (hdr->e_machine == EM_SPARC ||
185- hdr->e_machine == EM_SPARCV9)
186+ if (READ(hdr->e_machine) == EM_SPARC ||
187+ READ(hdr->e_machine) == EM_SPARCV9)
188 handle_register_symbols = 1;
189
190 module->num_deps = 0;
191 module->deps = NULL;
192 for (i = 1; i < size / sizeof(syms[0]); i++) {
193- if (syms[i].st_shndx == SHN_UNDEF) {
194+ if (READ(syms[i].st_shndx) == SHN_UNDEF) {
195 /* Look for symbol */
196- const char *name = strings + syms[i].st_name;
197+ const char *name = strings + READ(syms[i].st_name);
198 struct module *owner;
199 int weak;
200
201@@ -118,11 +118,11 @@
202 variables, to avoid anyone else misusing
203 them. */
204 if (handle_register_symbols
205- && (ELFPERBIT(ST_TYPE)(syms[i].st_info)
206+ && (ELFPERBIT(ST_TYPE)(READ(syms[i].st_info))
207 == STT_REGISTER))
208 continue;
209
210- weak = ELFPERBIT(ST_BIND)(syms[i].st_info) == STB_WEAK;
211+ weak = ELFPERBIT(ST_BIND)(READ(syms[i].st_info)) == STB_WEAK;
212 owner = find_symbol(name, module->pathname, weak);
213 if (owner) {
214 if (verbose)
215@@ -143,7 +143,7 @@
216 ElfPERBIT(Sym) *syms;
217 ElfPERBIT(Shdr) *sechdrs;
218
219- sechdrs = (void *)hdr + hdr->e_shoff;
220+ sechdrs = (void *)hdr + READ(hdr->e_shoff);
221 strings = PERBIT(load_section)(hdr, ".strtab", &size);
222 syms = PERBIT(load_section)(hdr, ".symtab", &size);
223
224@@ -152,14 +152,14 @@
225 return NULL;
226
227 for (i = 0; i < size / sizeof(syms[0]); i++) {
228- if (strcmp(strings + syms[i].st_name, name) == 0) {
229+ if (strcmp(strings + READ(syms[i].st_name), name) == 0) {
230 /* In BSS? Happens for empty device tables on
231 * recent GCC versions. */
232- if (sechdrs[syms[i].st_shndx].sh_type == SHT_NOBITS)
233+ if (READ(sechdrs[READ(syms[i].st_shndx)].sh_type) == SHT_NOBITS)
234 return NULL;
235 return (void *)hdr
236- + sechdrs[syms[i].st_shndx].sh_offset
237- + syms[i].st_value;
238+ + READ(sechdrs[READ(syms[i].st_shndx)].sh_offset)
239+ + READ(syms[i].st_value);
240 }
241 }
242 return NULL;
243@@ -168,36 +168,36 @@
244 /* FIXME: Check size, unless we end up using aliases anyway --RR */
245 static void PERBIT(fetch_tables)(struct module *module)
246 {
247- module->pci_size = PERBIT(PCI_DEVICE_SIZE);
248+ module->pci_size = PERBITCOUNT(PCI_DEVICE_SIZE);
249 module->pci_table = PERBIT(deref_sym)(module->data,
250 "__mod_pci_device_table");
251
252- module->usb_size = PERBIT(USB_DEVICE_SIZE);
253+ module->usb_size = PERBITCOUNT(USB_DEVICE_SIZE);
254 module->usb_table = PERBIT(deref_sym)(module->data,
255 "__mod_usb_device_table");
256
257- module->ccw_size = PERBIT(CCW_DEVICE_SIZE);
258+ module->ccw_size = PERBITCOUNT(CCW_DEVICE_SIZE);
259 module->ccw_table = PERBIT(deref_sym)(module->data,
260 "__mod_ccw_device_table");
261
262- module->ieee1394_size = PERBIT(IEEE1394_DEVICE_SIZE);
263+ module->ieee1394_size = PERBITCOUNT(IEEE1394_DEVICE_SIZE);
264 module->ieee1394_table = PERBIT(deref_sym)(module->data,
265 "__mod_ieee1394_device_table");
266
267- module->pnp_size = PERBIT(PNP_DEVICE_SIZE);
268+ module->pnp_size = PERBITCOUNT(PNP_DEVICE_SIZE);
269 module->pnp_table = PERBIT(deref_sym)(module->data,
270 "__mod_pnp_device_table");
271
272- module->pnp_card_size = PERBIT(PNP_CARD_DEVICE_SIZE);
273+ module->pnp_card_size = PERBITCOUNT(PNP_CARD_DEVICE_SIZE);
274 module->pnp_card_table = PERBIT(deref_sym)(module->data,
275 "__mod_pnp_card_device_table");
276- module->pnp_card_offset = PERBIT(PNP_CARD_DEVICE_OFFSET);
277+ module->pnp_card_offset = PERBITCOUNT(PNP_CARD_DEVICE_OFFSET);
278
279- module->input_size = PERBIT(INPUT_DEVICE_SIZE);
280+ module->input_size = PERBITCOUNT(INPUT_DEVICE_SIZE);
281 module->input_table = PERBIT(deref_sym)(module->data,
282 "__mod_input_device_table");
283
284- module->soc_size = PERBIT(SOC_DEVICE_SIZE);
285+ module->soc_size = PERBITCOUNT(SOC_DEVICE_SIZE);
286 module->soc_table = PERBIT(deref_sym)(module->data,
287 "__mod_soc_device_table");
288
diff --git a/openembedded/packages/module-init-tools/files/soc.patch b/openembedded/packages/module-init-tools/files/soc.patch
deleted file mode 100644
index ee5f11042f..0000000000
--- a/openembedded/packages/module-init-tools/files/soc.patch
+++ /dev/null
@@ -1,97 +0,0 @@
1--- tables.c~ 2003-12-24 05:23:38.000000000 +0000
2+++ tables.c 2005-04-02 13:12:24.370140112 +0100
3@@ -18,6 +18,34 @@
4 }
5
6 /* We set driver_data to zero */
7+static void output_soc_entry(struct soc_device_id *soc, char *name, FILE *out)
8+{
9+ fprintf(out,
10+ "%-20s 0x%08x 0x0\n",
11+ name,
12+ soc->id);
13+}
14+
15+void output_soc_table(struct module *modules, FILE *out)
16+{
17+ struct module *i;
18+
19+ fprintf(out, "# soc module id driver_data\n");
20+
21+ for (i = modules; i; i = i->next) {
22+ struct soc_device_id *e;
23+ char shortname[strlen(i->pathname) + 1];
24+
25+ if (!i->soc_table)
26+ continue;
27+
28+ make_shortname(shortname, i->pathname);
29+ for (e = i->soc_table; e->id; e = (void *)e + i->soc_size)
30+ output_soc_entry(e, shortname, out);
31+ }
32+}
33+
34+/* We set driver_data to zero */
35 static void output_pci_entry(struct pci_device_id *pci, char *name, FILE *out)
36 {
37 fprintf(out,
38--- tables.h~ 2003-12-24 05:18:54.000000000 +0000
39+++ tables.h 2005-04-02 13:05:15.269373344 +0100
40@@ -116,6 +116,15 @@
41 #define INPUT_DEVICE_SIZE32 (4 + 4 * 2 + 4 + 16 * 4 + 4 + 2 * 4 + 4 + 4 + 4 + 4 * 4 + 4)
42 #define INPUT_DEVICE_SIZE64 (8 + 4 * 2 + 8 + 8 * 8 + 8 + 8 + 8 + 8 + 8 + 2 * 8 + 8)
43
44+#include <stdint.h>
45+
46+typedef struct soc_device_id {
47+ uint32_t id;
48+} soc_device_id;
49+
50+#define SOC_DEVICE_SIZE32 (4 + 4)
51+#define SOC_DEVICE_SIZE64 (4 + 8)
52+
53 /* Functions provided by tables.c */
54 struct module;
55 void output_usb_table(struct module *modules, FILE *out);
56@@ -124,5 +133,6 @@
57 void output_ccw_table(struct module *modules, FILE *out);
58 void output_isapnp_table(struct module *modules, FILE *out);
59 void output_input_table(struct module *modules, FILE *out);
60+void output_soc_table(struct module *modules, FILE *out);
61
62 #endif /* MODINITTOOLS_TABLES_H */
63--- moduleops_core.c~ 2004-08-12 06:08:35.000000000 +0100
64+++ moduleops_core.c 2005-04-02 13:04:13.367783816 +0100
65@@ -196,6 +196,11 @@
66 module->input_size = PERBIT(INPUT_DEVICE_SIZE);
67 module->input_table = PERBIT(deref_sym)(module->data,
68 "__mod_input_device_table");
69+
70+ module->soc_size = PERBIT(SOC_DEVICE_SIZE);
71+ module->soc_table = PERBIT(deref_sym)(module->data,
72+ "__mod_soc_device_table");
73+
74 }
75
76 struct module_ops PERBIT(mod_ops) = {
77--- depmod.h~ 2003-12-24 02:10:57.000000000 +0000
78+++ depmod.h 2005-04-02 13:03:19.006048056 +0100
79@@ -47,6 +47,8 @@
80 void *pnp_card_table;
81 unsigned int input_size;
82 void *input_table;
83+ unsigned int soc_size;
84+ void *soc_table;
85
86 /* File contents and length. */
87 void *data;
88--- depmod.c~ 2005-02-14 04:50:51.744716656 +0000
89+++ depmod.c 2005-04-02 13:03:37.051304760 +0100
90@@ -683,6 +683,7 @@
91 { "modules.ieee1394map", output_ieee1394_table },
92 { "modules.isapnpmap", output_isapnp_table },
93 { "modules.inputmap", output_input_table },
94+ { "modules.socmap", output_soc_table },
95 { "modules.alias", output_aliases },
96 { "modules.symbols", output_symbols },
97 };
diff --git a/openembedded/packages/module-init-tools/module-init-tools-cross_3.2.2.bb b/openembedded/packages/module-init-tools/module-init-tools-cross_3.2.2.bb
index 4bcc311709..fc8b461945 100644
--- a/openembedded/packages/module-init-tools/module-init-tools-cross_3.2.2.bb
+++ b/openembedded/packages/module-init-tools/module-init-tools-cross_3.2.2.bb
@@ -8,6 +8,7 @@ EXTRA_OECONF_append = " --program-prefix=${TARGET_PREFIX}"
8 8
9do_stage () { 9do_stage () {
10 oe_runmake install 10 oe_runmake install
11 mv ${bindir}/${TARGET_PREFIX}depmod ${bindir}/${TARGET_PREFIX}depmod-2.6
11} 12}
12 13
13do_install () { 14do_install () {
diff --git a/openembedded/packages/module-init-tools/module-init-tools_3.2.2.bb b/openembedded/packages/module-init-tools/module-init-tools_3.2.2.bb
index bbd8cca1bf..727bfaac1b 100644
--- a/openembedded/packages/module-init-tools/module-init-tools_3.2.2.bb
+++ b/openembedded/packages/module-init-tools/module-init-tools_3.2.2.bb
@@ -3,7 +3,7 @@ removing kernel modules for Linux (versions 2.5.48 and above). It serves \
3the same function that the modutils package serves for Linux 2.4." 3the same function that the modutils package serves for Linux 2.4."
4LICENSE = "GPL" 4LICENSE = "GPL"
5SECTION = "base" 5SECTION = "base"
6PR = "r0" 6PR = "r2"
7 7
8PACKAGES =+ "module-init-tools-insmod-static module-init-tools-depmod" 8PACKAGES =+ "module-init-tools-insmod-static module-init-tools-depmod"
9RDEPENDS_${PN} += "module-init-tools-depmod" 9RDEPENDS_${PN} += "module-init-tools-depmod"
@@ -34,7 +34,7 @@ do_install() {
34 34
35pkg_postinst_module-init-tools() { 35pkg_postinst_module-init-tools() {
36#!/bin/sh 36#!/bin/sh
37for f in sbin/insmod sbin/modprobe sbin/rmmod sbin/depmod sbin/modinfo; do 37for f in sbin/insmod sbin/modprobe sbin/rmmod sbin/modinfo; do
38bn=`basename $f` 38bn=`basename $f`
39 update-alternatives --install /$f $bn /$f.26 60 39 update-alternatives --install /$f $bn /$f.26 60
40done 40done
@@ -44,7 +44,7 @@ update-alternatives --install /sbin/lsmod lsmod /bin/lsmod.26 60
44 44
45pkg_prerm_module-init-tools() { 45pkg_prerm_module-init-tools() {
46#!/bin/sh 46#!/bin/sh
47for f in sbin/insmod sbin/modprobe sbin/rmmod sbin/depmod sbin/modinfo; do 47for f in sbin/insmod sbin/modprobe sbin/rmmod sbin/modinfo; do
48bn=`basename $f` 48bn=`basename $f`
49 update-alternatives --remove $bn /$f.26 49 update-alternatives --remove $bn /$f.26
50done 50done
@@ -57,7 +57,7 @@ pkg_postinst_module-init-tools-depmod() {
57update-alternatives --install /sbin/depmod depmod /sbin/depmod.26 60 57update-alternatives --install /sbin/depmod depmod /sbin/depmod.26 60
58} 58}
59 59
60pkg_prerm_module-init-tools() { 60pkg_prerm_module-init-tools-depmod() {
61#!/bin/sh 61#!/bin/sh
62update-alternatives --remove depmod /sbin/depmod.26 62update-alternatives --remove depmod /sbin/depmod.26
63} 63}
diff --git a/openembedded/packages/modutils/modutils-cross_2.4.27.bb b/openembedded/packages/modutils/modutils-cross_2.4.27.bb
index 2b301d7d09..834f13adbd 100644
--- a/openembedded/packages/modutils/modutils-cross_2.4.27.bb
+++ b/openembedded/packages/modutils/modutils-cross_2.4.27.bb
@@ -1,6 +1,6 @@
1SECTION = "base" 1SECTION = "base"
2include modutils_${PV}.bb 2include modutils_${PV}.bb
3PR = "r6" 3PR = "r8"
4inherit cross 4inherit cross
5S = "${WORKDIR}/modutils-${PV}" 5S = "${WORKDIR}/modutils-${PV}"
6DEPENDS = "" 6DEPENDS = ""
@@ -19,6 +19,7 @@ CFLAGS_prepend_mipseb = "-D__MIPSEB__"
19 19
20do_stage () { 20do_stage () {
21 oe_runmake install 21 oe_runmake install
22 mv ${bindir}/${TARGET_PREFIX}depmod ${bindir}/${TARGET_PREFIX}depmod-2.4
22} 23}
23 24
24do_install () { 25do_install () {
diff --git a/openembedded/packages/modutils/modutils_2.4.27.bb b/openembedded/packages/modutils/modutils_2.4.27.bb
index 9fa7cef105..56420f7de0 100644
--- a/openembedded/packages/modutils/modutils_2.4.27.bb
+++ b/openembedded/packages/modutils/modutils_2.4.27.bb
@@ -39,10 +39,10 @@ for f in sbin/insmod sbin/modprobe sbin/rmmod bin/lsmod; do
39done 39done
40if test -n "$D"; then 40if test -n "$D"; then
41 D="-r $D" 41 D="-r $D"
42 if test -n "`which ${TARGET_PREFIX}depmod`"; then 42 if test -n "`which ${TARGET_PREFIX}depmod-2.4`"; then
43 for kerneldir in `ls -p ${IMAGE_ROOTFS}/lib/modules|grep /`; do 43 for kerneldir in `ls -p ${IMAGE_ROOTFS}/lib/modules|grep /`; do
44 kernelver=`basename $kerneldir` 44 kernelver=`basename $kerneldir`
45 ${TARGET_PREFIX}depmod -a -b ${IMAGE_ROOTFS} -C ${IMAGE_ROOTFS}/${sysconfdir}/modules.conf -r $kernelver 45 ${TARGET_PREFIX}depmod-2.4 -a -b ${IMAGE_ROOTFS} -C ${IMAGE_ROOTFS}/${sysconfdir}/modules.conf -r $kernelver
46 done 46 done
47 fi 47 fi
48fi 48fi