Hi Helmut,

thanks for implementing this!

* Helmut Grohne <hel...@subdivi.de> [2023-03-21 19:58]:
We include python3 here, because autopkgtest-virt-qemu says so. We also
include a generic kernel image, because debvm prefers a cloud image,
which lacks support for the 9p filesystem used by autopkgtest-virt-qemu
(see #1027174). Then we must enable the additional serial gettys. While
systemd has a getty generator, this generator cannot enable the consoles
that autopkgtest-virt-qemu needs. autopkgtest-virt-qemu really wants
boot messages one ttyS0 (or hvc0), so this is what we must pass as
console= boot parameter.
[..]
@@ -435,6 +488,18 @@
            argv.append(
                'if=pflash,format=raw,unit=1,file=%s/efivars.fd' % workdir
            )
+        elif boot == 'vmlinux':
+            ext2_extract_boot_components(
+                self.images[0].file, workdir + "/kernel", workdir + "/initrd"
+            )
+            label = subprocess.check_output(
+                ["/sbin/e2label", self.images[0].file], encoding="utf-8"
+            ).strip()
+            argv.extend([
+                "-kernel", workdir + "/kernel",
+                "-initrd", workdir + "/initrd",
+                "-append", "root=LABEL=%s rw console=ttyS0" % label,
+            ])
        else:
            adtlog.debug(
                'Assuming nothing special needs to be done to set up '

Adding console=ttyS0 unconditionally seems to break arm64:

autopkgtest-virt-qemu --show-boot --qemu-architecture aarch64 
autopkgtest_arm64.ext4

In debvm-run we add it for amd64|i386 only:

https://sources.debian.org/src/debvm/0.2.10/bin/debvm-run/#L356

Attached is a patch to do the same here.

Cheers Jochen
diff --git a/lib/autopkgtest_qemu.py b/lib/autopkgtest_qemu.py
index cdb34ec..201313b 100644
--- a/lib/autopkgtest_qemu.py
+++ b/lib/autopkgtest_qemu.py
@@ -495,10 +495,13 @@ class Qemu:
             label = subprocess.check_output(
                 ["/sbin/e2label", self.images[0].file], encoding="utf-8"
             ).strip()
+            console = ""
+            if self.qemu_architecture in ('i386', 'x86_64'):
+                console = " console=ttyS0"
             argv.extend([
                 "-kernel", workdir + "/kernel",
                 "-initrd", workdir + "/initrd",
-                "-append", "root=LABEL=%s rw console=ttyS0" % label,
+                "-append", "root=LABEL=%s rw%s" % (label, console),
             ])
         else:
             adtlog.debug(

Attachment: signature.asc
Description: PGP signature

Reply via email to