]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Only pass kernel command line to ukify if there is one
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 18 Jul 2024 14:50:09 +0000 (16:50 +0200)
committerJörg Behrmann <behrmann@physik.fu-berlin.de>
Thu, 18 Jul 2024 15:35:26 +0000 (17:35 +0200)
If we don't have any kernel command line arguments, don't pass
--cmdline to ukify.

Turns out systemd-stub will hang on boot when .cmdline contains only
a null terminator so with this change we avoid that from happening.

mkosi/__init__.py

index 3d3443f1f5c18f967240473d8859ca99ad509c0c..44b66169ed96116609f991ffb502ead42a769835 100644 (file)
@@ -2126,7 +2126,7 @@ def build_uki(
     cmd: list[PathString] = [
         python_binary(context.config, binary=ukify),
         ukify,
-        "--cmdline", f"@{context.workspace / 'cmdline'}",
+        *(["--cmdline", f"@{context.workspace / 'cmdline'}"] if cmdline else []),
         "--os-release", f"@{context.root / 'usr/lib/os-release'}",
         "--stub", stub,
         "--output", output,