summaryrefslogtreecommitdiffstats
path: root/meta/packages/modutils
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
committerRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
commitb2f192faabe412adce79534e22efe9fb69ee40e2 (patch)
tree7076c49d4286f8a1733650bd8fbc7161af200d57 /meta/packages/modutils
parent2cf0eadf9f730027833af802d7e6c90b44248f80 (diff)
downloadpoky-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.gz
Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/modutils')
-rw-r--r--meta/packages/modutils/files/armeb.patch14
-rw-r--r--meta/packages/modutils/files/configure.patch33
-rw-r--r--meta/packages/modutils/files/gcc4.patch66
-rw-r--r--meta/packages/modutils/files/ipaq-pxa-2.6/modules18
-rw-r--r--meta/packages/modutils/files/ipaq-pxa-2.6/modules.conf1
-rw-r--r--meta/packages/modutils/files/lex.l.diff33
-rw-r--r--meta/packages/modutils/files/mnci/modules1
-rw-r--r--meta/packages/modutils/files/mnci/modules-ramses1
-rw-r--r--meta/packages/modutils/files/mnci/modules.conf20
-rwxr-xr-xmeta/packages/modutils/files/mnci/modutils.sh10
-rw-r--r--meta/packages/modutils/files/modules0
-rw-r--r--meta/packages/modutils/files/modules.conf0
-rw-r--r--meta/packages/modutils/files/modutils-notest.patch14
-rwxr-xr-xmeta/packages/modutils/files/modutils.sh27
-rw-r--r--meta/packages/modutils/files/mtx-1/modules3
-rw-r--r--meta/packages/modutils/files/omap1610h2/modules0
-rw-r--r--meta/packages/modutils/files/omap1610h2/modules.conf0
-rw-r--r--meta/packages/modutils/files/poodle/modules3
-rw-r--r--meta/packages/modutils/files/poodle/modules.conf4
-rw-r--r--meta/packages/modutils/files/program_prefix.patch69
-rw-r--r--meta/packages/modutils/files/tosa/modules4
-rw-r--r--meta/packages/modutils/files/tosa/modules.conf4
-rw-r--r--meta/packages/modutils/files/wrt54/modules4
-rw-r--r--meta/packages/modutils/modutils-collateral.bb16
-rw-r--r--meta/packages/modutils/modutils-cross/module.h.diff33
-rw-r--r--meta/packages/modutils/modutils-cross_2.4.27.bb27
-rw-r--r--meta/packages/modutils/modutils-initscripts.bb18
-rw-r--r--meta/packages/modutils/modutils_2.4.27.bb88
28 files changed, 511 insertions, 0 deletions
diff --git a/meta/packages/modutils/files/armeb.patch b/meta/packages/modutils/files/armeb.patch
new file mode 100644
index 0000000000..a26a3a24eb
--- /dev/null
+++ b/meta/packages/modutils/files/armeb.patch
@@ -0,0 +1,14 @@
1--- modutils-2.4.27/include/elf_arm.h.orig 2004-09-21 18:37:00.000000000 -0400
2+++ modutils-2.4.27/include/elf_arm.h 2004-09-21 18:38:18.000000000 -0400
3@@ -1,7 +1,11 @@
4 /* Machine-specific elf macros for ARM. */
5
6 #define ELFCLASSM ELFCLASS32
7+#ifdef __ARMEB__
8+#define ELFDATAM ELFDATA2MSB
9+#else
10 #define ELFDATAM ELFDATA2LSB
11+#endif
12
13 #define MATCH_MACHINE(x) (x == EM_ARM)
14
diff --git a/meta/packages/modutils/files/configure.patch b/meta/packages/modutils/files/configure.patch
new file mode 100644
index 0000000000..cdf501593f
--- /dev/null
+++ b/meta/packages/modutils/files/configure.patch
@@ -0,0 +1,33 @@
1
2#
3# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
4#
5
6--- modutils-2.4.25/./configure.in~configure
7+++ modutils-2.4.25/./configure.in
8@@ -1,4 +1,5 @@
9-AC_INIT(insmod/insmod.c)
10+AC_INIT
11+AC_CONFIG_SRCDIR([insmod/insmod.c])
12 AC_PREFIX_DEFAULT(/usr)
13
14 # Canonical system uses CC_FOR_BUILD while Linux may use BUILDCC
15@@ -15,7 +16,7 @@
16 BUILDCC="$CC_FOR_BUILD"
17 export CC_FOR_BUILD
18
19-AC_CANONICAL_SYSTEM
20+AC_CANONICAL_TARGET([])
21
22 # Handle target_cpu for compatibility.
23 if test "$host_cpu" != "$target_cpu"; then
24@@ -350,6 +351,7 @@
25 fi
26 fi
27
28-AC_OUTPUT(Makefile Makefile.common depmod/Makefile genksyms/Makefile
29+AC_CONFIG_FILES([Makefile Makefile.common depmod/Makefile genksyms/Makefile
30 insmod/Makefile $kerneld_Makefiles obj/Makefile util/Makefile
31- man/Makefile)
32+ man/Makefile])
33+AC_OUTPUT
diff --git a/meta/packages/modutils/files/gcc4.patch b/meta/packages/modutils/files/gcc4.patch
new file mode 100644
index 0000000000..e204898f05
--- /dev/null
+++ b/meta/packages/modutils/files/gcc4.patch
@@ -0,0 +1,66 @@
1--- modutils-2.4.27/depmod/depmod.c.old 2005-06-05 23:25:28.000000000 +0100
2+++ modutils-2.4.27/depmod/depmod.c 2005-06-05 23:25:38.000000000 +0100
3@@ -1133,7 +1133,7 @@
4
5 for (ksym = ksyms; so_far < nksyms; ++so_far, ksym++) {
6 if (strncmp((char *)ksym->name, "GPLONLY_", 8) == 0)
7- ((char *)ksym->name) += 8;
8+ ksym->name += 8;
9 assert(n_syms < MAX_MAP_SYM);
10 symtab[n_syms++] = addsym((char *)ksym->name, mod, SYM_DEFINED, 0);
11 }
12--- modutils-2.4.27/genksyms/genksyms.c.old 2005-06-05 23:24:16.000000000 +0100
13+++ modutils-2.4.27/genksyms/genksyms.c 2005-06-05 23:24:35.000000000 +0100
14@@ -45,7 +45,7 @@
15 int flag_debug, flag_dump_defs, flag_warnings;
16 int checksum_version = 1, kernel_version = version(2,0,0);
17
18-static int errors;
19+int errors;
20 static int nsyms;
21
22 static struct symbol *expansion_trail;
23--- modutils-2.4.27/insmod/insmod.c.old 2005-06-05 23:21:47.000000000 +0100
24+++ modutils-2.4.27/insmod/insmod.c 2005-06-05 23:22:34.000000000 +0100
25@@ -275,7 +275,7 @@
26 if (strncmp((char *)s->name, "GPLONLY_", 8) == 0) {
27 gplonly_seen = 1;
28 if (gpl)
29- ((char *)s->name) += 8;
30+ s->name += 8;
31 else
32 continue;
33 }
34--- modutils-2.4.27/obj/obj_kallsyms.c.old 2005-06-05 23:20:08.000000000 +0100
35+++ modutils-2.4.27/obj/obj_kallsyms.c 2005-06-05 23:20:24.000000000 +0100
36@@ -200,7 +200,7 @@
37
38 /* Initial contents, header + one entry per input section. No strings. */
39 osec->header.sh_size = sizeof(*a_hdr) + loaded*sizeof(*a_sec);
40- a_hdr = (struct kallsyms_header *) osec->contents =
41+ a_hdr = osec->contents =
42 xmalloc(osec->header.sh_size);
43 memset(osec->contents, 0, osec->header.sh_size);
44 a_hdr->size = sizeof(*a_hdr);
45@@ -275,7 +275,7 @@
46 a_hdr->symbol_off +
47 a_hdr->symbols*a_hdr->symbol_size +
48 strings_size - strings_left;
49- a_hdr = (struct kallsyms_header *) osec->contents =
50+ a_hdr = osec->contents =
51 xrealloc(a_hdr, a_hdr->total_size);
52 p = (char *)a_hdr + a_hdr->symbol_off;
53 memcpy(p, symbols, a_hdr->symbols*a_hdr->symbol_size);
54--- modutils-2.4.27/obj/obj_mips.c.orig 2003-04-05 00:47:17.000000000 +0200
55+++ modutils-2.4.27/obj/obj_mips.c 2005-07-21 12:51:48.000000000 +0200
56@@ -244,7 +244,9 @@
57 archdata_sec->header.sh_size = 0;
58 sec = obj_find_section(f, "__dbe_table");
59 if (sec) {
60- ad = (struct archdata *) (archdata_sec->contents) = xmalloc(sizeof(*ad));
61+/* ad = (struct archdata *) (archdata_sec->contents) = xmalloc(sizeof(*ad));*/
62+ archdata_sec->contents = xmalloc(sizeof(*ad));
63+ ad = (struct archdata *) (archdata_sec->contents);
64 memset(ad, 0, sizeof(*ad));
65 archdata_sec->header.sh_size = sizeof(*ad);
66 ad->__start___dbe_table = sec->header.sh_addr;
diff --git a/meta/packages/modutils/files/ipaq-pxa-2.6/modules b/meta/packages/modutils/files/ipaq-pxa-2.6/modules
new file mode 100644
index 0000000000..ca99e71df0
--- /dev/null
+++ b/meta/packages/modutils/files/ipaq-pxa-2.6/modules
@@ -0,0 +1,18 @@
1mq11xx_base
2soc-device
3h2200_lcd
4h4000_lcd
5cfbcopyarea
6cfbfillrect
7cfbimgblt
8mq1100fb
9pxafb
10lcd
11backlight
12font
13fbcon
14pxa2xx_udc
15g_ether
16sunrpc
17lockd
18nfs
diff --git a/meta/packages/modutils/files/ipaq-pxa-2.6/modules.conf b/meta/packages/modutils/files/ipaq-pxa-2.6/modules.conf
new file mode 100644
index 0000000000..ef2e561e89
--- /dev/null
+++ b/meta/packages/modutils/files/ipaq-pxa-2.6/modules.conf
@@ -0,0 +1 @@
# Add ipaq-pxa-2.6 modules parameters and aliases here
diff --git a/meta/packages/modutils/files/lex.l.diff b/meta/packages/modutils/files/lex.l.diff
new file mode 100644
index 0000000000..65904b6b02
--- /dev/null
+++ b/meta/packages/modutils/files/lex.l.diff
@@ -0,0 +1,33 @@
1--- modutils-2.4.26.orig/genksyms/lex.l
2+++ modutils-2.4.26/genksyms/lex.l
3@@ -130,6 +130,7 @@
4
5 static int suppress_type_lookup, dont_want_brace_phrase;
6 static struct string_list *next_node;
7+ static int next_token = 0;
8
9 int token, count = 0;
10 struct string_list *cur_node;
11@@ -144,7 +145,12 @@
12 }
13
14 repeat:
15- token = yylex1();
16+ if (next_token != 0) {
17+ token = next_token;
18+ next_token = 0;
19+ }
20+ else
21+ token = yylex1();
22
23 if (token == 0)
24 return 0;
25@@ -425,7 +431,7 @@
26 {
27 /* Put back the token we just read so's we can find it again
28 after registering the expression. */
29- unput(token);
30+ next_token = token;
31
32 lexstate = ST_NORMAL;
33 token = EXPRESSION_PHRASE;
diff --git a/meta/packages/modutils/files/mnci/modules b/meta/packages/modutils/files/mnci/modules
new file mode 100644
index 0000000000..e228d2e8a8
--- /dev/null
+++ b/meta/packages/modutils/files/mnci/modules
@@ -0,0 +1 @@
sysctl
diff --git a/meta/packages/modutils/files/mnci/modules-ramses b/meta/packages/modutils/files/mnci/modules-ramses
new file mode 100644
index 0000000000..e228d2e8a8
--- /dev/null
+++ b/meta/packages/modutils/files/mnci/modules-ramses
@@ -0,0 +1 @@
sysctl
diff --git a/meta/packages/modutils/files/mnci/modules.conf b/meta/packages/modutils/files/mnci/modules.conf
new file mode 100644
index 0000000000..310e5bb6c8
--- /dev/null
+++ b/meta/packages/modutils/files/mnci/modules.conf
@@ -0,0 +1,20 @@
1alias irda0 pxa_ir
2alias usbd0 usbdmonitor
3alias usbf usb-eth
4alias sound-slot-0 pxa-ac97
5alias sound-slot-1 pxa-ac97
6
7# Affix modules
8alias net-pf-27 affix
9alias char-major-60 affix_rfcomm
10
11# BlueZ modules
12alias net-pf-31 bluez
13alias bt-proto-0 l2cap
14alias bt-proto-2 sco
15alias bt-proto-3 rfcomm
16alias bt-proto-4 bnep
17alias bt-proto-5 cmtp
18alias bt-proto-6 hidp
19alias tty-ldisc-15 hci_uart
20alias char-major-10-250 hci_vhci
diff --git a/meta/packages/modutils/files/mnci/modutils.sh b/meta/packages/modutils/files/mnci/modutils.sh
new file mode 100755
index 0000000000..378915c270
--- /dev/null
+++ b/meta/packages/modutils/files/mnci/modutils.sh
@@ -0,0 +1,10 @@
1depmod -Ae
2
3(cat /etc/modules; echo; ) |
4while read module args
5do
6 case "$module" in
7 \#*|"") continue ;;
8 esac
9 modprobe $module $args
10done
diff --git a/meta/packages/modutils/files/modules b/meta/packages/modutils/files/modules
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/meta/packages/modutils/files/modules
diff --git a/meta/packages/modutils/files/modules.conf b/meta/packages/modutils/files/modules.conf
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/meta/packages/modutils/files/modules.conf
diff --git a/meta/packages/modutils/files/modutils-notest.patch b/meta/packages/modutils/files/modutils-notest.patch
new file mode 100644
index 0000000000..0e15a1014c
--- /dev/null
+++ b/meta/packages/modutils/files/modutils-notest.patch
@@ -0,0 +1,14 @@
1This test disables the annoying
2 Note: /etc/modules.conf is more recent than /lib/modules/2.4.19-rmk6-pxa1/modules.dep
3message.
4
5--- modutils-2.4.6/insmod/modprobe.c~notest Mon Feb 26 02:07:17 2001
6+++ modutils-2.4.6/insmod/modprobe.c Wed Feb 19 14:31:52 2003
7@@ -785,7 +785,6 @@
8 return -1;
9 }
10
11-#define EXTREMELY_CAUTIOUS
12 #ifdef EXTREMELY_CAUTIOUS
13 if (fstat(fileno(fin), &statbuf) != 0)
14 error("Could not stat %s", depfile);
diff --git a/meta/packages/modutils/files/modutils.sh b/meta/packages/modutils/files/modutils.sh
new file mode 100755
index 0000000000..89281276fd
--- /dev/null
+++ b/meta/packages/modutils/files/modutils.sh
@@ -0,0 +1,27 @@
1#!/bin/sh
2
3LOAD_MODULE=modprobe
4[ -f /proc/modules ] || exit 0
5[ -f /etc/modules ] || exit 0
6[ -e /sbin/modprobe ] || LOAD_MODULE=insmod
7
8if [ ! -e /sbin/depmod ]; then
9 [ -f /lib/modules/`uname -r`/modules.dep ] || LOAD_MODULE=insmod
10else
11 [ "$VERBOSE" != no ] && echo "Calculating module dependencies ..."
12 depmod -Ae
13fi
14
15[ "$VERBOSE" != no ] && echo -n "Loading modules: "
16(cat /etc/modules; echo; ) |
17while read module args
18do
19 case "$module" in
20 \#*|"") continue ;;
21 esac
22 [ "$VERBOSE" != no ] && echo -n "$module "
23 eval "$LOAD_MODULE $module $args >/dev/null 2>&1"
24done
25[ "$VERBOSE" != no ] && echo
26
27exit 0
diff --git a/meta/packages/modutils/files/mtx-1/modules b/meta/packages/modutils/files/mtx-1/modules
new file mode 100644
index 0000000000..3eb719acf9
--- /dev/null
+++ b/meta/packages/modutils/files/mtx-1/modules
@@ -0,0 +1,3 @@
1tun
2ppp_async
3hostap_pci \ No newline at end of file
diff --git a/meta/packages/modutils/files/omap1610h2/modules b/meta/packages/modutils/files/omap1610h2/modules
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/meta/packages/modutils/files/omap1610h2/modules
diff --git a/meta/packages/modutils/files/omap1610h2/modules.conf b/meta/packages/modutils/files/omap1610h2/modules.conf
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/meta/packages/modutils/files/omap1610h2/modules.conf
diff --git a/meta/packages/modutils/files/poodle/modules b/meta/packages/modutils/files/poodle/modules
new file mode 100644
index 0000000000..28d14f6584
--- /dev/null
+++ b/meta/packages/modutils/files/poodle/modules
@@ -0,0 +1,3 @@
1usbdcore
2net_fd
3pxa_bi
diff --git a/meta/packages/modutils/files/poodle/modules.conf b/meta/packages/modutils/files/poodle/modules.conf
new file mode 100644
index 0000000000..8ff87872f3
--- /dev/null
+++ b/meta/packages/modutils/files/poodle/modules.conf
@@ -0,0 +1,4 @@
1alias irda0 pxa_ir
2alias usbd0 usbdmonitor
3alias usbf usb-eth
4
diff --git a/meta/packages/modutils/files/program_prefix.patch b/meta/packages/modutils/files/program_prefix.patch
new file mode 100644
index 0000000000..2927a23a22
--- /dev/null
+++ b/meta/packages/modutils/files/program_prefix.patch
@@ -0,0 +1,69 @@
1--- modutils-2.4.25/Makefile.common.in Sun Nov 24 21:23:35 2002
2+++ modutils-2.4.25/Makefile.common.in Thu Jan 29 17:16:30 2004
3@@ -7,6 +7,7 @@
4 mandir = @mandir@
5 prefix = @prefix@
6 sbindir = @sbindir@
7+transform = @program_transform_name@
8
9 AR = @AR@
10 ARCH = @ARCH@
11--- modutils-2.4.25/configure.in Thu Jan 29 17:24:10 2004
12+++ modutils-2.4.25/configure.in Thu Jan 29 17:13:59 2004
13@@ -17,6 +17,7 @@
14 export CC_FOR_BUILD
15
16 AC_CANONICAL_TARGET([])
17+AC_ARG_PROGRAM
18
19 # Handle target_cpu for compatibility.
20 if test "$host_cpu" != "$target_cpu"; then
21--- modutils-2.4.25/depmod/Makefile.in Fri Mar 28 17:54:20 2003
22+++ modutils-2.4.25/depmod/Makefile.in Thu Jan 29 17:16:41 2004
23@@ -60,7 +60,7 @@
24
25 install install-bin: all
26 $(MKDIR) $(DESTDIR)$(sbindir)
27- $(INSTALL) $(STRIP) depmod $(DESTDIR)$(sbindir)
28+ $(INSTALL) $(STRIP) depmod $(DESTDIR)$(sbindir)/`echo depmod | sed -e'$(transform)'`
29
30 dep depend .depend: depmod.c
31 $(CC) -M $(CFLAGS) $(DEFSNOARCH) $(DEFS) $^ > .depend
32--- modutils-2.4.25/genksyms/Makefile.in Sun Nov 24 21:23:35 2002
33+++ modutils-2.4.25/genksyms/Makefile.in Thu Jan 29 17:17:07 2004
34@@ -62,7 +62,7 @@
35
36 install install-bin: all
37 $(MKDIR) $(DESTDIR)$(sbindir)
38- $(INSTALL) $(STRIP) genksyms $(DESTDIR)$(sbindir)
39+ $(INSTALL) $(STRIP) genksyms $(DESTDIR)$(sbindir)/`echo genksyms | sed -e'$(transform)'`
40
41 # auto-generated dependancies are almost redundant once we add all the
42 # rules to get the generated files built first.
43--- modutils-2.4.25/insmod/Makefile.in Fri Mar 28 17:54:20 2003
44+++ modutils-2.4.25/insmod/Makefile.in Thu Jan 29 17:21:10 2004
45@@ -120,16 +120,19 @@
46 @set -ex;\
47 for i in $(TARGETS_REAL); do \
48 $(MKDIR) $(DESTDIR)$(sbindir); \
49- $(INSTALL) $(STRIP) $$i $(DESTDIR)$(sbindir); done;
50+ f=`echo $$i|sed -e'$(transform)'`; \
51+ $(INSTALL) $(STRIP) $$i $(DESTDIR)$(sbindir)/$$f; done;
52 set -e; \
53- for i in $(srcdir)/insmod_ksymoops_clean $(srcdir)/kernelversion; do \
54+ for i in insmod_ksymoops_clean kernelversion; do \
55 $(MKDIR) $(DESTDIR)$(sbindir); \
56- $(INSTALL) $$i $(DESTDIR)$(sbindir); done;
57+ f=`echo $$i|sed -e'$(transform)'`; \
58+ $(INSTALL) $$i $(DESTDIR)$(sbindir)/$$f; done;
59 set -e; \
60 for i in $(COMB); do \
61- ln -sf insmod $(DESTDIR)$(sbindir)/$$i; \
62+ f=`echo $$i|sed -e'$(transform)'`; \
63+ ln -sf `echo insmod|sed -e'$(transform)'` $(DESTDIR)$(sbindir)/$$f; \
64 (test "$(insmod_static)" = yes && \
65- ln -sf insmod.static $(DESTDIR)$(sbindir)/$$i.static) || true; \
66+ ln -sf `echo insmod.static|sed -e'$(transform)'` $(DESTDIR)$(sbindir)/$$f.static) || true; \
67 done
68
69 clean:
diff --git a/meta/packages/modutils/files/tosa/modules b/meta/packages/modutils/files/tosa/modules
new file mode 100644
index 0000000000..754cc7f606
--- /dev/null
+++ b/meta/packages/modutils/files/tosa/modules
@@ -0,0 +1,4 @@
1usbdcore
2net_fd
3pxa_bi
4usb_ohci_tc6393 \ No newline at end of file
diff --git a/meta/packages/modutils/files/tosa/modules.conf b/meta/packages/modutils/files/tosa/modules.conf
new file mode 100644
index 0000000000..8ff87872f3
--- /dev/null
+++ b/meta/packages/modutils/files/tosa/modules.conf
@@ -0,0 +1,4 @@
1alias irda0 pxa_ir
2alias usbd0 usbdmonitor
3alias usbf usb-eth
4
diff --git a/meta/packages/modutils/files/wrt54/modules b/meta/packages/modutils/files/wrt54/modules
new file mode 100644
index 0000000000..78f651a83d
--- /dev/null
+++ b/meta/packages/modutils/files/wrt54/modules
@@ -0,0 +1,4 @@
1et
2wl
3wlcompat
4diag
diff --git a/meta/packages/modutils/modutils-collateral.bb b/meta/packages/modutils/modutils-collateral.bb
new file mode 100644
index 0000000000..5c502021f9
--- /dev/null
+++ b/meta/packages/modutils/modutils-collateral.bb
@@ -0,0 +1,16 @@
1SECTION = "base"
2DESCRIPTION = "modutils configuration files"
3PR = "r2"
4LICENSE = "MIT"
5
6SRC_URI = "file://modules \
7 file://modules.conf"
8
9do_compile () {
10}
11
12do_install () {
13 install -d ${D}${sysconfdir}
14 install -m 0644 ${WORKDIR}/modules ${D}${sysconfdir}/modules
15 install -m 0644 ${WORKDIR}/modules.conf ${D}${sysconfdir}/modules.conf
16}
diff --git a/meta/packages/modutils/modutils-cross/module.h.diff b/meta/packages/modutils/modutils-cross/module.h.diff
new file mode 100644
index 0000000000..077baaf3eb
--- /dev/null
+++ b/meta/packages/modutils/modutils-cross/module.h.diff
@@ -0,0 +1,33 @@
1diff -urN modutils-2.4.27.orig/include/module.h modutils-2.4.27/include/module.h
2--- modutils-2.4.27.orig/include/module.h 2003-01-27 11:22:02.000000000 -0500
3+++ modutils-2.4.27/include/module.h 2004-08-23 19:52:34.756772712 -0400
4@@ -88,6 +88,20 @@
5 /* For sizeof() which are related to the module platform and not to the
6 environment isnmod is running in, use sizeof_xx instead of sizeof(xx). */
7
8+/* Additional test for OE, set tgt_blah correct for the target arch, *not* the
9+ native arch. If int isn't 32bit on the native machine we're in trouble. */
10+
11+#ifdef ARCH_arm
12+#define tgt_sizeof_char sizeof(char)
13+#define tgt_sizeof_short sizeof(short)
14+#define tgt_sizeof_int sizeof(int)
15+#define tgt_sizeof_long 4
16+#define tgt_sizeof_char_p 4
17+#define tgt_sizeof_void_p 4
18+#define tgt_long int
19+#define tgt_long_fmt "l"
20+#define tgt_strtoul strtoul
21+#else
22 #define tgt_sizeof_char sizeof(char)
23 #define tgt_sizeof_short sizeof(short)
24 #define tgt_sizeof_int sizeof(int)
25@@ -97,7 +111,7 @@
26 #define tgt_long long
27 #define tgt_long_fmt "l"
28 #define tgt_strtoul strtoul
29-
30+#endif
31 /* This assumes that long long on a 32 bit system is equivalent to long on the
32 * equivalent 64 bit system. Also that void and char pointers are 8 bytes on
33 * all 64 bit systems. Add per system tweaks if it ever becomes necessary.
diff --git a/meta/packages/modutils/modutils-cross_2.4.27.bb b/meta/packages/modutils/modutils-cross_2.4.27.bb
new file mode 100644
index 0000000000..834f13adbd
--- /dev/null
+++ b/meta/packages/modutils/modutils-cross_2.4.27.bb
@@ -0,0 +1,27 @@
1SECTION = "base"
2include modutils_${PV}.bb
3PR = "r8"
4inherit cross
5S = "${WORKDIR}/modutils-${PV}"
6DEPENDS = ""
7PACKAGES = ""
8PROVIDES += "virtual/${TARGET_PREFIX}depmod virtual/${TARGET_PREFIX}depmod-2.4"
9DEFAULT_PREFERENCE = "1"
10
11SRC_URI += "file://modutils-cross/module.h.diff;patch=1"
12
13sbindir = "${prefix}/bin"
14
15EXTRA_OECONF_append = " --program-prefix=${TARGET_PREFIX}"
16
17CFLAGS_prepend_mipsel = "-D__MIPSEL__"
18CFLAGS_prepend_mipseb = "-D__MIPSEB__"
19
20do_stage () {
21 oe_runmake install
22 mv ${bindir}/${TARGET_PREFIX}depmod ${bindir}/${TARGET_PREFIX}depmod-2.4
23}
24
25do_install () {
26 :
27}
diff --git a/meta/packages/modutils/modutils-initscripts.bb b/meta/packages/modutils/modutils-initscripts.bb
new file mode 100644
index 0000000000..bf51ca87f6
--- /dev/null
+++ b/meta/packages/modutils/modutils-initscripts.bb
@@ -0,0 +1,18 @@
1SECTION = "base"
2DESCRIPTION = "modutils configuration files"
3LICENSE = "PD"
4SRC_URI = "file://modutils.sh"
5PR = "r2"
6
7INITSCRIPT_NAME = "modutils.sh"
8INITSCRIPT_PARAMS = "start 20 S ."
9
10inherit update-rc.d
11
12do_compile () {
13}
14
15do_install () {
16 install -d ${D}${sysconfdir}/init.d/
17 install -m 0755 ${WORKDIR}/modutils.sh ${D}${sysconfdir}/init.d/
18}
diff --git a/meta/packages/modutils/modutils_2.4.27.bb b/meta/packages/modutils/modutils_2.4.27.bb
new file mode 100644
index 0000000000..56420f7de0
--- /dev/null
+++ b/meta/packages/modutils/modutils_2.4.27.bb
@@ -0,0 +1,88 @@
1SECTION = "base"
2DESCRIPTION = "These utilities are intended to make a Linux modular kernel \
3manageable for all users, administrators and distribution maintainers."
4LICENSE = "GPLv2"
5FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/files"
6PR = "r7"
7
8SRC_URI = "ftp://ftp.kernel.org/pub/linux/utils/kernel/modutils/v2.4/modutils-${PV}.tar.bz2 \
9 file://lex.l.diff;patch=1 \
10 file://modutils-notest.patch;patch=1 \
11 file://configure.patch;patch=1 \
12 file://program_prefix.patch;patch=1 \
13 file://armeb.patch;patch=1 \
14 file://gcc4.patch;patch=1"
15
16inherit autotools
17
18# modutils go in /sbin
19sbindir = "/sbin"
20EXTRA_OECONF = "--disable-strip"
21export BUILDCC = "${BUILD_CC}"
22export BUILDCFLAGS = "${BUILD_CFLAGS}"
23
24do_install () {
25 oe_runmake 'DESTDIR=${D}' install
26 install -d ${D}${sysconfdir}
27 rm ${D}${base_sbindir}/lsmod
28 install -d ${D}${base_bindir}/
29 ln -s ../sbin/insmod ${D}${base_bindir}/lsmod
30 for f in bin/lsmod sbin/insmod sbin/rmmod sbin/modprobe sbin/modinfo sbin/depmod; do mv ${D}/$f ${D}/$f.24
31 done
32}
33
34pkg_postinst_modutils () {
35#!/bin/sh
36for f in sbin/insmod sbin/modprobe sbin/rmmod bin/lsmod; do
37 bn=`basename $f`
38 update-alternatives --install /$f $bn /$f.24 10
39done
40if test -n "$D"; then
41 D="-r $D"
42 if test -n "`which ${TARGET_PREFIX}depmod-2.4`"; then
43 for kerneldir in `ls -p ${IMAGE_ROOTFS}/lib/modules|grep /`; do
44 kernelver=`basename $kerneldir`
45 ${TARGET_PREFIX}depmod-2.4 -a -b ${IMAGE_ROOTFS} -C ${IMAGE_ROOTFS}/${sysconfdir}/modules.conf -r $kernelver
46 done
47 fi
48fi
49update-rc.d $D modutils.sh start 20 S .
50}
51
52pkg_prerm_modutils () {
53#!/bin/sh
54for f in sbin/insmod sbin/modprobe sbin/rmmod sbin/depmod sbin/modinfo bin/lsmod; do
55bn=`basename $f`
56 update-alternatives --remove $bn /$f.24
57done
58if test -n "$D"; then
59 D="-r $D"
60fi
61update-rc.d $D modutils.sh remove
62}
63
64pkg_postinst_modutils-depmod() {
65#!/bin/sh
66update-alternatives --install /sbin/depmod depmod /sbin/depmod.24 10
67}
68
69pkg_postinst_modutils-modinfo() {
70#!/bin/sh
71update-alternatives --install /sbin/modinfo modinfo /sbin/modinfo.24 10
72}
73
74pkg_prerm_modutils-depmod() {
75#!/bin/sh
76update-alternatives --remove depmod /sbin/depmod.24
77}
78
79pkg_prerm_modutils-modinfo() {
80#!/bin/sh
81update-alternatives --remove modinfo /sbin/modinfo.24
82}
83
84PACKAGES = "modutils-depmod modutils-modinfo modutils-doc modutils"
85
86FILES_modutils-depmod = "sbin/depmod.24"
87FILES_modutils-modinfo = "sbin/modinfo.24"
88RDEPENDS_modutils = "modutils-depmod"