aboutsummaryrefslogtreecommitdiffstats
path: root/patches/opnfv-fuel/0002-lib.sh-AArch64-Use-VGA-video-mode-for-guests.patch
blob: 7be7e52a346c80ab1e564c146c740b855c6902e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Date: Tue, 11 Jul 2017 18:35:40 +0200
Subject: [PATCH] lib.sh: AArch64: Use VGA video mode for guests

On AArch64, there is no Cirrus video, so use VGA mode instead.
For now, we install vgabios package no matter the arch, although
it is only used on AArch64.

On Debian systems, also fix a missing link for vgabios-stdvga.bin.
Based on previous Armband work from [1].

[1] https://github.com/opnfv/armband/blob/danube.2.0/patches/fuel-library/
    arm64-bug-fixes/0002-Install-vgabios-and-link-for-aarch64.patch

Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
---
 ci/deploy.sh       |  5 +++--
 mcp/scripts/lib.sh | 10 +++++++++-
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/ci/deploy.sh b/ci/deploy.sh
index 7b3bf54..491b955 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -279,9 +279,10 @@ pushd "${DEPLOY_DIR}" > /dev/null

 # Install required packages
 [ -n "$(command -v apt-get)" ] && sudo apt-get install -y \
-  git make rsync mkisofs curl virtinst cpu-checker qemu-kvm
+  git make rsync mkisofs curl virtinst cpu-checker qemu-kvm vgabios && \
+    sudo ln -sf /usr/share/vgabios/vgabios.bin /usr/share/qemu/vgabios-stdvga.bin
 [ -n "$(command -v yum)" ] && sudo yum install -y \
-  git make rsync genisoimage curl virt-install qemu-kvm
+  git make rsync genisoimage curl virt-install qemu-kvm vgabios

 # Check scenario file existence
 if [[ ! -f  ../config/scenario/${DEPLOY_TYPE}/${DEPLOY_SCENARIO}.yaml ]]; then
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
index 33dba3c..8d45100 100644
--- a/mcp/scripts/lib.sh
+++ b/mcp/scripts/lib.sh
@@ -78,6 +78,13 @@ create_vms() {
     net_args="${net_args} --network ${net_type}=${net},model=virtio"
   done

+  # AArch64: prepare arch specific arguments
+  local virt_extra_args=""
+  if [ "$(uname -i)" = "aarch64" ]; then
+    # No Cirrus VGA on AArch64, use vga std
+    virt_extra_args="$virt_extra_args --video=vga"
+  fi
+
   # create vms with specified options
   for node in "${vnodes[@]}"; do
     # shellcheck disable=SC2086
@@ -88,7 +95,8 @@ create_vms() {
     --os-type linux --os-variant none \
     --boot hd --vnc --console pty --autostart --noreboot \
     --disk path="$(pwd)/images/mcp_${node}.iso",device=cdrom \
-    --noautoconsole
+    --noautoconsole \
+    ${virt_extra_args}
   done
 }