summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/kmod/kmod_30.bb
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2022-07-06 10:07:01 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-07-08 00:09:42 +0100
commit7865eeae0633dad6500d893abcda6de2e05b7528 (patch)
tree6673fc64ccf4101390e274fdc6311b89772f481d /meta/recipes-kernel/kmod/kmod_30.bb
parent5374f51c6b383e4d82a3d122a13ab0855e72ecc0 (diff)
downloadpoky-7865eeae0633dad6500d893abcda6de2e05b7528.tar.gz
kmod: upgrade 29 -> 30
(From OE-Core rev: 3f2084c3b6f2e9b251f87339e0fd60f9b1005f8c) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/kmod/kmod_30.bb')
-rw-r--r--meta/recipes-kernel/kmod/kmod_30.bb89
1 files changed, 89 insertions, 0 deletions
diff --git a/meta/recipes-kernel/kmod/kmod_30.bb b/meta/recipes-kernel/kmod/kmod_30.bb
new file mode 100644
index 0000000000..8eb83efe6d
--- /dev/null
+++ b/meta/recipes-kernel/kmod/kmod_30.bb
@@ -0,0 +1,89 @@
1# Copyright (C) 2012 Khem Raj <raj.khem@gmail.com>
2# Released under the MIT license (see COPYING.MIT for the terms)
3
4SUMMARY = "Tools for managing Linux kernel modules"
5DESCRIPTION = "kmod is a set of tools to handle common tasks with Linux kernel modules like \
6 insert, remove, list, check properties, resolve dependencies and aliases."
7HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kmod/"
8LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later"
9LICENSE:libkmod = "LGPL-2.1-or-later"
10SECTION = "base"
11
12LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
13 file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
14 file://tools/COPYING;md5=751419260aa954499f7abaabaa882bbe \
15 "
16inherit autotools bash-completion gtk-doc pkgconfig manpages update-alternatives
17
18SRCREV = "5d46434a63ae0160150a0efdde1914873697e273"
19
20SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git;branch=master \
21 file://depmod-search.conf \
22 file://avoid_parallel_tests.patch \
23 "
24
25S = "${WORKDIR}/git"
26
27EXTRA_OECONF += "--enable-tools"
28
29PACKAGECONFIG ??= "zlib xz"
30PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
31PACKAGECONFIG[logging] = " --enable-logging,--disable-logging"
32PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native"
33PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl"
34PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz"
35PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
36PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd"
37
38GTKDOC_DOCDIR = "${S}/libkmod/docs"
39
40PROVIDES += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools"
41RPROVIDES:${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools"
42RCONFLICTS:${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools"
43RREPLACES:${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools"
44
45# to force user to remove old module-init-tools and replace them with kmod variants
46RCONFLICTS:libkmod2 += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools"
47
48# autotools set prefix to /usr, however we want them in /bin and /sbin
49EXTRA_OECONF += "--bindir=${base_bindir} --sbindir=${base_sbindir}"
50
51do_install:append () {
52 install -dm755 ${D}${base_bindir}
53 install -dm755 ${D}${base_sbindir}
54 # add symlinks to kmod
55 ln -rs ${D}${base_bindir}/kmod ${D}${base_bindir}/lsmod
56 for tool in insmod rmmod depmod modinfo modprobe; do
57 ln -rs ${D}${base_bindir}/kmod ${D}${base_sbindir}/${tool}
58 done
59 # configuration directories
60 install -dm755 ${D}${nonarch_base_libdir}/depmod.d
61 install -dm755 ${D}${nonarch_base_libdir}/modprobe.d
62 install -dm755 ${D}${sysconfdir}/depmod.d
63 install -dm755 ${D}${sysconfdir}/modprobe.d
64
65 # install depmod.d file for search/ dir
66 install -Dm644 "${WORKDIR}/depmod-search.conf" "${D}${nonarch_base_libdir}/depmod.d/search.conf"
67
68 # Add .debug to the exclude path for depmod
69 echo "exclude .debug" > ${D}${nonarch_base_libdir}/depmod.d/exclude.conf
70}
71
72ALTERNATIVE_PRIORITY = "70"
73
74ALTERNATIVE:kmod = "insmod modprobe rmmod modinfo bin-lsmod lsmod depmod"
75
76ALTERNATIVE_LINK_NAME[depmod] = "${base_sbindir}/depmod"
77ALTERNATIVE_LINK_NAME[insmod] = "${base_sbindir}/insmod"
78ALTERNATIVE_LINK_NAME[modprobe] = "${base_sbindir}/modprobe"
79ALTERNATIVE_LINK_NAME[rmmod] = "${base_sbindir}/rmmod"
80ALTERNATIVE_LINK_NAME[modinfo] = "${base_sbindir}/modinfo"
81ALTERNATIVE_LINK_NAME[bin-lsmod] = "${base_bindir}/lsmod"
82ALTERNATIVE_LINK_NAME[lsmod] = "${base_sbindir}/lsmod"
83ALTERNATIVE_TARGET[lsmod] = "${base_bindir}/lsmod.${BPN}"
84
85PACKAGES =+ "libkmod"
86FILES:libkmod = "${base_libdir}/libkmod*${SOLIBS} ${libdir}/libkmod*${SOLIBS}"
87FILES:${PN} += "${nonarch_base_libdir}/depmod.d ${nonarch_base_libdir}/modprobe.d"
88
89BBCLASSEXTEND = "native nativesdk"