]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Debug log when firmware is missing
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 10 Nov 2023 11:47:09 +0000 (12:47 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 10 Nov 2023 12:23:25 +0000 (13:23 +0100)
Sometimes missing firmware can cause issues in the initrd so let's
at least debug log if we can't find some firmware.

mkosi/kmod.py

index a9286d49f391b7fe4e9b98c3895d7d352d60f60e..942f4e73d86eb016b35abe37776f8967a2394d94 100644 (file)
@@ -77,7 +77,11 @@ def resolve_module_dependencies(root: Path, kver: str, modules: Sequence[str]) -
             depends += [d for d in value.strip().split(",") if d]
 
         elif key == "firmware":
-            firmware += [f for f in (root / "usr/lib/firmware").glob(f"{value.strip()}*")]
+            fw = [f for f in (root / "usr/lib/firmware").glob(f"{value.strip()}*")]
+            if not fw:
+                logging.debug(f"Not including missing firmware /usr/lib/firmware/{value} in the initrd")
+
+            firmware += fw
 
         elif key == "name":
             name = value.strip()