summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/module-init-tools
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:14:24 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:29:45 +0100
commit29d6678fd546377459ef75cf54abeef5b969b5cf (patch)
tree8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-kernel/module-init-tools
parentda49de6885ee1bc424e70bc02f21f6ab920efb55 (diff)
downloadpoky-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-kernel/module-init-tools')
-rw-r--r--meta/recipes-kernel/module-init-tools/files/disable_man.patch23
-rw-r--r--meta/recipes-kernel/module-init-tools/files/grab_module_memset.patch19
-rw-r--r--meta/recipes-kernel/module-init-tools/files/ignore_arch_directory.patch28
-rw-r--r--meta/recipes-kernel/module-init-tools/files/modutils_extension.patch22
-rw-r--r--meta/recipes-kernel/module-init-tools/files/no-static-binaries.patch23
-rw-r--r--meta/recipes-kernel/module-init-tools/module-init-tools-cross_3.12.bb12
-rw-r--r--meta/recipes-kernel/module-init-tools/module-init-tools.inc24
-rw-r--r--meta/recipes-kernel/module-init-tools/module-init-tools_3.12.bb39
8 files changed, 190 insertions, 0 deletions
diff --git a/meta/recipes-kernel/module-init-tools/files/disable_man.patch b/meta/recipes-kernel/module-init-tools/files/disable_man.patch
new file mode 100644
index 0000000000..daf58248b1
--- /dev/null
+++ b/meta/recipes-kernel/module-init-tools/files/disable_man.patch
@@ -0,0 +1,23 @@
1# disable man page build
2#
3# by Kevin Tian <kevin.tian@intel.com>, 2010-07-21
4
5diff --git a/Makefile.am b/Makefile.am
6index 6f83c12..32972a8 100644
7--- a/Makefile.am
8+++ b/Makefile.am
9@@ -39,13 +39,12 @@ modindex_LDADD = $(LDADD) libmodtools.a
10 MAN5 = modprobe.conf.5 modules.dep.5 depmod.conf.5 modprobe.d.5
11 MAN8 = depmod.8 insmod.8 lsmod.8 rmmod.8 modprobe.8 modinfo.8
12 SGML = $(addprefix doc/, $(MAN5:%.5=%.sgml) $(MAN8:%.8=%.sgml))
13-dist_man_MANS = $(MAN5) $(MAN8)
14 # If they haven't overridden mandir, fix it (never /man!)
15 mandir =$(shell if [ @mandir@ = $(prefix)/man ]; then if [ $(prefix) = / ]; then echo /usr/share/man; else echo $(prefix)/share/man; fi; else echo @mandir@; fi)
16
17 TESTSUITE := $(shell test -e @srcdir@/tests && find @srcdir@/tests -type f ! -name '*~')
18
19-EXTRA_DIST = generate-modprobe.conf FAQ CODING stress_modules.sh install-with-care $(SGML) $(man_MANS) $(TESTSUITE)
20+EXTRA_DIST = generate-modprobe.conf FAQ CODING stress_modules.sh install-with-care
21
22 sbin_PROGRAMS = insmod modprobe rmmod depmod modinfo
23 if BUILD_STATIC_UTILS
diff --git a/meta/recipes-kernel/module-init-tools/files/grab_module_memset.patch b/meta/recipes-kernel/module-init-tools/files/grab_module_memset.patch
new file mode 100644
index 0000000000..9550255315
--- /dev/null
+++ b/meta/recipes-kernel/module-init-tools/files/grab_module_memset.patch
@@ -0,0 +1,19 @@
1# this patch is from Mark Hatle <mark.hatle@windriver.com>, who ran into
2# a random segfault using the latest module-init-tools (3.12) and finally
3# trace back to depmod.c:grab_module, which appears that the new malloc(...)
4# setups up things, but never clears the memory that was just allocated.
5#
6# Kevin Tian <kevin.tian@intel.com>, 2010-08-06
7
8diff --git a/depmod.c b/depmod.c
9index 647e5e6..46e03e0 100644
10--- a/depmod.c
11+++ b/depmod.c
12@@ -313,6 +313,7 @@ static struct module *grab_module(const char *dirname, const char *filename)
13
14 new = NOFAIL(malloc(sizeof(*new)
15 + strlen(dirname?:"") + 1 + strlen(filename) + 1));
16+ memset(new, 0x00, sizeof(*new) + strlen(dirname?:"") + 1 + strlen(filename) + 1);
17 if (dirname)
18 sprintf(new->pathname, "%s/%s", dirname, filename);
19 else
diff --git a/meta/recipes-kernel/module-init-tools/files/ignore_arch_directory.patch b/meta/recipes-kernel/module-init-tools/files/ignore_arch_directory.patch
new file mode 100644
index 0000000000..7b30824802
--- /dev/null
+++ b/meta/recipes-kernel/module-init-tools/files/ignore_arch_directory.patch
@@ -0,0 +1,28 @@
1# not sure the reason yet. Keep for a while and verify later.
2#
3# comments added by Kevin Tian <kevin.tian@intel.com>, 2010-07-21
4
5diff -ruN module-init-tools-3.12.orig/modprobe.8 module-init-tools-3.12/modprobe.8
6--- module-init-tools-3.12/modprobe.8.orig
7+++ module-init-tools-3.12/modprobe.8
8@@ -27,6 +27,7 @@
9 (see \fBmodprobe.conf\fR(5)). \fBmodprobe\fR will also use module
10 options specified on the kernel command line in the form of
11 <module>\&.<option>\&.
12+All files in the \fI/etc/modprobe.d/arch/\fR directory are ignored.
13 .PP
14 Note that unlike in 2.4 series Linux kernels (which are not supported
15 by this tool) this version of \fBmodprobe\fR does not
16--- module-init-tools-3.12/modprobe.c.orig
17+++ module-init-tools-3.12/modprobe.c
18@@ -1052,6 +1052,10 @@
19 DIR *dir;
20 int ret = 0;
21
22+ /* ignore everything in this directory */
23+ if (streq(filename, "/etc/modprobe.d/arch"))
24+ return 1;
25+
26 dir = opendir(filename);
27 if (dir) {
28 struct file_entry {
diff --git a/meta/recipes-kernel/module-init-tools/files/modutils_extension.patch b/meta/recipes-kernel/module-init-tools/files/modutils_extension.patch
new file mode 100644
index 0000000000..128c9531a1
--- /dev/null
+++ b/meta/recipes-kernel/module-init-tools/files/modutils_extension.patch
@@ -0,0 +1,22 @@
1# poky uses new name to differentiate from modutils, so reflect this new name in source
2#
3# comment added by Kevin Tian <kevin.tian@intel.com>, 2010-07-21
4--- module-init-tools-3.0-pre10.orig/generate-modprobe.conf
5+++ module-init-tools-3.0-pre10/generate-modprobe.conf
6@@ -45,12 +45,12 @@
7 cp $TESTING_MODPROBE_CONF $MODPROBECONF
8 elif [ "$STDIN" = "1" ]; then
9 cat > $MODPROBECONF
10-elif [ -x /sbin/modprobe.old ]; then
11+elif [ -x /sbin/modprobe.24 ]; then
12 # In sbin.
13- /sbin/modprobe.old -c > $MODPROBECONF || modprobe_abort
14-elif modprobe.old -c >/dev/null 2>&1; then
15+ /sbin/modprobe.24 -c > $MODPROBECONF || modprobe_abort
16+elif modprobe.24 -c >/dev/null 2>&1; then
17 # Somewhere in path.
18- modprobe.old -c > $MODPROBECONF || modprobe_abort
19+ modprobe.24 -c > $MODPROBECONF || modprobe_abort
20 elif /sbin/modprobe -V 2>/dev/null | grep -q 'modprobe version'; then
21 # Running /sbin/modprobe gives old version.
22 /sbin/modprobe -c > $MODPROBECONF || modprobe_abort
diff --git a/meta/recipes-kernel/module-init-tools/files/no-static-binaries.patch b/meta/recipes-kernel/module-init-tools/files/no-static-binaries.patch
new file mode 100644
index 0000000000..ca83ec0755
--- /dev/null
+++ b/meta/recipes-kernel/module-init-tools/files/no-static-binaries.patch
@@ -0,0 +1,23 @@
1# Building a native, statically-linked insmod can result in ld failing because
2# it can't find a static libc. A native, static insmod is unnecessary anyway,
3# so this patch just removes it.
4#
5# - jdike@linux.intel.com
6#
7# Change to a simpler method by just disabling static link flag, since even
8# removing those lines don't prevent insmod.static from compile
9#
10# by Kevin Tian <kevin.tian@intel.com>, 2010-07-21
11
12Index: module-init-tools-3.2.2/Makefile.am
13===================================================================
14--- module-init-tools-3.2.2.orig/Makefile.am 2010-05-26 15:43:16.000000000 -0400
15+++ module-init-tools-3.2.2/Makefile.am 2010-05-26 16:04:06.232990785 -0400
16@@ -10,7 +10,6 @@
17 modindex_SOURCES = modindex.c zlibsupport.c zlibsupport.h testing.h
18
19 insmod_static_SOURCES = insmod.c
20-insmod_static_LDFLAGS = -static
21 # We don't want the $(zlib_flags) here: that makes a dynamic executable
22 insmod_static_LDADD = libmodtools.a
23
diff --git a/meta/recipes-kernel/module-init-tools/module-init-tools-cross_3.12.bb b/meta/recipes-kernel/module-init-tools/module-init-tools-cross_3.12.bb
new file mode 100644
index 0000000000..08bf1a95e5
--- /dev/null
+++ b/meta/recipes-kernel/module-init-tools/module-init-tools-cross_3.12.bb
@@ -0,0 +1,12 @@
1require module-init-tools.inc
2PR = "r1"
3inherit cross
4PROVIDES += "virtual/${TARGET_PREFIX}depmod virtual/${TARGET_PREFIX}depmod-2.6"
5
6SRC_URI += "file://no-static-binaries.patch"
7
8EXTRA_OECONF_append = " --program-prefix=${TARGET_PREFIX}"
9
10do_install_append () {
11 mv ${D}${bindir}/${TARGET_PREFIX}depmod ${D}${bindir}/${TARGET_PREFIX}depmod-2.6
12}
diff --git a/meta/recipes-kernel/module-init-tools/module-init-tools.inc b/meta/recipes-kernel/module-init-tools/module-init-tools.inc
new file mode 100644
index 0000000000..f1319ad90d
--- /dev/null
+++ b/meta/recipes-kernel/module-init-tools/module-init-tools.inc
@@ -0,0 +1,24 @@
1DESCRIPTION = "This package contains a set of programs for loading, inserting, and removing kernel modules for Linux (versions 2.5.48 and above). It serves the same function that the modutils package serves for Linux 2.4"
2LICENSE = "GPLv2+"
3LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
4 file://lsmod.c;md5=743c873ec42632d2ce37d3c440f366dd"
5SECTION = "base"
6
7PACKAGES =+ "module-init-tools-insmod-static module-init-tools-depmod"
8RDEPENDS_${PN} += "module-init-tools-depmod"
9
10FILES_module-init-tools-depmod = "${sbindir}/depmod.26"
11FILES_module-init-tools-insmod-static = "${sbindir}/insmod.static"
12
13SRC_URI = "${KERNELORG_MIRROR}/pub/linux/utils/kernel/module-init-tools/module-init-tools-${PV}.tar.bz2 \
14 file://ignore_arch_directory.patch \
15 file://modutils_extension.patch \
16 file://disable_man.patch \
17 file://grab_module_memset.patch"
18
19inherit autotools
20
21# module-init-tools uses AX_ENABLE_BUILDDIR to move rest of configuration steps
22# into a subdir. However this macro is not quite cross friendly. Instead of
23# mangling that macro, a easier way is to take the disable option
24EXTRA_OECONF = "--disable-builddir"
diff --git a/meta/recipes-kernel/module-init-tools/module-init-tools_3.12.bb b/meta/recipes-kernel/module-init-tools/module-init-tools_3.12.bb
new file mode 100644
index 0000000000..6c312b4cec
--- /dev/null
+++ b/meta/recipes-kernel/module-init-tools/module-init-tools_3.12.bb
@@ -0,0 +1,39 @@
1require module-init-tools.inc
2PR = "r1"
3
4# autotools set prefix to /usr, however we want them in /bin and /sbin
5bindir = "/bin"
6sbindir = "/sbin"
7
8do_install() {
9 autotools_do_install
10 for f in bin/lsmod sbin/insmod sbin/rmmod sbin/modprobe sbin/modinfo sbin/depmod; do
11 mv ${D}/$f ${D}/$f.26
12 done
13}
14
15pkg_postinst_module-init-tools() {
16 for f in sbin/insmod sbin/modprobe sbin/rmmod sbin/modinfo; do
17 bn=`basename $f`
18 update-alternatives --install /$f $bn /$f.26 60
19 done
20 update-alternatives --install /bin/lsmod bin-lsmod /bin/lsmod.26 60
21 update-alternatives --install /sbin/lsmod lsmod /bin/lsmod.26 60
22}
23
24pkg_prerm_module-init-tools() {
25 for f in sbin/insmod sbin/modprobe sbin/rmmod sbin/modinfo; do
26 bn=`basename $f`
27 update-alternatives --remove $bn /$f.26
28 done
29 update-alternatives --remove bin-lsmod /bin/lsmod.26
30 update-alternatives --remove lsmod /bin/lsmod.26
31}
32
33pkg_postinst_module-init-tools-depmod() {
34 update-alternatives --install /sbin/depmod depmod /sbin/depmod.26 60
35}
36
37pkg_prerm_module-init-tools-depmod() {
38 update-alternatives --remove depmod /sbin/depmod.26
39}