From b79a8eb7c9d91553529a6e50351390aa6d34744f Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Sun, 26 May 2024 12:43:48 +0800 Subject: kmod: upgrade from 31 to 32 kmod now installs symlinks in 'make install'. https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/commit/? id=e98cef6f3f8cd6f8bfb26d147b2c209297453cca Changes are made in do_install to ensure that we can to continue to use sbin. This is because our kernel has: CONFIG_MODPROBE_PATH='/sbin/modprobe'. We'll need to sync our kmod path settings with our kernel config. Otherwise, things would fail. For example, libnl's some ptest cases fail. (From OE-Core rev: 99e0a6ed8a08faa86116fbb8989bbb234bd7fc53) Signed-off-by: Chen Qi Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- meta/recipes-kernel/kmod/kmod_31.bb | 89 ------------------------------------ meta/recipes-kernel/kmod/kmod_32.bb | 90 +++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 89 deletions(-) delete mode 100644 meta/recipes-kernel/kmod/kmod_31.bb create mode 100644 meta/recipes-kernel/kmod/kmod_32.bb (limited to 'meta/recipes-kernel/kmod') diff --git a/meta/recipes-kernel/kmod/kmod_31.bb b/meta/recipes-kernel/kmod/kmod_31.bb deleted file mode 100644 index 718a5565b4..0000000000 --- a/meta/recipes-kernel/kmod/kmod_31.bb +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright (C) 2012 Khem Raj -# 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 = "aff617ea871d0568cc491bd116c0be1e857463bb" - -SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git;branch=master;protocol=https \ - file://depmod-search.conf \ - file://avoid_parallel_tests.patch \ - file://0001-Use-portable-implementation-for-basename-API.patch \ - file://gtkdocdir.patch \ - " - -S = "${WORKDIR}/git" - -EXTRA_OECONF += "--enable-tools" - -PACKAGECONFIG ??= "zlib xz openssl" -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" - -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 "${UNPACKDIR}/depmod-search.conf" "${D}${nonarch_base_libdir}/depmod.d/search.conf" - - # Add .debug to the exclude path for depmod - echo "exclude .debug" > ${D}${nonarch_base_libdir}/depmod.d/exclude.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_32.bb b/meta/recipes-kernel/kmod/kmod_32.bb new file mode 100644 index 0000000000..1c4e5a94db --- /dev/null +++ b/meta/recipes-kernel/kmod/kmod_32.bb @@ -0,0 +1,90 @@ +# Copyright (C) 2012 Khem Raj +# 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 = "41faa59711742c1476d59985011ee0f27ed91d30" + +SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git;branch=master;protocol=https \ + file://depmod-search.conf \ + file://avoid_parallel_tests.patch \ + file://0001-Use-portable-implementation-for-basename-API.patch \ + file://gtkdocdir.patch \ + " + +S = "${WORKDIR}/git" + +EXTRA_OECONF += "--enable-tools" + +PACKAGECONFIG ??= "zlib xz openssl" +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" + +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 + [ -e ${D}${base_bindir}/lsmod ] || ln -rs ${D}${base_bindir}/kmod ${D}${base_bindir}/lsmod + for tool in insmod rmmod depmod modinfo modprobe; do + rm -f ${D}${base_bindir}/${tool} + 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 "${UNPACKDIR}/depmod-search.conf" "${D}${nonarch_base_libdir}/depmod.d/search.conf" + + # Add .debug to the exclude path for depmod + echo "exclude .debug" > ${D}${nonarch_base_libdir}/depmod.d/exclude.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" -- cgit v1.2.3-54-g00ecf