From: Joerg Behrmann Date: Sun, 26 Nov 2023 13:14:32 +0000 (+0100) Subject: kmod: normalise module names X-Git-Tag: v20~138 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3cb78a50decea534d9c974af5b5335ae960e0e75;p=thirdparty%2Fmkosi.git kmod: normalise module names The file names of modules use dashes, e.g. /usr/lib/modules/6.6.2-arch1-1/kernel/drivers/nvme/common/nvme-common.ko.zst but the dependency names modinfo gives us use underscores, e.g. name=nvme_common Fixes: #2092 --- diff --git a/mkosi/kmod.py b/mkosi/kmod.py index ec550c026..4010d62b3 100644 --- a/mkosi/kmod.py +++ b/mkosi/kmod.py @@ -84,7 +84,10 @@ def resolve_module_dependencies(root: Path, kver: str, modules: Sequence[str]) - firmware += fw elif key == "name": - name = value.strip() + # The file names use dashes, but the module names use underscores. We track the names + # in terms of the file names, since the depends use dashes and therefore filenames as + # well. + name = value.strip().replace("_", "-") moddep[name] = depends firmwaredep[name] = firmware