mirror of
https://git.yoctoproject.org/poky
synced 2026-02-28 20:39:39 +01:00
Changelog:
===========
- Improvements
- Allow passing a path to modprobe so the module is loaded from
anywhere from the filesystem, but still handling the module
dependencies recorded in the indexes.
- Use in-kernel decompression if available.
- Make modprobe fallback to syslog when stderr is not available, as was
documented in the man page, but not implemented
- Better explaing `modprobe -r` and how it differentiates from rmmod
- depmod learned a `-o <dir>` option to allow using a separate output
directory.
- Add compat with glibc >= 2.32.9000 that dropped __xstat
- Improve testsuite to stop skipping tests when sysconfdir is something
other than /etc
- Build system improvements and updates
- Change a few return codes from -ENOENT to -ENODATA to avoid confusing output
in depmod when the module itself lacks a particular ELF section due to e.g.
CONFIG_MODVERSIONS=n in the kernel.
- Bug Fixes
- Fix testsuite using uninitialized memory when testing module removal
with --wait
- Fix testsuite not correctly overriding the stat syscall on 32-bit
platforms. For most architectures this was harmless, but for MIPS it
was causing some tests to fail.
- Fix handling unknown signature algorithm
- Fix linking with a static liblzma, libzstd or zlib
- Fix memory leak when removing module holders
- Fix out-of-bounds access when using very long paths as argument to rmmod
- Fix warnings reported by UBSan
(From OE-Core rev: 15baf1183c1551ec7204abc679bd973ffb39770f)
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@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 = "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 \
|
|
"
|
|
|
|
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"
|