]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
When invoking qemu, put all -drive args adjacent
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 20 Apr 2023 08:30:00 +0000 (10:30 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 20 Apr 2023 11:56:30 +0000 (13:56 +0200)
The -smbios args are very long. I was checking out secureboot config,
and I thought that the second -drive argument is missing. Let's make
them adjacent again.

mkosi/__init__.py

index 1b45f2186c3adda4ae411d532e0884400b4b207d..12db7bfbe87c6d38f9d425d79da73a4fc9c914b4 100644 (file)
@@ -2179,12 +2179,12 @@ def run_qemu(config: MkosiConfig) -> None:
             "-serial", "chardev:console",
         ]
 
-    cmdline += ["-drive", f"if=pflash,format=raw,readonly=on,file={firmware}"]
-
     for k, v in config.credentials.items():
         cmdline += ["-smbios", f"type=11,value=io.systemd.credential.binary:{k}={base64.b64encode(v.encode()).decode()}"]
     cmdline += ["-smbios", f"type=11,value=io.systemd.stub.kernel-cmdline-extra={' '.join(config.kernel_command_line_extra)}"]
 
+    cmdline += ["-drive", f"if=pflash,format=raw,readonly=on,file={firmware}"]
+
     with contextlib.ExitStack() as stack:
         if fw_supports_sb:
             ovmf_vars = stack.enter_context(tempfile.NamedTemporaryFile(prefix=".mkosi-", dir=tmp_dir()))