diff options
Diffstat (limited to 'meta/recipes-kernel/kmod')
-rw-r--r-- | meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb | 30 | ||||
-rw-r--r-- | meta/recipes-kernel/kmod/kmod-native_git.bb | 18 | ||||
-rw-r--r-- | meta/recipes-kernel/kmod/kmod.inc | 43 | ||||
-rw-r--r-- | meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch | 39 | ||||
-rw-r--r-- | meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch | 15 | ||||
-rw-r--r-- | meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch | 38 | ||||
-rw-r--r-- | meta/recipes-kernel/kmod/kmod_29.bb | 86 | ||||
-rw-r--r-- | meta/recipes-kernel/kmod/kmod_git.bb | 63 |
8 files changed, 109 insertions, 223 deletions
diff --git a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb index 8acb3a858e..04fc14a6d2 100644 --- a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb +++ b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb @@ -1,6 +1,5 @@ SUMMARY = "Wrapper script for the Linux kernel module dependency indexer" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" S = "${WORKDIR}" @@ -10,6 +9,10 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" # We need the following for the sstate code to process the wrapper SSTATE_SCAN_FILES += "depmodwrapper" +EXTRA_STAGING_FIXMES += "PKGDATA_DIR" + +DEPENDS += "kmod-native" +do_populate_sysroot[depends] = "" do_install() { install -d ${D}${bindir_crossscripts}/ @@ -21,28 +24,23 @@ if [ "\$1" != "-a" -o "\$2" != "-b" ]; then echo "Usage: depmodwrapper -a -b rootfs KERNEL_VERSION" >&2 exit 1 fi -if [ ! -r ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion ]; then - echo "Unable to read: ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion" >&2 -else - kernelabi=\$(cat ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion) - if [ "\$kernelabi" != "\$4" ]; then - echo "Error: Kernel version \$4 does not match kernel-abiversion (\$kernelabi)" >&2 - exit 1 - fi + +kernelabi="" +if [ -r "${PKGDATA_DIR}/kernel-depmod/kernel-abiversion" ]; then + kernelabi=\$(cat "${PKGDATA_DIR}/kernel-depmod/kernel-abiversion") fi -if [ ! -r ${PKGDATA_DIR}/kernel-depmod/System.map-\$4 ]; then +if [ ! -r ${PKGDATA_DIR}/kernel-depmod/System.map-\$4 ] || [ "\$kernelabi" != "\$4" ]; then echo "Unable to read: ${PKGDATA_DIR}/kernel-depmod/System.map-\$4" >&2 - exec env depmod "\$1" "\$2" "\$3" "\$4" + exec env depmod -C "\$3${sysconfdir}/depmod.d" "\$1" "\$2" "\$3" "\$4" else - exec env depmod "\$1" "\$2" "\$3" -F "${PKGDATA_DIR}/kernel-depmod/System.map-\$4" "\$4" + exec env depmod -C "\$3${sysconfdir}/depmod.d" "\$1" "\$2" "\$3" -F "${PKGDATA_DIR}/kernel-depmod/System.map-\$4" "\$4" fi EOF chmod +x ${D}${bindir_crossscripts}/depmodwrapper } -SYSROOT_PREPROCESS_FUNCS += "depmodwrapper_sysroot_preprocess" +SYSROOT_DIRS += "${bindir_crossscripts}" -depmodwrapper_sysroot_preprocess () { - sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts} -} +PACKAGES = "" +inherit nopackages diff --git a/meta/recipes-kernel/kmod/kmod-native_git.bb b/meta/recipes-kernel/kmod/kmod-native_git.bb deleted file mode 100644 index f0e274ed79..0000000000 --- a/meta/recipes-kernel/kmod/kmod-native_git.bb +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (C) 2012 Khem Raj <raj.khem@gmail.com> -# Released under the MIT license (see COPYING.MIT for the terms) - -require kmod.inc - -DEPENDS += "zlib-native" - -inherit native - -SRC_URI += "file://Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch \ - " - -do_install_append (){ - for tool in depmod insmod lsmod modinfo modprobe rmmod - do - ln -s kmod ${D}${bindir}/$tool - done -} diff --git a/meta/recipes-kernel/kmod/kmod.inc b/meta/recipes-kernel/kmod/kmod.inc deleted file mode 100644 index 71ffdf88dd..0000000000 --- a/meta/recipes-kernel/kmod/kmod.inc +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (C) 2012 Khem Raj <raj.khem@gmail.com> -# Released under the MIT license (see COPYING.MIT for the terms) - -SUMMARY = "Tools for managing Linux kernel modules" -DESCRIPTION = "kmod is a set of tools to handle common tasks with Linux kernel modules like \ - insert, remove, list, check properties, resolve dependencies and aliases." -HOMEPAGE = "http://packages.profusion.mobi/kmod/" -LICENSE = "GPL-2.0+ & LGPL-2.1+" -LICENSE_libkmod = "LGPL-2.1+" -SECTION = "base" - -DEPENDS += "pkgconfig-native" - -LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ - file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ - " -inherit autotools gtk-doc - -SRCREV = "114ec87c85c35a2bd3682f9f891e494127be6fb5" -# Lookout for PV bump too when SRCREV is changed -PV = "21+git${SRCPV}" - -SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git \ - file://depmod-search.conf \ - file://avoid_parallel_tests.patch \ - file://fix-O_CLOEXEC.patch \ - " - -S = "${WORKDIR}/git" - -EXTRA_AUTORECONF += "--install --symlink" -EXTRA_OECONF +=" --enable-tools --disable-manpages --with-zlib" - -PACKAGECONFIG[debug] = "--enable-debug,--disable-debug" -PACKAGECONFIG[logging] = " --enable-logging,--disable-logging" - -do_configure_prepend () { - gtkdocize --docdir ${S}/libkmod/docs || touch ${S}/libkmod/docs/gtk-doc.make -} - -do_configure_append () { - sed -i 's#}libtool#}${TARGET_SYS}-libtool#' ${B}/doltlibtool -} diff --git a/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch b/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch deleted file mode 100644 index b722183b68..0000000000 --- a/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch +++ /dev/null @@ -1,39 +0,0 @@ -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/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch b/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch index feafcb9b7c..04a8204815 100644 --- a/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch +++ b/meta/recipes-kernel/kmod/kmod/avoid_parallel_tests.patch @@ -1,3 +1,8 @@ +From be6f82c54f694617c646ca1f8b5bcf93694e20ad Mon Sep 17 00:00:00 2001 +From: Tudor Florea <tudor.florea@enea.com> +Date: Fri, 6 Sep 2013 21:11:57 +0000 +Subject: [PATCH] kmod: avoid parallel-tests + 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. @@ -5,17 +10,17 @@ 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) +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 +index ee72283..60980c0 100644 --- a/configure.ac +++ b/configure.ac -@@ -14,7 +14,7 @@ AC_USE_SYSTEM_EXTENSIONS +@@ -14,8 +14,8 @@ AC_USE_SYSTEM_EXTENSIONS AC_SYS_LARGEFILE AC_PREFIX_DEFAULT([/usr]) AM_MAINTAINER_MODE([enable]) @@ -23,7 +28,5 @@ index eb0f9d1..a539968 100644 +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 + AS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not supported by kmod])]) diff --git a/meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch b/meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch deleted file mode 100644 index 8161d6128d..0000000000 --- a/meta/recipes-kernel/kmod/kmod/fix-O_CLOEXEC.patch +++ /dev/null @@ -1,38 +0,0 @@ -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/meta/recipes-kernel/kmod/kmod_29.bb b/meta/recipes-kernel/kmod/kmod_29.bb new file mode 100644 index 0000000000..91951edde1 --- /dev/null +++ b/meta/recipes-kernel/kmod/kmod_29.bb @@ -0,0 +1,86 @@ +# Copyright (C) 2012 Khem Raj <raj.khem@gmail.com> +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "Tools for managing Linux kernel modules" +DESCRIPTION = "kmod is a set of tools to handle common tasks with Linux kernel modules like \ + insert, remove, list, check properties, resolve dependencies and aliases." +HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kmod/" +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" +LICENSE:libkmod = "LGPL-2.1-or-later" +SECTION = "base" + +LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ + file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ + file://tools/COPYING;md5=751419260aa954499f7abaabaa882bbe \ + " +inherit autotools bash-completion gtk-doc pkgconfig manpages update-alternatives + +SRCREV = "b6ecfc916a17eab8f93be5b09f4e4f845aabd3d1" + +SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git;branch=master \ + file://depmod-search.conf \ + file://avoid_parallel_tests.patch \ + " + +S = "${WORKDIR}/git" + +EXTRA_OECONF += "--enable-tools" + +PACKAGECONFIG ??= "zlib" +PACKAGECONFIG[debug] = "--enable-debug,--disable-debug" +PACKAGECONFIG[logging] = " --enable-logging,--disable-logging" +PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native" +PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl" +PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz" +PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib" +PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd" + +GTKDOC_DOCDIR = "${S}/libkmod/docs" + +PROVIDES += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" +RPROVIDES:${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" +RCONFLICTS:${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" +RREPLACES:${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" + +# to force user to remove old module-init-tools and replace them with kmod variants +RCONFLICTS:libkmod2 += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" + +# autotools set prefix to /usr, however we want them in /bin and /sbin +EXTRA_OECONF += "--bindir=${base_bindir} --sbindir=${base_sbindir}" + +do_install:append () { + install -dm755 ${D}${base_bindir} + install -dm755 ${D}${base_sbindir} + # add symlinks to kmod + ln -rs ${D}${base_bindir}/kmod ${D}${base_bindir}/lsmod + for tool in insmod rmmod depmod modinfo modprobe; do + ln -rs ${D}${base_bindir}/kmod ${D}${base_sbindir}/${tool} + done + # configuration directories + install -dm755 ${D}${nonarch_base_libdir}/depmod.d + install -dm755 ${D}${nonarch_base_libdir}/modprobe.d + install -dm755 ${D}${sysconfdir}/depmod.d + install -dm755 ${D}${sysconfdir}/modprobe.d + + # install depmod.d file for search/ dir + install -Dm644 "${WORKDIR}/depmod-search.conf" "${D}${nonarch_base_libdir}/depmod.d/search.conf" +} + +ALTERNATIVE_PRIORITY = "70" + +ALTERNATIVE:kmod = "insmod modprobe rmmod modinfo bin-lsmod lsmod depmod" + +ALTERNATIVE_LINK_NAME[depmod] = "${base_sbindir}/depmod" +ALTERNATIVE_LINK_NAME[insmod] = "${base_sbindir}/insmod" +ALTERNATIVE_LINK_NAME[modprobe] = "${base_sbindir}/modprobe" +ALTERNATIVE_LINK_NAME[rmmod] = "${base_sbindir}/rmmod" +ALTERNATIVE_LINK_NAME[modinfo] = "${base_sbindir}/modinfo" +ALTERNATIVE_LINK_NAME[bin-lsmod] = "${base_bindir}/lsmod" +ALTERNATIVE_LINK_NAME[lsmod] = "${base_sbindir}/lsmod" +ALTERNATIVE_TARGET[lsmod] = "${base_bindir}/lsmod.${BPN}" + +PACKAGES =+ "libkmod" +FILES:libkmod = "${base_libdir}/libkmod*${SOLIBS} ${libdir}/libkmod*${SOLIBS}" +FILES:${PN} += "${nonarch_base_libdir}/depmod.d ${nonarch_base_libdir}/modprobe.d" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-kernel/kmod/kmod_git.bb b/meta/recipes-kernel/kmod/kmod_git.bb deleted file mode 100644 index e0bb95c8f6..0000000000 --- a/meta/recipes-kernel/kmod/kmod_git.bb +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright (C) 2012 Khem Raj <raj.khem@gmail.com> -# Released under the MIT license (see COPYING.MIT for the terms) - -require kmod.inc - -DEPENDS += "zlib" -PROVIDES += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" -RPROVIDES_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" -RCONFLICTS_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" -RREPLACES_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" - -# to force user to remove old module-init-tools and replace them with kmod variants -RCONFLICTS_libkmod2 += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" - -# autotools set prefix to /usr, however we want them in /bin and /sbin -bindir = "${base_bindir}" -sbindir = "${base_sbindir}" -# libdir = "${base_libdir}" - -do_install_append () { - install -dm755 ${D}${base_bindir} - install -dm755 ${D}${base_sbindir} - # add symlinks to kmod - lnr ${D}${base_bindir}/kmod ${D}${base_bindir}/lsmod - for tool in insmod rmmod depmod modinfo modprobe; do - lnr ${D}${base_bindir}/kmod ${D}${base_sbindir}/${tool} - done - # configuration directories - install -dm755 ${D}${base_libdir}/depmod.d - install -dm755 ${D}${base_libdir}/modprobe.d - install -dm755 ${D}${sysconfdir}/depmod.d - install -dm755 ${D}${sysconfdir}/modprobe.d - - # install depmod.d file for search/ dir - install -Dm644 "${WORKDIR}/depmod-search.conf" "${D}${base_libdir}/depmod.d/search.conf" -} - -do_compile_prepend() { - sed -i 's/ac_pwd=/#ac_pwd=/' config.status ; sed -i "/#ac_pwd=/a\ac_pwd='.'" config.status -} - -inherit update-alternatives - -ALTERNATIVE_PRIORITY = "60" - -ALTERNATIVE_kmod = "insmod modprobe rmmod modinfo bin-lsmod lsmod depmod" - -ALTERNATIVE_LINK_NAME[insmod] = "${base_sbindir}/insmod" -ALTERNATIVE_LINK_NAME[modprobe] = "${base_sbindir}/modprobe" -ALTERNATIVE_LINK_NAME[rmmod] = "${base_sbindir}/rmmod" -ALTERNATIVE_LINK_NAME[modinfo] = "${base_sbindir}/modinfo" -ALTERNATIVE_LINK_NAME[bin-lsmod] = "${base_bindir}/lsmod" - -ALTERNATIVE_LINK_NAME[lsmod] = "${base_sbindir}/lsmod" -ALTERNATIVE_TARGET[lsmod] = "${base_bindir}/lsmod.${BPN}" - -ALTERNATIVE_LINK_NAME[depmod] = "${base_sbindir}/depmod" - -PACKAGES =+ "libkmod ${PN}-bash-completion" - -FILES_libkmod = "${base_libdir}/libkmod*${SOLIBS} ${libdir}/libkmod*${SOLIBS}" -FILES_${PN} += "${base_libdir}/depmod.d ${base_libdir}/modprobe.d" -FILES_${PN}-bash-completion = "${datadir}/bash-completion" |