diff options
Diffstat (limited to 'yocto-poky/meta/recipes-kernel/kmod/kmod')
6 files changed, 142 insertions, 0 deletions
diff --git a/yocto-poky/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch b/yocto-poky/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch new file mode 100644 index 000000000..b722183b6 --- /dev/null +++ b/yocto-poky/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch @@ -0,0 +1,39 @@ +Subject: Change to calling bswap_* instead of htobe* and be*toh + +We can't use htobe* and be*toh functions because they are not +available on older versions of glibc, For example, shipped on Centos 5.5. + +Change to directly calling bswap_* as defined in+byteswap.h. + +Upstream-Status: Inappropriate + +Signed-off-by: Ting Liu <b28495@freescale.com> +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +--- + libkmod/libkmod-signature.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libkmod/libkmod-signature.c b/libkmod/libkmod-signature.c +index 6fc06fc..912185a 100644 +--- a/libkmod/libkmod-signature.c ++++ b/libkmod/libkmod-signature.c +@@ -18,6 +18,7 @@ + */ + + #include <endian.h> ++#include <byteswap.h> + #include <inttypes.h> + #include <stdio.h> + #include <stdlib.h> +@@ -127,7 +128,7 @@ bool kmod_module_signature_info(const struct kmod_file *file, struct kmod_signat + modsig->hash >= PKEY_HASH__LAST || + modsig->id_type >= PKEY_ID_TYPE__LAST) + return false; +- sig_len = be32toh(get_unaligned(&modsig->sig_len)); ++ sig_len = bswap_32(get_unaligned(&modsig->sig_len)); + if (sig_len == 0 || + size < (int64_t)(modsig->signer_len + modsig->key_id_len + sig_len)) + return false; +-- +1.9.1 + diff --git a/yocto-poky/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch b/yocto-poky/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch new file mode 100644 index 000000000..feafcb9b7 --- /dev/null +++ b/yocto-poky/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch @@ -0,0 +1,29 @@ +Avoid parallel-tests as it remove +buildtest-TESTS and runtest-TESTS targets required by ptest. +In automake 1.13.4 parallel-tests is assumed by defauls. +In order to have buildtest-TESTS and runtest-TESTS targets +serial-tests is now required + +Signed-off-by: Tudor Florea <tudor.florea@enea.com> +Upstream-Status: Inappropriate (disable feature incompatible with ptest) + +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index eb0f9d1..a539968 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -14,7 +14,7 @@ AC_USE_SYSTEM_EXTENSIONS + AC_SYS_LARGEFILE + AC_PREFIX_DEFAULT([/usr]) + AM_MAINTAINER_MODE([enable]) +-AM_INIT_AUTOMAKE([check-news foreign 1.11 silent-rules tar-pax no-dist-gzip dist-xz subdir-objects color-tests parallel-tests]) ++AM_INIT_AUTOMAKE([check-news foreign 1.11 silent-rules tar-pax no-dist-gzip dist-xz subdir-objects color-tests serial-tests]) + AM_SILENT_RULES([yes]) + LT_INIT([disable-static pic-only]) + +-- +1.9.1 + diff --git a/yocto-poky/meta/recipes-kernel/kmod/kmod/depmod-search.conf b/yocto-poky/meta/recipes-kernel/kmod/kmod/depmod-search.conf new file mode 100644 index 000000000..527c0bb6e --- /dev/null +++ b/yocto-poky/meta/recipes-kernel/kmod/kmod/depmod-search.conf @@ -0,0 +1,6 @@ +# +# /etc/depmod.d/depmod.conf +# + +search updates extramodules built-in + diff --git a/yocto-poky/meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch b/yocto-poky/meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch new file mode 100644 index 000000000..8161d6128 --- /dev/null +++ b/yocto-poky/meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch @@ -0,0 +1,38 @@ +From bd43367eee868059770188fd9e9db38520dc6fff Mon Sep 17 00:00:00 2001 +From: Robert Yang <liezhi.yang@windriver.com> +Date: Wed, 22 Jan 2014 01:06:40 -0500 +Subject: [PATCH] libkmod/libkmod-internal.h: check whether O_CLOEXEC is + defined or not + +O_CLOEXEC is introduced from Linux 2.6.23, so old kernel doesn't have +it, we need check before use. + +This patch is much more like a workaround, since it may need fcntl() use +FD_CLOEXEC to replace. + +This problem was reported by "Ting Liu <b28495@freescale.com>" +Signed-off-by: Robert Yang <liezhi.yang@windriver.com> + +Upstream-Status: Pending +--- + libkmod/libkmod-internal.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/libkmod/libkmod-internal.h b/libkmod/libkmod-internal.h +index 0180124..100b40f 100644 +--- a/libkmod/libkmod-internal.h ++++ b/libkmod/libkmod-internal.h +@@ -9,6 +9,10 @@ + #include "macro.h" + #include "libkmod.h" + ++#ifndef O_CLOEXEC ++#define O_CLOEXEC 0 ++#endif ++ + static _always_inline_ _printf_format_(2, 3) void + kmod_log_null(struct kmod_ctx *ctx, const char *format, ...) {} + +-- +1.7.10.4 + diff --git a/yocto-poky/meta/recipes-kernel/kmod/kmod/ptest.patch b/yocto-poky/meta/recipes-kernel/kmod/kmod/ptest.patch new file mode 100644 index 000000000..831dbcb90 --- /dev/null +++ b/yocto-poky/meta/recipes-kernel/kmod/kmod/ptest.patch @@ -0,0 +1,25 @@ +Add 'install-ptest' rule. + +Signed-off-by: Tudor Florea <tudor.florea@enea.com> +Upstream-Status: Pending + +diff -ruN a/Makefile.am b/Makefile.am +--- a/Makefile.am 2013-07-12 17:11:05.278331557 +0200 ++++ b/Makefile.am 2013-07-12 17:14:27.033788016 +0200 +@@ -204,6 +204,16 @@ + + distclean-local: $(DISTCLEAN_LOCAL_HOOKS) + ++install-ptest: ++ @$(MKDIR_P) $(DESTDIR)/testsuite ++ @for file in $(TESTSUITE); do \ ++ install $$file $(DESTDIR)/testsuite; \ ++ done; ++ @sed -e 's/^Makefile/_Makefile/' < Makefile > $(DESTDIR)/Makefile ++ @$(MKDIR_P) $(DESTDIR)/tools ++ @cp $(noinst_SCRIPTS) $(noinst_PROGRAMS) $(DESTDIR)/tools ++ @cp -r testsuite/rootfs testsuite/.libs $(DESTDIR)/testsuite ++ + # ------------------------------------------------------------------------------ + # custom release helpers + # ------------------------------------------------------------------------------ diff --git a/yocto-poky/meta/recipes-kernel/kmod/kmod/run-ptest b/yocto-poky/meta/recipes-kernel/kmod/kmod/run-ptest new file mode 100755 index 000000000..598dd2cb5 --- /dev/null +++ b/yocto-poky/meta/recipes-kernel/kmod/kmod/run-ptest @@ -0,0 +1,5 @@ +#!/bin/sh +touch testsuite/stamp-rootfs +tar xf testmodule.tar +make -k runtest-TESTS 2>/dev/null| grep -e ^PASS -e ^FAIL +find testsuite -name *.ko -exec rm -f {} \; |