Merge ~juergh/autopkgtest-cloud:qemu-efi-noacpi-use-ttyAMA0 into autopkgtest-cloud:master

Proposed by Juerg Haefliger
Status: Merged
Merged at revision: 86fd954d73ee3b289d34acff3fe8ac6eae27633e
Proposed branch: ~juergh/autopkgtest-cloud:qemu-efi-noacpi-use-ttyAMA0
Merge into: autopkgtest-cloud:master
Diff against target: 46 lines (+13/-1)
1 file modified
charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker-config-production/qemu-efi-noacpi.sh (+13/-1)
Reviewer Review Type Date Requested Status
Paride Legovini (community) Approve
Julian Andres Klode (community) Approve
Brian Murray Pending
Ubuntu Release Team Pending
Review via email: mp+430620@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Julian Andres Klode (juliank) wrote :

Can't we just change the image and have console on *all* ttyAMO0 tty1 ttyS0? But very well, lgtm.

review: Approve
Revision history for this message
Paride Legovini (paride) wrote :

LGTM, knowing that the qemu-efi-noacpi/0 is in practice only used on arm64, as explained in the commit message introducing it (c8fa2a1fe077). This wasn't clear to me when I first looked at this MP.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker-config-production/qemu-efi-noacpi.sh b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker-config-production/qemu-efi-noacpi.sh
2index 8b79afd..14cc18a 100755
3--- a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker-config-production/qemu-efi-noacpi.sh
4+++ b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker-config-production/qemu-efi-noacpi.sh
5@@ -1,7 +1,7 @@
6 #!/bin/sh
7 #
8 # Disable ACPI for the next boot. This is similar to using QEMU's '-no-acpi'
9-# option.
10+# option. Also reconfigure grub to use serial port ttyAMA0 instead of ttyS0.
11 #
12
13 set -eu
14@@ -44,6 +44,9 @@ rm fs0:\startup.nsh
15 # Reset for the change to take effect
16 reset
17 EOF
18+
19+ # Undo grub config changes
20+ rm -f /etc/default/grub.d/99-qemu-efi-noacpi.cfg
21 else
22 # Create startup.nsh which disables ACPI
23 cat > /boot/efi/startup.nsh <<EOF
24@@ -59,6 +62,12 @@ rm fs0:\startup.nsh
25 # Reset for the change to take effect
26 reset
27 EOF
28+
29+ # Use serial port ttyAMA0
30+ cat > /etc/default/grub.d/99-qemu-efi-noacpi.cfg <<EOF
31+# Use serial port ttyAMAO
32+GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 console=ttyAMA0"
33+EOF
34 fi
35
36 # Set the BootNext variable to the EFI Shell, causing it to be started on the
37@@ -67,6 +76,9 @@ fi
38 # BootOrder.
39 efibootmgr -n "${shell_bootnum}"
40
41+# Recreate the grub config file
42+update-grub
43+
44 if [ -x /usr/share/update-notifier/notify-reboot-required ] ; then
45 /usr/share/update-notifier/notify-reboot-required
46 fi

Subscribers

People subscribed via source and target branches