summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/module-init-tools/files
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/module-init-tools/files')
-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
5 files changed, 115 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 @@
+# disable man page build
+#
+# by Kevin Tian <kevin.tian@intel.com>, 2010-07-21
+
+diff --git a/Makefile.am b/Makefile.am
+index 6f83c12..32972a8 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -39,13 +39,12 @@ modindex_LDADD = $(LDADD) libmodtools.a
+ MAN5 = modprobe.conf.5 modules.dep.5 depmod.conf.5 modprobe.d.5
+ MAN8 = depmod.8 insmod.8 lsmod.8 rmmod.8 modprobe.8 modinfo.8
+ SGML = $(addprefix doc/, $(MAN5:%.5=%.sgml) $(MAN8:%.8=%.sgml))
+-dist_man_MANS = $(MAN5) $(MAN8)
+ # If they haven't overridden mandir, fix it (never /man!)
+ mandir =$(shell if [ @mandir@ = $(prefix)/man ]; then if [ $(prefix) = / ]; then echo /usr/share/man; else echo $(prefix)/share/man; fi; else echo @mandir@; fi)
+
+ TESTSUITE := $(shell test -e @srcdir@/tests && find @srcdir@/tests -type f ! -name '*~')
+
+-EXTRA_DIST = generate-modprobe.conf FAQ CODING stress_modules.sh install-with-care $(SGML) $(man_MANS) $(TESTSUITE)
++EXTRA_DIST = generate-modprobe.conf FAQ CODING stress_modules.sh install-with-care
+
+ sbin_PROGRAMS = insmod modprobe rmmod depmod modinfo
+ 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 @@
+# this patch is from Mark Hatle <mark.hatle@windriver.com>, who ran into
+# a random segfault using the latest module-init-tools (3.12) and finally
+# trace back to depmod.c:grab_module, which appears that the new malloc(...)
+# setups up things, but never clears the memory that was just allocated.
+#
+# Kevin Tian <kevin.tian@intel.com>, 2010-08-06
+
+diff --git a/depmod.c b/depmod.c
+index 647e5e6..46e03e0 100644
+--- a/depmod.c
++++ b/depmod.c
+@@ -313,6 +313,7 @@ static struct module *grab_module(const char *dirname, const char *filename)
+
+ new = NOFAIL(malloc(sizeof(*new)
+ + strlen(dirname?:"") + 1 + strlen(filename) + 1));
++ memset(new, 0x00, sizeof(*new) + strlen(dirname?:"") + 1 + strlen(filename) + 1);
+ if (dirname)
+ sprintf(new->pathname, "%s/%s", dirname, filename);
+ 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 @@
+# not sure the reason yet. Keep for a while and verify later.
+#
+# comments added by Kevin Tian <kevin.tian@intel.com>, 2010-07-21
+
+diff -ruN module-init-tools-3.12.orig/modprobe.8 module-init-tools-3.12/modprobe.8
+--- module-init-tools-3.12/modprobe.8.orig
++++ module-init-tools-3.12/modprobe.8
+@@ -27,6 +27,7 @@
+ (see \fBmodprobe.conf\fR(5)). \fBmodprobe\fR will also use module
+ options specified on the kernel command line in the form of
+ <module>\&.<option>\&.
++All files in the \fI/etc/modprobe.d/arch/\fR directory are ignored.
+ .PP
+ Note that unlike in 2.4 series Linux kernels (which are not supported
+ by this tool) this version of \fBmodprobe\fR does not
+--- module-init-tools-3.12/modprobe.c.orig
++++ module-init-tools-3.12/modprobe.c
+@@ -1052,6 +1052,10 @@
+ DIR *dir;
+ int ret = 0;
+
++ /* ignore everything in this directory */
++ if (streq(filename, "/etc/modprobe.d/arch"))
++ return 1;
++
+ dir = opendir(filename);
+ if (dir) {
+ 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 @@
+# poky uses new name to differentiate from modutils, so reflect this new name in source
+#
+# comment added by Kevin Tian <kevin.tian@intel.com>, 2010-07-21
+--- module-init-tools-3.0-pre10.orig/generate-modprobe.conf
++++ module-init-tools-3.0-pre10/generate-modprobe.conf
+@@ -45,12 +45,12 @@
+ cp $TESTING_MODPROBE_CONF $MODPROBECONF
+ elif [ "$STDIN" = "1" ]; then
+ cat > $MODPROBECONF
+-elif [ -x /sbin/modprobe.old ]; then
++elif [ -x /sbin/modprobe.24 ]; then
+ # In sbin.
+- /sbin/modprobe.old -c > $MODPROBECONF || modprobe_abort
+-elif modprobe.old -c >/dev/null 2>&1; then
++ /sbin/modprobe.24 -c > $MODPROBECONF || modprobe_abort
++elif modprobe.24 -c >/dev/null 2>&1; then
+ # Somewhere in path.
+- modprobe.old -c > $MODPROBECONF || modprobe_abort
++ modprobe.24 -c > $MODPROBECONF || modprobe_abort
+ elif /sbin/modprobe -V 2>/dev/null | grep -q 'modprobe version'; then
+ # Running /sbin/modprobe gives old version.
+ /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 @@
+# Building a native, statically-linked insmod can result in ld failing because
+# it can't find a static libc. A native, static insmod is unnecessary anyway,
+# so this patch just removes it.
+#
+# - jdike@linux.intel.com
+#
+# Change to a simpler method by just disabling static link flag, since even
+# removing those lines don't prevent insmod.static from compile
+#
+# by Kevin Tian <kevin.tian@intel.com>, 2010-07-21
+
+Index: module-init-tools-3.2.2/Makefile.am
+===================================================================
+--- module-init-tools-3.2.2.orig/Makefile.am 2010-05-26 15:43:16.000000000 -0400
++++ module-init-tools-3.2.2/Makefile.am 2010-05-26 16:04:06.232990785 -0400
+@@ -10,7 +10,6 @@
+ modindex_SOURCES = modindex.c zlibsupport.c zlibsupport.h testing.h
+
+ insmod_static_SOURCES = insmod.c
+-insmod_static_LDFLAGS = -static
+ # We don't want the $(zlib_flags) here: that makes a dynamic executable
+ insmod_static_LDADD = libmodtools.a
+