]> git.ipfire.org Git - thirdparty/mkosi.git/commit
kmod: Stop retrieving dependency info of all modules
authorDaanDeMeyer <daan.j.demeyer@gmail.com>
Thu, 25 Dec 2025 19:48:47 +0000 (20:48 +0100)
committerDaanDeMeyer <daan.j.demeyer@gmail.com>
Fri, 26 Dec 2025 09:02:49 +0000 (10:02 +0100)
commitf9e7527e0357236746396f531f5eef583dde80a6
tree3548c0ff73523820ad7274f4ad9ee2ee7ce786de
parent851f41346139293a79179b5280d1fad5d4098f4a
kmod: Stop retrieving dependency info of all modules

Instead of running modinfo once to retrieve the dependency information
of all modules, let's only retrieve the dependency information of the
modules that are to be included in the image and their transitive
dependencies. This means we have to run modinfo multiple times, but with
far fewer modules than before. This ends up being faster than retrieving
the dependency information of all modules, especially after the optimization
from e276dac87a530efac4376a5059b980f2d43460f5.

For the mkosi default image build on Arch Linux this reduces the time for
calculating the required kernel modules and firmware on my laptop from 5s
to 0.5s.

Co-Authored-By: Laurence Kiln <246209442+LaurenceKiln@users.noreply.github.com>
mkosi/kmod.py