mirror of
https://git.yoctoproject.org/poky
synced 2026-02-25 19:09:41 +01:00
linux-yocto kernel adds openssl-native dependency by default even
when module signing is still optional. kmod should enable
openssl support too. This helps see details of signed kernel
modules and debug issues with module signing. For small systems
this can still be disabled.
modinfo output shows bad signing info when kernel signing is enabled
but openssl support is missing from kmod:
root@qemux86-64:~# dmesg|grep 509
[ 0.750905] ACPI: PCI: Interrupt link LNKG configured for IRQ 11
[ 0.950039] Asymmetric key parser 'x509' registered
[ 1.241727] Loading compiled-in X.509 certificates
[ 1.267863] Loaded X.509 cert 'Build time autogenerated kernel key: 48bcd79439f61aaf8fc19ec0882439d64db73820'
root@qemux86-64:~# lsmod
Module Size Used by
sch_fq_codel 20480 1
root@qemux86-64:~# modinfo sch_fq_codel
filename: /lib/modules/5.19.9-yocto-standard/kernel/net/sched/sch_fq_codel.ko
description: Fair Queue CoDel discipline
license: GPL
author: Eric Dumazet
depends:
retpoline: Y
intree: Y
name: sch_fq_codel
vermagic: 5.19.9-yocto-standard SMP preempt mod_unload
sig_id: PKCS#7
signer:
sig_key:
sig_hashalgo: unknown
signature:
modinfo with openssl enabled in kmod:
root@qemux86-64:~# modinfo sch_fq_codel
filename: /lib/modules/5.19.9-yocto-standard/kernel/net/sched/sch_fq_codel.ko
description: Fair Queue CoDel discipline
license: GPL
author: Eric Dumazet
depends:
retpoline: Y
intree: Y
name: sch_fq_codel
vermagic: 5.19.9-yocto-standard SMP preempt mod_unload
sig_id: PKCS#7
signer: Build time autogenerated kernel key
sig_key: 07:9A:C4:36:96:98:6E:5B:73:CF:C8:40:A6:57:D9:03:5E:27:8D:25
sig_hashalgo: sha512
signature: 21:4D:F0:E2:E0:7C:8E:31:A0:96:12:68:06:0D:FA:0D:E2:17:45:64:
51:94:7E:B0:97:DD:EB:59:89:CA:1A:C3:10:E7:7C:4D:5D:F0:5D:B6:
2A:61:D3:BF:89:7A:0D:CD:A2:39:57:1B:C6:B5:7D:C1:DB:6F:D9:36:
29:7A:07:18:F5:22:9F:9A:33:4D:38:BC:79:C8:51:8B:82:0F:B4:09:
08:37:52:11:98:50:7E:19:28:0F:13:2E:03:A5:E8:F8:D9:E7:DF:61:
18:AC:22:FE:96:BD:D0:55:96:9E:C9:1C:15:C9:0B:9A:5A:FD:D0:C0:
8F:41:12:5B:EA:4B:E5:5D:4D:EA:D5:2E:E5:80:D4:51:CC:63:97:F3:
4B:39:CC:B6:A1:83:F5:EF:2F:A1:22:CD:CA:BC:DB:82:C0:E4:AB:13:
5D:C5:F3:BC:B7:3E:B4:16:BF:87:1D:AC:69:43:1F:78:2A:5F:E2:63:
52:A2:DA:FC:F9:C0:BA:D8:1A:FE:58:4E:6A:D8:DE:BE:F8:F6:C2:59:
CE:F5:0A:A0:15:A3:01:BC:B6:70:36:4E:5F:D6:9B:B0:DE:93:15:3E:
35:37:38:D9:01:2B:72:2F:D3:74:A4:AD:F4:5F:52:74:44:E1:C9:D3:
A9:87:BC:93:58:8A:82:DB:14:6F:E0:4D:AF:8E:B5:3D:92:20:8B:4A:
04:54:6C:21:F1:76:DF:08:A9:0A:A5:D5:D0:17:CA:98:B5:F4:9F:F6:
9C:8F:DA:09:C2:37:FB:36:23:D1:25:27:4C:DB:9B:43:19:EB:55:1C:
DA:32:04:A5:B1:97:F7:A3:3B:82:55:FD:BD:6D:90:BB:61:E6:D3:93:
42:CB:FD:4A:1B:3E:03:43:7D:E3:85:32:91:45:C9:B4:CD:DC:B7:07:
37:58:8A:4A:49:5F:F7:26:41:E1:BB:A1:64:B5:86:00:17:9D:D7:81:
31:BA:DC:BF:04:CC:11:55:B1:C6:24:83:43:33:34:2D:BF:00:74:26:
6A:EC:56:90:C7:1B:C2:78:5C:7F:25:2D:78:BD:C5:D9:7D:69:6A:32:
5D:EF:48:6C:21:64:47:2A:FE:34:3C:58:8D:9E:D7:42:76:BE:89:84:
8D:62:9D:62:DE:7C:88:C4:5F:AA:13:20:6B:90:53:16:4E:06:EE:8A:
DE:F7:EA:F8:92:03:7D:84:B7:0C:9F:A0:52:B7:5E:21:BF:37:6A:C9:
34:6D:69:1E:4A:CC:48:F2:0A:6C:B8:AD:83:C0:8F:76:CC:43:0E:29:
17:A9:22:F3:0B:59:A9:87:24:AD:84:CD:EE:E2:C3:93:F7:A8:11:ED:
9A:CC:DA:7F:9D:73:06:5C:A7:1A:6A:54
(From OE-Core rev: d6a62eb68641239985a1f8cf9cf4528a07fd0b99)
Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
90 lines
4.0 KiB
BlitzBasic
90 lines
4.0 KiB
BlitzBasic
# 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 = "5d46434a63ae0160150a0efdde1914873697e273"
|
|
|
|
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 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"
|
|
|
|
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"
|
|
|
|
# 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"
|