[kernel] r10971 - in dists/sid/linux-2.6/debian: . patches/bugfix/all patches/series
Martin Michlmayr
tbm at alioth.debian.org
Tue Mar 25 11:18:42 UTC 2008
Author: tbm
Date: Tue Mar 25 11:18:41 2008
New Revision: 10971
Log:
Don't check the section size when we're cross compiling.
Added:
dists/sid/linux-2.6/debian/patches/bugfix/all/file2alias-cross-compile-fix.patch
Modified:
dists/sid/linux-2.6/debian/changelog
dists/sid/linux-2.6/debian/patches/series/5
Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog (original)
+++ dists/sid/linux-2.6/debian/changelog Tue Mar 25 11:18:41 2008
@@ -129,6 +129,7 @@
* [mips/r5k-ip32] Enable BLK_DEV_LOOP and BLK_DEV_CRYPTOLOOP.
* [mips/r4k-ip22] Enable PPP, PPPOE and SLIP.
* [mips/r5k-ip32] Enable PPP, PPPOE and SLIP.
+ * Don't check the section size when we're cross compiling.
[ dann frazier ]
* Remove cap_task_kill (closes: #463669)
Added: dists/sid/linux-2.6/debian/patches/bugfix/all/file2alias-cross-compile-fix.patch
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/file2alias-cross-compile-fix.patch Tue Mar 25 11:18:41 2008
@@ -0,0 +1,89 @@
+--- a/scripts/mod/file2alias.c~ 2008-03-25 10:24:43.000000000 +0000
++++ b/scripts/mod/file2alias.c 2008-03-25 10:27:22.000000000 +0000
+@@ -51,11 +51,13 @@
+ sprintf(str + strlen(str), "*"); \
+ } while(0)
+
++unsigned int cross_build = 0;
+ /**
+ * Check that sizeof(device_id type) are consistent with size of section
+ * in .o file. If in-consistent then userspace and kernel does not agree
+ * on actual size which is a bug.
+ * Also verify that the final entry in the table is all zeros.
++ * Ignore both checks if build host differ from target host and size differs.
+ **/
+ static void device_id_check(const char *modname, const char *device_id,
+ unsigned long size, unsigned long id_size,
+@@ -64,6 +66,8 @@
+ int i;
+
+ if (size % id_size || size < id_size) {
++ if (cross_build != 0)
++ return;
+ fatal("%s: sizeof(struct %s_device_id)=%lu is not a modulo "
+ "of the size of section __mod_%s_device_table=%lu.\n"
+ "Fix definition of struct %s_device_id "
+--- a/scripts/mod/modpost.c~ 2008-03-25 10:24:51.000000000 +0000
++++ b/scripts/mod/modpost.c 2008-03-25 10:26:36.000000000 +0000
+@@ -1659,7 +1659,7 @@
+ int opt;
+ int err;
+
+- while ((opt = getopt(argc, argv, "i:I:mso:aw")) != -1) {
++ while ((opt = getopt(argc, argv, "i:I:cmso:aw")) != -1) {
+ switch(opt) {
+ case 'i':
+ kernel_read = optarg;
+@@ -1668,6 +1668,9 @@
+ module_read = optarg;
+ external_module = 1;
+ break;
++ case 'c':
++ cross_build = 1;
++ break;
+ case 'm':
+ modversions = 1;
+ break;
+--- a/scripts/mod/modpost.h~ 2008-03-25 10:24:59.000000000 +0000
++++ b/scripts/mod/modpost.h 2008-03-25 10:27:22.000000000 +0000
+@@ -130,6 +130,7 @@
+ };
+
+ /* file2alias.c */
++extern unsigned int cross_build;
+ void handle_moddevtable(struct module *mod, struct elf_info *info,
+ Elf_Sym *sym, const char *symname);
+ void add_moddevtable(struct buffer *buf, struct module *mod);
+--- a/scripts/Makefile.modpost~ 2008-03-25 10:24:34.000000000 +0000
++++ b/scripts/Makefile.modpost 2008-03-25 10:27:22.000000000 +0000
+@@ -53,6 +53,9 @@
+ # Stop after building .o files if NOFINAL is set. Makes compile tests quicker
+ _modpost: $(if $(KBUILD_MODPOST_NOFINAL), $(modules:.ko:.o),$(modules))
+
++ifneq ($(KBUILD_BUILDHOST),$(ARCH))
++ cross_build := 1
++endif
+
+ # Step 2), invoke modpost
+ # Includes step 3,4
+@@ -62,7 +65,8 @@
+ $(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \
+ $(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \
+ $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
+- $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w)
++ $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w) \
++ $(if $(cross_build),-c)
+
+ quiet_cmd_modpost = MODPOST $(words $(filter-out vmlinux FORCE, $^)) modules
+ cmd_modpost = $(modpost) -s
+--- a/Makefile~ 2008-03-25 10:24:27.000000000 +0000
++++ b/Makefile 2008-03-25 10:27:22.000000000 +0000
+@@ -189,7 +189,7 @@
+ # Alternatively CROSS_COMPILE can be set in the environment.
+ # Default value for CROSS_COMPILE is not to prefix executables
+ # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
+-
++export KBUILD_BUILDHOST := $(SUBARCH)
+ ARCH ?= $(SUBARCH)
+ CROSS_COMPILE ?=
+
Modified: dists/sid/linux-2.6/debian/patches/series/5
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/5 (original)
+++ dists/sid/linux-2.6/debian/patches/series/5 Tue Mar 25 11:18:41 2008
@@ -1,3 +1,4 @@
+ bugfix/all/stable/2.6.24.3.patch
+ bugfix/all/stable/2.6.24.4.patch
+ bugfix/cap-remove-cap_task_kill.patch
++ bugfix/all/file2alias-cross-compile-fix.patch
More information about the Kernel-svn-changes
mailing list