summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/kmod
Commit message (Collapse)AuthorAgeFilesLines
* The poky repository master branch is no longer being updated.Richard Purdie2025-11-073-138/+0
| | | | | | | | | | | | | | | | | | | | | You can either: a) switch to individual clones of bitbake, openembedded-core, meta-yocto and yocto-docs b) use the new bitbake-setup You can find information about either approach in our documentation: https://docs.yoctoproject.org/ Note that "poky" the distro setting is still available in meta-yocto as before and we continue to use and maintain that. Long live Poky! Some further information on the background of this change can be found in: https://lists.openembedded.org/g/openembedded-architecture/message/2179 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: set S from UNPACKDIR in recipes that use only local filesAlexander Kanavin2025-06-201-2/+1
| | | | | | | | | | | | | | | There is no need to have two assignments; also setting S from UNPACKDIR (and not vice versa) is more logical as unpack task comes first, and tasks that come after unpack use S to access unpack results. Also adjust reference test data in selftest/recipeutils to reflect changes in test recipes. (From OE-Core rev: f64b7e5fb3181734c8dde87b27e872a026261a74) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: upgrade 34.1 -> 34.2Richard Purdie2025-04-031-1/+1
| | | | | | (From OE-Core rev: 2fea0ebe4188013e65ada33d47b70208c7bdbe36) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: Upgrade 33 -> 34.1Alex Kiernan2025-03-174-100/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Migrate to meson from autotools. Drop remnants of ptest support which was removed in 2015: https://git.openembedded.org/openembedded-core/commit/?id=f80d136bdd578468035a88125fa1b84973fd912b Remove configuration directory/symlink handling which is now done by the meson build. Fix manpage generation. kmod 34 ======= - Improvements - Drop pre-built .ko modules from git - distros/packages will need the linux-headers to be able to run the testsuite. There was limited use of the feature, while linters complained about "source-not-included" or "source-contains-prebuilt-binary". - Switch build system to meson: autotools is still supported but slated for removal on next release. This is the transition release to help distros and integrators to move to the new build system. Default options target distros while developers can use the build-dev.ini configuration file. - Allow to load decompression libraries on demand: liblzma.so, libz.so and libzstd.so can now be loaded on demand, only when there is such a need. For use during early boot for loading modules, if configured well it means none of these libraries are loaded: the module loading logic via finit_module() will just hand over to kernel the open file descriptor and kernel will use its own decompress routine. If kernel doesn't handle decompression or if the module is compressed with a different algorithm than the one configured in the kernel, libkmod can still open the module by dynamically loading the correspondent library. Tools inspecting the module contents, like modinfo, will load that single decompression library instead all of them. For distros building with meson it's possible to choose the behavior per library. Examples: a) -Ddlopen=all uses dlopen behavior for all the libraries; b) -Ddlopen=xz, will make only xz to be dlopen'ed while other enabled libraries will be linked in at build time. The use of dlopen is annotated in the ELF file by using the ELF Package Metadata spec as documented in https://systemd.io/ELF_PACKAGE_METADATA/. Example: $ dlopen-notes.py libkmod.so # build/libkmod.so [ { "feature": "xz", "description": "Support for uncompressing xz-compressed modules", "priority": "recommended", "soname": [ "liblzma.so.5" ] } ] - Add -m / --moduledir to depmod to override in runtime the module directory that was already possible to set on build time. Document the interaction between the dir options: base, module and output. - Better error propagation in libkmod for its internal APIs and libc functions up to the callers. - Improve libkmod API documentation by adding new sections, documenting functions previously missing, rewording existing ones, adding version information, cross-referencing, etc. - Remove deprecated arguments for depmod: --unresolved-error, --quiet, --root and --map. - Remove deprecated arguments for rmmod: -w. - Remove deprecated arguments for insmod: -p and -s. - Add --syslog and --force for insmod to normalize it with other tools. - Add bash, fish and zsh shell-completion for insmod, rmmod and lsmod. - Remove depmod_module_directory_override from .pc as the kernel side is not making use of it and will likely not need it. - Improve builtin module listing and retrieving information from its modinfo index which reduces the amount of needed syscalls by 90%. - Improve zstd decompression by using streaming bufferless mode which reduces the amount of syscalls by 65%. - Increase use of pread while parsing ELF and indexes in order to reduce syscalls and improve performance. - Improve module sorting in depmod to speedup the use of the modules.order index and support duplicate lines in it. - Avoid misaligned memory access while reading module signature in libkmod. - Add more documentation for contributing to kmod. New developers are welcome to look at the new README.md and CONTRIBUTING.md files for information on process, coding style, build/installation, etc. - Overhaul man pages with multiple clarifications, section rewrites and additional documentation. - Drop --with-rootlibdir as it's seldom used and was partially broken. - Drop strndupa() and alloca() for increased libc compatibility. - Better handling of LFS for increased compatibility with libc. - Protect kmod_get_dirname() and kmod_new() against NULL argument. - Normalize --version / --help output across all tools. - Always include log priority in messages, even when building with debug. - Optimize index reading by lazily reading nodes on demand, reducing FILE overhead and reducing code duplication wrt FILE vs mmap implementations, etc. - Switch index to pre-order to improve performance in both read and write, meaning faster lookup and faster depmod. Some examples: a) traversing all indexes via configuration dump shows a 9% improvement on Raspberry Pi 2. b) writing the indexes takes 90% less lseek() calls, leading to a performance gain of 13%. - Make symlink install locations more similar to what distros are using: by default it installs the kmod binary as bin/kmod and the symlinks are located in e.g. `sbin/depmod -> ../bin/kmod`. Changing the sbin location is sufficient to move the symlinks to the appropriate place, so distros using `--sbin /usr/bin` will have them installed in that directory. This avoids distros having to remove the symlink and add the symlinks by themselves. (meson only) - Install configuration directories, /{etc,usr/lib}/{depmod,modprobe}.d/ as part of installation, matching what several distros do during packaging. (meson only) - Bug fixes - Fix testsuite using when using configurable module dir. - Fix typos on documentation and source code. - Fix out of bound access in multiple places when using long paths, synthetic huge files, or handling memory allocation errors, or inconsistent variable types, particularly on 32b builds. - Fix internal array APIs, with better error checking: improve execution on very memory-constrained scenarios or very long paths. - Fix absolute path handling in depmod. - Fix libkmod memory leaks on error handling when getting builtin module list. - Do not crash on invalid modules.builtin.modinfo file. - Fix link with lld resulting in empty testsuite. - Fix testsuite build/execution with musl. - Others - Adopt clang-format and editorconfig for coding style and setup CI action to keep the codebase consistent. - Adopt codespell in CI. - Adopt CodeQL integration in CI. - Adopt Codecov in CI. - Adopt SPDX copyright and license identifiers throughout the project. - Add more distros to CI, 32b builds, clang as compiler and lld as linker. - Add support for clang sanitizers and squelch warnings. - Add tests for builtin modules from modinfo index file. - Multiple testsuite refactors and fixes to make it simpler to write tests. - Add CI coverage for docs - Improve strbuf implementation with more error checks and generalize it to cover the role of scratchbuf. This allows to remove the scratchbuf implementation. - Use common array and strbuf code in depmod to remove duplication. - Add abstraction and use more compiler builtins for addition and multiplication with overflow checking. - Normalize use of C attributes throughout the project. (From OE-Core rev: 5ed23bb44dcfb6488134a0e5d83adc9abbaed1aa) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: upgrade 32 -> 33Alexander Kanavin2024-08-234-152/+10
| | | | | | | | | | | | | Disable manpages, as they require scdoc, which is not currently available in core (and adjust a related selftest). Drop 0001-Use-portable-implementation-for-basename-API.patch as upstream fixed the issue differently. (From OE-Core rev: f868b75ab22cd528d9add744042f13d475715ef4) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: upgrade from 31 to 32Chen Qi2024-05-301-2/+3
| | | | | | | | | | | | | | | | | 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 <Qi.Chen@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipes: Switch away from S = WORKDIRRichard Purdie2024-05-211-1/+2
| | | | | | | | | | | | | Where recipes use S = ${WORKDIR}, change them to set UNPACKDIR to a subdir of WORKDIR and make S point at this instead. I've chosen not to force S into any standard UNPACKDIR we may pick in future just so the S = UNPACKDIR case is clearly visible by the directory naming under WORKDIR as that should aid usability. (From OE-Core rev: d9328e3b0b062f0621de3d114584b44f384a1c02) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipes: Update WORKDIR references to UNPACKDIRRichard Purdie2024-05-021-1/+1
| | | | | | | | | | Since we want to be able to stop unpacking to WORKDIR, correct the WORKDIR references in recipe do_compile/do_install tasks to use UNPACKDIR in the appropraite places instead. (From OE-Core rev: d73595df69667fe9d12ecd407b77a0b8dae2109c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: fix configure with autopoint calling gtkdocizeRoss Burton2024-01-122-2/+34
| | | | | | | | | | GTKDOC_DOCDIR is obsolete now, so fix the build by passing the documentation directory in the GTK_DOC_CHECK call. (From OE-Core rev: c2f0e8ccd57c18fee36fc0adbbaf63e2302b8268) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: Fix build with latest muslKhem Raj2023-12-132-0/+137
| | | | | | | | | | implement glibc compatible basename() funciton for portability (From OE-Core rev: 3a49ef1155d210fc9adeaed2d35df48fc29ba7f3) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: upgrade 30 -> 31Wang Mingyu2023-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* kmod: remove unused ptest.patchMartin Jansa2023-05-251-25/+0
| | | | | | | | | | * it was removed from SRC_URI in 2015: https://git.openembedded.org/openembedded-core/commit/?id=f80d136bdd578468035a88125fa1b84973fd912b (From OE-Core rev: cfc4586b4bf080a3a4aa419dffc76c5da2a95b74) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipes: Default to https git protocol where possibleRichard Purdie2023-05-051-1/+1
| | | | | | | | | | The recommendation from server maintainers is that the https protocol is both faster and more reliable than the dedicated git protocol at this point. Switch to it where possible. (From OE-Core rev: 139102a73d4151f4748b4a861bd4ab28dda7dab7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: enable openssl support by defaultMikko Rapeli2023-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* depmodwrapper-cross: Take into consideration kernel package nameAndrei Gherzan2022-09-131-6/+10
| | | | | | | | | | | | | depmodwrapper assumes that the kernel package name is "kernel". Since this is configurable via KERNEL_PACKAGE_NAME variable, the wrapper can easily look in the wrong place. This change adds an optional positional argument that can be used to provide the kernel package name - when not provided, it defaults to "kernel" (current behaviour). (From OE-Core rev: 0c2cc62b009467b05bf6e1897989d8ede0412d73) Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: upgrade 29 -> 30Alexander Kanavin2022-07-082-174/+1
| | | | | | | | (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>
* kmod: Enable xz support by defaultKhem Raj2022-04-291-1/+1
| | | | | | | | | | | | | | | | | | RPi kernel has started building compressed kernel modules by default starting 5.15, currenrly therefore meta-raspberrypi kernels are unable to load kernel modules since kmod and kmod-native do not entertain xz compressed modules. There is a fix proposed in meta-raspberrypi [1] but the fix is needed for native and nativesdk recipes as well, perhaps its best to enable it here for best out of box experience with meta-raspberrypi [1] https://github.com/agherzan/meta-raspberrypi/pull/1056 (From OE-Core rev: 20e9917b8d40f576b3661bc29e13602a24e86b7b) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* depmodwrapper-cross: Fix missing $Saul Wold2022-04-051-1/+1
| | | | | | | (From OE-Core rev: 8c95be7dd3940d7c513f3d8a9071ac173a6528d5) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: Update exclude patch to AcceptedSaul Wold2022-04-051-16/+19
| | | | | | | | | | Upstream made a few tweaks and accepted the patch. (From OE-Core rev: 28b79449ed6d0a9920c252f75d0b40da5faa0fd7) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* depmodwrapper: Use nonarch_base_libdir for depmod.dSaul Wold2022-04-031-2/+7
| | | | | | | | | | | | | | | | | This ensure that when depmod-native runs we can find the correct exclude.conf information, in this case adding .debug to ignore the .debug kernell modules. The kmod utilities like depmod can use either /etc/depmod.d or /lib/depmod.d. The kmod recipe is installing the existing search.conf to /lib/depmod.d (nonarch_base_lib) When the busybox modutils are used, /lib/depmod.d is not used, so it's safe add the exclude.conf file to /lib/depmod.d. (From OE-Core rev: af3a8c11a0561c9f0a8055d4b1c7703ce56205af) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: Add an exclude directive to depmodSaul Wold2022-04-032-0/+173
| | | | | | | | | | | | | | | This adds a new configuration directive to depmod that causes depmod to exclude a give path entry like .debug. kernel-dbg provides the modules .debug/<module>.ko files and when installed either directly or when dbg-pkgs are selected this can cause depmod to fail. (From OE-Core rev: 5e7d09142da82c37aeab22c34d5314187c90bd84) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* depmodwrapper-cross: add config directory optionOleksandr Suvorov2022-02-251-2/+2
| | | | | | | | | | | | | | | | | | | | Native depmod by default try to find config files from the following directories: ``` ${STAGING_ETCDIR_NATIVE}/depmod.d /run/depmod.d /usr/local/lib/depmod.d /lib/depmod.d ``` but none of them is correct, change to load config files from ${sysconfdir}/depmod.d of basedir. (From OE-Core rev: aa03d77f009af2b03246554566de2a1eea3f5e2f) Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com> Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/meta-selftest/meta-skeleton: Update LICENSE variable to use SPDX ↵Richard Purdie2022-02-201-2/+2
| | | | | | | | | | | | | license identifiers An automated conversion using scripts/contrib/convert-spdx-licenses.py to convert to use the standard SPDX license identifiers. Two recipes in meta-selftest were not converted as they're that way specifically for testing. A change in linux-firmware was also skipped and may need a more manual tweak. (From OE-Core rev: ceda3238cdbf1beb216ae9ddb242470d5dfc25e0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: expand compression PACKAGECONFIGsRoss Burton2021-12-211-3/+5
| | | | | | | | | | Turn the explicitly enabled zlib support into an enabled by default PACKAGECONFIG, and add Zstd support (disabled by default). (From OE-Core rev: 6dd6184f01d79ebd26347a6006f92a5b5906ee3e) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: merge target/native recipesRoss Burton2021-12-213-61/+35
| | | | | | | | | | | | | There's no good reason to keep separate target and native recipes for kmod, so merge them into a single kmod_29.bb which uses class extension. The symlinks are not created differently for target vs native builds, as the native sbindir is in PATH. (From OE-Core rev: 9abbf481438fba10a7512fb1ad1bff5d48e6fbdc) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: remove obsolete ac_pwd manipulationRoss Burton2021-12-211-4/+0
| | | | | | | | | | | Remove the change of ac_pwd from config.status as the build is successful without it (it was added with no explanation in 152c973 when ptest was enabled). (From OE-Core rev: af0f4c6f7769e9be64adddc29a3bc3fdb8cce389) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: use ln -rs instead of lnrRoss Burton2021-11-101-2/+2
| | | | | | | | | | | | | | | | | lnr is a script in oe-core that creates relative symlinks, with the same behaviour as `ln --relative --symlink`. It was added back in 2014[1] as not all of the supported host distributions at the time shipped coreutils 8.16, the first release with --relative. However the oldest coreutils release in the supported distributions is now 8.22 in CentOS 7, so lnr can be deprecated and users switched to ln. [1] 6ae3b85eaffd1b0b6914422e8de7c1230723157d (From OE-Core rev: 1ca455a98de4c713f58df0a537d4c982d256cd68) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Add explict branch to git SRC_URIsRichard Purdie2021-10-301-1/+1
| | | | | | | | | | | | | There is uncertainty about the default branch name in git going forward. To try and cover the different possible outcomes, add branch names to all git:// and gitsm:// SRC_URI entries. This update was made with the script added to contrib in this patch which aims to help others convert other layers. (From OE-Core rev: b51c405faf6f8c0365f7533bfaf470d79152a463) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: use nonarch_base_libdir for depmod.d and modprobe.dAnton Blanchard2021-08-121-4/+4
| | | | | | | | | These should always be in /lib, regardless of the configuration. (From OE-Core rev: 63877226c09a674d3794fdc171adf12fe604a3c9) Signed-off-by: Anton Blanchard <anton@ozlabs.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Convert to new override syntaxRichard Purdie2021-08-023-11/+11
| | | | | | | | | | | | This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". (From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: upgrade 28 -> 29Richard Purdie2021-05-311-2/+2
| | | | | | (From OE-Core rev: 21f421c5caa3ddecda20e7d8718ba6db4d6acdbd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: do not symlink config.guess/config.sub during autoreconfGavin Li2021-04-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was encountering the following race condition on poky: - automake-native does do_install. - automake-native does do_populate_sysroot. This hardlinks config.guess and config.sub into ${D}. - kmod-native does do_configure. This runs `autoreconf`, which runs `automake --add-missing` (symlinks config.guess/config.sub from recipe-sysroot-native to build dir), then runs `gnu-configize` (copies _its own_ config.guess/config.sub _on top_ of the already existing ones). Since the destinations already had symlinks, the copy would overwrite config.guess/config.sub in recipe-sysroot-native, which would in turn overwrite the same in ${D} due to being hardlinked. - automake-native does do_package. The outhash is thus calculated on the clobbered config.guess/config.sub files. With hash equivalency enabled, the different outhash produced a different unihash, which kept me from reusing sstate between my laptop and my build server. This race condition would happen only on the build server (BB_NUMBER_THREADS = 32) but never on my laptop (BB_NUMBER_THREADS = 6). I didn't see the --install and --symlink flags being used by any other recipe, so I removed them, and that fixed the issue. (From OE-Core rev: 89d675efd633b495daa4a3a57420b9c309497035) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: update 27 -> 28Scott Branden2021-01-161-2/+2
| | | | | | | | | Upgrade kmod from 27 to 28. (From OE-Core rev: 7447ac45edaf7f71d0e4cc60506e1cca546427df) Signed-off-by: Scott Branden <scott.branden@broadcom.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: fix some unresponsive homepages and bugtracker linksMaxime Roussin-Bélanger2020-10-301-1/+1
| | | | | | | | | remove some extra whitespaces (From OE-Core rev: 32ce3716761165b9df12306249418645724122cc) Signed-off-by: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* License-Update: kmod: Add a missing file to LIC_FILES_CHKSUM.Akira Shibakawa2020-10-171-0/+1
| | | | | | | | | | | Although components under tools/ are licensed under GPLv2+ and a binary from them are packaged by default, LIC_FILES_CHKSUM does not include GPLv2 license file, tools/COPYING. (From OE-Core rev: f5f1507a4ec7d7bac14dd152215b3695f8d50c1e) Signed-off-by: Akira Shibakawa <arabishi900@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: add packageconfig for xz and sslJens Rehsack2020-07-191-0/+2
| | | | | | | | | | Add the opportunity for kmod (and depmod etc.) to deal with Xz-compressed kernel modules and handle PKCS7 signatures, if desired. (From OE-Core rev: 37a62924755761a4df410cbf7c177292249ecdc2) Signed-off-by: Jens Rehsack <sno@netbsd.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: add nativesdk supporthongxu2020-06-161-0/+2
| | | | | | | | | Support to invoke depmod in sdk (From OE-Core rev: 7fbd49259c99d6a096a0b6a17aa3a5663fbf6e78) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: upgrade 26 -> 27Alexander Kanavin2020-06-042-32/+3
| | | | | | | (From OE-Core rev: fc0b3496c9b1de0ef58003fa1c1fc2e152a3b27b) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: Replace dolt hacks with backport of upstream dolt removalAdrian Bunk2019-08-213-8/+32
| | | | | | | (From OE-Core rev: 66492f40c23778a5644bc4e7f4acf7e4ef16bf36) Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: Remove compatibility for ancient hostsAdrian Bunk2019-03-074-80/+0
| | | | | | | | | | | | | Lack of be32toh() is handled upstream since 2014. Linux 2.6.23 was released 2007, distributions with kernels older than that are far outside the host distributions still supported today. (From OE-Core rev: c4d77ddd13ad43b52f22a32dc7a3d34cc2692dce) Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: Fix PVRichard Purdie2019-02-201-1/+1
| | | | | | | | | Meant to fix this pre merge, the git revision is the PV so no need to add SRCPV. (From OE-Core rev: 3233096f0dbada97d9d71c98044150a641bfb0a5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: upgrade to 26Chen Qi2019-02-204-21/+28
| | | | | | | | | Refresh patches to avoid warning. (From OE-Core rev: 5dc170d74e932e1dbfc58d23b204bf1d9ebc6e42) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: bump alternative priorityDan McGregor2018-10-181-1/+1
| | | | | | | | | | toybox by default has a priority of 60, and busybox of 50. Bump kmod's priority so that it beats both toybox and busybox. (From OE-Core rev: b17ae3e13dea4b12f1720170237142e04d5ab578) Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: do not reset $bindir/sbindir, use EXTRA_OECONF insteadAlexander Kanavin2018-08-291-3/+1
| | | | | | | | | | | | This was causing issues with classes that use $bindir to find already installed binaries in rootfs (manpages class in particular). $bindir needs to be the same for all recipes. (From OE-Core rev: 3d92bce5a8e021c03e509e8ee6ead064e97bfcec) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* depmodwrapper-cross: Add kmod-native to DEPENDSHaris Okanovic2018-05-111-0/+1
| | | | | | | | | | | | | | | Add `DEPENDS += "kmod-native"` to ensure depmod utility is added to recipe-sysroot-native during image build. Without this dependency, image builds where BUILD_IMAGES_FROM_FEEDS=1 have depmodwrapper in recipe-sysroot-native but are missing depmod. Kernel postinst scripts rely on depmod (via depmodwrapper) to index newly installed modules. (From OE-Core rev: d693457f9de92e4e8b61881638787e831f0ca197) Signed-off-by: Haris Okanovic <haris.okanovic@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: don't call gtkdocize twiceRoss Burton2018-03-151-3/+1
| | | | | | | | | The gtk-doc class already calls gtkdocize, so we don't need to do it again (From OE-Core rev: 14c6e4fd793e037d801a81c6581e0642ef61ab0c) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: refresh patchesRoss Burton2018-03-092-17/+11
| | | | | | | | | | | | | | | | | | | | | The patch tool will apply patches by default with "fuzz", which is where if the hunk context isn't present but what is there is close enough, it will force the patch in. Whilst this is useful when there's just whitespace changes, when applied to source it is possible for a patch applied with fuzz to produce broken code which still compiles (see #10450). This is obviously bad. We'd like to eventually have do_patch() rejecting any fuzz on these grounds. For that to be realistic the existing patches with fuzz need to be rebased and reviewed. (From OE-Core rev: c94152fee766297b355fec7f6d3d4d8ba7ae5f86) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kmod: 24 -> 25Huang Qiyu2018-01-291-2/+2
| | | | | | | | | | Upgrade kmod from 24 to 25. (From OE-Core rev: df525efab1cefa3e05e50544b1fbc790cc4cf850) Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: Add support for multiple kernel packagesHaris Okanovic2018-01-021-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some distros may want to provide alternate kernel "flavors" via feeds or within bootable images. For example, readily available builds which provide certain diagnostic features can enable developers and testers to more quickly resolve issues by avoiding lengthy kernel builds. This change allows for building multiple flavors of the kernel and module packages by templatizing kernel package names via a new KERNEL_PACKAGE_NAME variable in kernel.bbclass. It defaults to the old name of "kernel", but can be overridden by certain recipes providing alternate kernel flavors. To maintain compatibility, recipes providing alternate kernel flavors cannot be the "preferred provider" for virtual/kernel. This is because OE puts the preferred provider's build and source at "tmp-glibc/work-shared/$MACHINE/kernel-build-artifacts/" and "tmp-glibc/work-shared/$MACHINE/kernel-source/" instead of "tmp-glibc/work/*/$PN/" like other recipes. Therefore, recipes using the default KERNEL_PACKAGE_NAME="kernel" follows the old semantics -- build in the old location and may be preferred provider -- while recipes using all other KERNEL_PACKAGE_NAME's build from the normal WORKDIR and don't provide "virtual/kernel". Testing: 1. Add `KERNEL_PACKAGE_NAME_pn-linux-yocto-tiny = "tiny-linux"` to local.conf so that linux-yocto-tiny may build alongside the main kernel (linux-yocto). 2. `bitbake linux-yocto linux-yocto-tiny` to build both kernel flavors. 3. Verified image and modules IPKs exist for both: tmp-glibc/deploy/ipk/qemux86/kernel-* for linux-yocto tmp-glibc/deploy/ipk/qemux86/tiny-linux* for linux-yocto-tiny 4. Verified linux-yocto is the "preferred provider", and was built in shared directory: tmp-glibc/work-shared/qemux86/kernel-* 5. Add `CORE_IMAGE_BASE_INSTALL_append_pn-core-image-base = "tiny-linux"` to local.conf to install both kernel flavors in core-image-base. 6. `bitbake core-image-base` to build an image. 7. Verified image contains two bzImage's under /boot/, with "yocto-standard" (linux-yocto recipe) selected to boot via symlink. Discussion threads: http://lists.openembedded.org/pipermail/openembedded-core/2015-December/thread.html#114122 http://lists.openembedded.org/pipermail/openembedded-core/2017-July/thread.html#139130 [YOCTO #11363] (From OE-Core rev: 6c8c899849d101fd1b86aad0b8eed05c7c785924) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Gratian Crisan <gratian.crisan@ni.com> Signed-off-by: Haris Okanovic <haris.okanovic@ni.com> Coauthored-by: Gratian Crisan <gratian.crisan@ni.com> Coauthored-by: Haris Okanovic <haris.okanovic@ni.com> Coauthored-by: Josh Hernstrom <josh.hernstrom@ni.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* depmodwrapper-cross: Set PACKAGES=''Richard Purdie2017-12-211-0/+1
| | | | | | | | | | | | | | | | This recipe inherits nopackages but has a non-empty PACKAGES which confuses the archiver class when: INHERIT += "archiver" ARCHIVER_MODE[srpm] = "1" Ensuring PACKAGES is empty removes the errors that occur in this configuration. [YOCTO #11121] (From OE-Core rev: b8a603d3f1d3adac41d042e42a2283b7fdf2ae7c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>