]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Do not run modinfo on builtin modules
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 5 Sep 2023 12:58:05 +0000 (14:58 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 5 Sep 2023 13:27:53 +0000 (15:27 +0200)
This causes issues on CentOS Stream 8 with errors about not being
able to find builtin modules.

Aside from the issues, running modinfo on builtin modules also does
not make a lot of sense. We run modinfo to fetch module and firmware
dependencies, but a builtin module that has non-builtin module
dependencies is not really valuable because the dependent module has
to be loaded from disk then. The same goes for firmware dependencies.

mkosi/kmod.py

index 1522358e10e28534aec43f9632e7ac85a4fa314c..a5894e48f1d4ceefc5568b30131d62949b1da8e1 100644 (file)
@@ -58,7 +58,7 @@ def resolve_module_dependencies(root: Path, kver: str, modules: Sequence[str]) -
     # We could run modinfo once for each module but that's slow. Luckily we can pass multiple modules to
     # modinfo and it'll process them all in a single go. We get the modinfo for all modules to build two maps
     # that map the path of the module to its module dependencies and its firmware dependencies respectively.
-    info = bwrap(chroot_cmd(root) + ["modinfo", "--set-version", kver, "--null", *nametofile.keys(), *builtin],
+    info = bwrap(chroot_cmd(root) + ["modinfo", "--set-version", kver, "--null", *nametofile.keys()],
                  stdout=subprocess.PIPE).stdout
 
     log_step("Calculating required kernel modules and firmware")