PCI 16x50 UART Controller, O2 Enablement (#39)
[lunaix-os.git] / lunaix-os / scripts / qemu.py
index 53383269765a872bc00abea70cd109860955c07b..ce843da3312625477a31d04d603bace64f777670 100755 (executable)
@@ -80,13 +80,14 @@ class PCISerialDevice(QEMUPeripherals):
         super().__init__("pci-serial", opt)
 
     def get_qemu_opts(self):
-        name = f"chrdev.{hex(self.__hash__())[2:]}"
-        cmds = [ "pci-serial", f"chardev={name}" ]
+        uniq = hex(self.__hash__())[2:]
+        name = f"chrdev.{uniq}"
+        cmds = [ "pci-serial", f"id=uart.{uniq}", f"chardev={name}" ]
         chrdev = [ "file", f"id={name}" ]
         
         logfile = get_config(self._opt, "logfile", required=True)
         chrdev.append(f"path={logfile}")
-        ()
+
         return [ 
             "-chardev", join_attrs(chrdev),
             "-device", join_attrs(cmds)
@@ -196,7 +197,7 @@ class QEMUExec:
 
         trace_opts = get_config(debug, "traced", [])
         for trace in trace_opts:
-            cmds += [ "-d", f"trace:{trace}"]
+            cmds += [ "--trace", f"{trace}"]
 
         return cmds