Rebase to latest PR for ARMv7/aarch64 UEFI
This commit is contained in:
parent
f78313e431
commit
c0b35857fc
|
@ -1,7 +1,7 @@
|
|||
From 777a40e5dbd3a690cb8aaaa6458a8c5f2c4994ca Mon Sep 17 00:00:00 2001
|
||||
From fbce72eb95ab15f5c830c542333e9007f3126487 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Wed, 23 Jan 2019 03:00:08 +0000
|
||||
Subject: [PATCH 01/11] Clarify bugzilla instance for bug references
|
||||
Subject: [PATCH 01/13] Clarify bugzilla instance for bug references
|
||||
|
||||
Substitute BZ -> RHBZ to clarify BZ locations.
|
||||
|
||||
|
@ -35,100 +35,10 @@ index 4f66c2f..034749d 100644
|
|||
--
|
||||
2.20.1
|
||||
|
||||
From 9ddffbbbb177e342ab1c806939ce857e87c71232 Mon Sep 17 00:00:00 2001
|
||||
From 9e8592849675baa11a30774550a24b34d5611b1b Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Wed, 23 Jan 2019 03:05:22 +0000
|
||||
Subject: [PATCH 02/11] Add the latest location for EDK2 OVMF firmware location
|
||||
|
||||
The Tianocore EDK2 OVMF firmware can now often be found in the
|
||||
/usr/share/edk2/ovmf location so add this as an extra option.
|
||||
|
||||
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
||||
---
|
||||
oz/ozutil.py | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/oz/ozutil.py b/oz/ozutil.py
|
||||
index 273a028..989c9d4 100644
|
||||
--- a/oz/ozutil.py
|
||||
+++ b/oz/ozutil.py
|
||||
@@ -1050,6 +1050,8 @@ def find_uefi_firmware(arch):
|
||||
elif arch in ['x86_64']:
|
||||
uefi_list = [UEFI('/usr/share/OVMF/OVMF_CODE.fd',
|
||||
'/usr/share/OVMF/OVMF_VARS.fd'),
|
||||
+ UEFI('/usr/share/edk2/ovmf/OVMF_CODE.fd',
|
||||
+ '/usr/share/edk2/ovmf/OVMF_VARS.fd'),
|
||||
UEFI('/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd',
|
||||
'/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd')]
|
||||
elif arch in ['aarch64']:
|
||||
--
|
||||
2.20.1
|
||||
|
||||
From faf1ac20ae6b6fb8ab4b9f511086a731e4175fc3 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Wed, 23 Jan 2019 03:12:50 +0000
|
||||
Subject: [PATCH 03/11] Add check for TianoCore EDK2 firmware for ARMv7
|
||||
|
||||
There's now TianoCore EDK2 firmwares for ARMv7 so add a check to
|
||||
see if they're available in preparation of building UEFI enabled
|
||||
ARMv7 images.
|
||||
|
||||
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
||||
---
|
||||
oz/ozutil.py | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/oz/ozutil.py b/oz/ozutil.py
|
||||
index 989c9d4..d6a4a28 100644
|
||||
--- a/oz/ozutil.py
|
||||
+++ b/oz/ozutil.py
|
||||
@@ -1061,6 +1061,9 @@ def find_uefi_firmware(arch):
|
||||
'/usr/share/edk2/aarch64/vars-template-pflash.raw'),
|
||||
UEFI('/usr/share/edk2.git/aarch64/QEMU_EFI-pflash.raw',
|
||||
'/usr/share/edk2.git/aarch64/vars-template-pflash.raw')]
|
||||
+ elif arch in ['armv7l']:
|
||||
+ uefi_list = [UEFI('/usr/share/edk2/arm/QEMU_EFI-pflash.raw',
|
||||
+ '/usr/share/edk2/arm/vars-template-pflash.raw')]
|
||||
else:
|
||||
raise Exception("Invalid arch for UEFI firmware")
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
||||
From 2ade14274caa2b99fbc8038d2b860c1175d009ca Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Wed, 23 Jan 2019 03:16:41 +0000
|
||||
Subject: [PATCH 04/11] Check for UEFI EDK2 firmware on x86_64 and ARMv7 too
|
||||
|
||||
Add checks for EDK2 firmware on x86_64 and ARMv7 along side aarch64
|
||||
as all those architectures support UEFI now and if the firmware is
|
||||
available we should priortise UEFI over traditional methods.
|
||||
|
||||
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
||||
---
|
||||
oz/Guest.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/oz/Guest.py b/oz/Guest.py
|
||||
index 034749d..8d9e319 100644
|
||||
--- a/oz/Guest.py
|
||||
+++ b/oz/Guest.py
|
||||
@@ -484,7 +484,7 @@ class Guest(object):
|
||||
if self.tdl.arch == "armv7l":
|
||||
cmdline += " console=ttyAMA0"
|
||||
oz.ozutil.lxml_subelement(osNode, "cmdline", cmdline)
|
||||
- if self.tdl.arch == "aarch64":
|
||||
+ if self.tdl.arch in ["x86_64", "aarch64", "armv7l"]:
|
||||
loader, nvram = oz.ozutil.find_uefi_firmware(self.tdl.arch)
|
||||
oz.ozutil.lxml_subelement(osNode, "loader", loader, {'readonly': 'yes', 'type': 'pflash'})
|
||||
oz.ozutil.lxml_subelement(osNode, "nvram", None, {'template': nvram})
|
||||
--
|
||||
2.20.1
|
||||
|
||||
From a8727eb82aff624cb7e41e17aefbbc8dde8d4fe3 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Wed, 27 Feb 2019 10:42:25 +0000
|
||||
Subject: [PATCH 05/11] drop ARMv7 special handling for console port
|
||||
Date: Thu, 14 Mar 2019 12:41:01 +0000
|
||||
Subject: [PATCH 02/13] drop ARMv7 special handling for console port
|
||||
|
||||
It's unnecessary and breaks grpahical output. Qemu generates a DT with all
|
||||
the appropriate bits in it to setup the console.
|
||||
|
@ -139,7 +49,7 @@ Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
|||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/oz/Guest.py b/oz/Guest.py
|
||||
index 8d9e319..1c8c97c 100644
|
||||
index 034749d..e346904 100644
|
||||
--- a/oz/Guest.py
|
||||
+++ b/oz/Guest.py
|
||||
@@ -481,8 +481,6 @@ class Guest(object):
|
||||
|
@ -149,15 +59,15 @@ index 8d9e319..1c8c97c 100644
|
|||
- if self.tdl.arch == "armv7l":
|
||||
- cmdline += " console=ttyAMA0"
|
||||
oz.ozutil.lxml_subelement(osNode, "cmdline", cmdline)
|
||||
if self.tdl.arch in ["x86_64", "aarch64", "armv7l"]:
|
||||
if self.tdl.arch == "aarch64":
|
||||
loader, nvram = oz.ozutil.find_uefi_firmware(self.tdl.arch)
|
||||
--
|
||||
2.20.1
|
||||
|
||||
From bc355031e72d546bd7af7f04a9702eaa030aeae9 Mon Sep 17 00:00:00 2001
|
||||
From 0b32e08e5ddfd7088297d267aed71950219dad79 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Wed, 27 Feb 2019 10:54:43 +0000
|
||||
Subject: [PATCH 06/11] Add appropriate arch checks for architecture specific
|
||||
Subject: [PATCH 03/13] Add appropriate arch checks for architecture specific
|
||||
features
|
||||
|
||||
In a lot of cases qemu just ignores incorrect cmd line options when run
|
||||
|
@ -170,7 +80,7 @@ Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
|||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/oz/Guest.py b/oz/Guest.py
|
||||
index 1c8c97c..e21098a 100644
|
||||
index e346904..e3a5da5 100644
|
||||
--- a/oz/Guest.py
|
||||
+++ b/oz/Guest.py
|
||||
@@ -460,9 +460,11 @@ class Guest(object):
|
||||
|
@ -191,10 +101,10 @@ index 1c8c97c..e21098a 100644
|
|||
--
|
||||
2.20.1
|
||||
|
||||
From d0ee021efc2cb638af2fec280298f80ca1122a74 Mon Sep 17 00:00:00 2001
|
||||
From 1048f98e3606781696f1a81704235960f426519d Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Wed, 27 Feb 2019 10:56:36 +0000
|
||||
Subject: [PATCH 07/11] ARMv7 only supports GICv2 so we need to explicitly
|
||||
Subject: [PATCH 04/13] ARMv7 only supports GICv2 so we need to explicitly
|
||||
define it
|
||||
|
||||
Add the GIC version to the cpu features list to ensure we get the right GIC
|
||||
|
@ -205,7 +115,7 @@ Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
|||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/oz/Guest.py b/oz/Guest.py
|
||||
index e21098a..3db1c9e 100644
|
||||
index e3a5da5..4e74fe1 100644
|
||||
--- a/oz/Guest.py
|
||||
+++ b/oz/Guest.py
|
||||
@@ -465,6 +465,8 @@ class Guest(object):
|
||||
|
@ -220,10 +130,10 @@ index e21098a..3db1c9e 100644
|
|||
--
|
||||
2.20.1
|
||||
|
||||
From 32c17a97c90e5714008e1aca487e145f366d1d67 Mon Sep 17 00:00:00 2001
|
||||
From c197d163ccbd2997d400942e14442257dd9d2285 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Wed, 27 Feb 2019 11:08:25 +0000
|
||||
Subject: [PATCH 08/11] Fix input devices for ARMv7 and aarch64
|
||||
Subject: [PATCH 05/13] Fix input devices for ARMv7 and aarch64
|
||||
|
||||
The Arm architectures don't work well with the legacy ps2 bits causing
|
||||
issues with graphical output. Qemu also doesn't, due to a historical
|
||||
|
@ -236,7 +146,7 @@ Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
|||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/oz/Guest.py b/oz/Guest.py
|
||||
index 3db1c9e..e423ed6 100644
|
||||
index 4e74fe1..418b888 100644
|
||||
--- a/oz/Guest.py
|
||||
+++ b/oz/Guest.py
|
||||
@@ -255,7 +255,10 @@ class Guest(object):
|
||||
|
@ -266,10 +176,10 @@ index 3db1c9e..e423ed6 100644
|
|||
--
|
||||
2.20.1
|
||||
|
||||
From 48b5e57e36d39645190a756b93e1c3806c929261 Mon Sep 17 00:00:00 2001
|
||||
From d4c4ea8c4ea77471fc72639d31c38d3d39bc0453 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Wed, 23 Jan 2019 03:19:21 +0000
|
||||
Subject: [PATCH 09/11] Setup graphical console on all architectures except
|
||||
Subject: [PATCH 06/13] Setup graphical console on all architectures except
|
||||
s390x
|
||||
|
||||
The graphical console is now supported on all architectures except
|
||||
|
@ -282,7 +192,7 @@ Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
|||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/oz/Guest.py b/oz/Guest.py
|
||||
index e423ed6..ad35fb5 100644
|
||||
index 418b888..dfb63e4 100644
|
||||
--- a/oz/Guest.py
|
||||
+++ b/oz/Guest.py
|
||||
@@ -500,8 +500,8 @@ class Guest(object):
|
||||
|
@ -299,10 +209,10 @@ index e423ed6..ad35fb5 100644
|
|||
--
|
||||
2.20.1
|
||||
|
||||
From ce0dde7a39d3ed3482bb81fc8c534ad98bc7ed50 Mon Sep 17 00:00:00 2001
|
||||
From fb257ff2fbb66a732a1369445b8c580a4ec61339 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Wed, 27 Feb 2019 12:30:07 +0000
|
||||
Subject: [PATCH 10/11] Default to using 2Gb on all architectures
|
||||
Subject: [PATCH 07/13] Default to using 2Gb on all architectures
|
||||
|
||||
The original 1Gb should be enough but RAM is cheap and sometimes things
|
||||
like the initrd unexpectently bloat so 2Gb gives us room to move.
|
||||
|
@ -313,7 +223,7 @@ Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
|||
1 file changed, 1 insertion(+), 6 deletions(-)
|
||||
|
||||
diff --git a/oz/Guest.py b/oz/Guest.py
|
||||
index ad35fb5..1e49527 100644
|
||||
index dfb63e4..3bb144e 100644
|
||||
--- a/oz/Guest.py
|
||||
+++ b/oz/Guest.py
|
||||
@@ -178,13 +178,8 @@ class Guest(object):
|
||||
|
@ -334,33 +244,398 @@ index ad35fb5..1e49527 100644
|
|||
--
|
||||
2.20.1
|
||||
|
||||
From 0681aaf5a6b3309a242fbf5a09450e52cff01310 Mon Sep 17 00:00:00 2001
|
||||
From e274f7bbcac0ef1ccc6ccd7e98fd645793c5a649 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Wed, 27 Feb 2019 16:07:38 +0000
|
||||
Subject: [PATCH 11/11] Use better host-passthrough settings for qemu
|
||||
Date: Wed, 23 Jan 2019 03:05:22 +0000
|
||||
Subject: [PATCH 08/13] Add the latest location for EDK2 OVMF firmware location
|
||||
|
||||
The host-passthrough setting as set doesn't work for ARMv7 and the option
|
||||
used for both aarch64 and ARMv7 by libvirt/virt-install.
|
||||
The Tianocore EDK2 OVMF firmware can now often be found in the
|
||||
/usr/share/edk2/ovmf location so add this as an extra option.
|
||||
|
||||
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
||||
---
|
||||
oz/Guest.py | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
oz/ozutil.py | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/oz/Guest.py b/oz/Guest.py
|
||||
index 1e49527..7e8f57c 100644
|
||||
--- a/oz/Guest.py
|
||||
+++ b/oz/Guest.py
|
||||
@@ -468,8 +468,7 @@ class Guest(object):
|
||||
# CPU
|
||||
if self.tdl.arch in ["aarch64", "armv7l"] and self.libvirt_type == "kvm":
|
||||
# Possibly related to RHBZ 1171501 - need host passthrough for aarch64 and arm with kvm
|
||||
- cpu = oz.ozutil.lxml_subelement(domain, "cpu", None, {'mode': 'custom', 'match': 'exact'})
|
||||
- oz.ozutil.lxml_subelement(cpu, "model", "host", {'fallback': 'allow'})
|
||||
+ cpu = oz.ozutil.lxml_subelement(domain, "cpu", None, {'mode': 'host-passthrough', 'check': 'none'})
|
||||
# os
|
||||
osNode = oz.ozutil.lxml_subelement(domain, "os")
|
||||
mods = None
|
||||
diff --git a/oz/ozutil.py b/oz/ozutil.py
|
||||
index 273a028..989c9d4 100644
|
||||
--- a/oz/ozutil.py
|
||||
+++ b/oz/ozutil.py
|
||||
@@ -1050,6 +1050,8 @@ def find_uefi_firmware(arch):
|
||||
elif arch in ['x86_64']:
|
||||
uefi_list = [UEFI('/usr/share/OVMF/OVMF_CODE.fd',
|
||||
'/usr/share/OVMF/OVMF_VARS.fd'),
|
||||
+ UEFI('/usr/share/edk2/ovmf/OVMF_CODE.fd',
|
||||
+ '/usr/share/edk2/ovmf/OVMF_VARS.fd'),
|
||||
UEFI('/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd',
|
||||
'/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd')]
|
||||
elif arch in ['aarch64']:
|
||||
--
|
||||
2.20.1
|
||||
|
||||
From c24fa91acae23bdce21595654db002521f49fef2 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Wed, 23 Jan 2019 03:12:50 +0000
|
||||
Subject: [PATCH 09/13] Add check for TianoCore EDK2 firmware for ARMv7
|
||||
|
||||
There's now TianoCore EDK2 firmwares for ARMv7 so add a check to
|
||||
see if they're available in preparation of building UEFI enabled
|
||||
ARMv7 images.
|
||||
|
||||
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
||||
---
|
||||
oz/ozutil.py | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/oz/ozutil.py b/oz/ozutil.py
|
||||
index 989c9d4..d6a4a28 100644
|
||||
--- a/oz/ozutil.py
|
||||
+++ b/oz/ozutil.py
|
||||
@@ -1061,6 +1061,9 @@ def find_uefi_firmware(arch):
|
||||
'/usr/share/edk2/aarch64/vars-template-pflash.raw'),
|
||||
UEFI('/usr/share/edk2.git/aarch64/QEMU_EFI-pflash.raw',
|
||||
'/usr/share/edk2.git/aarch64/vars-template-pflash.raw')]
|
||||
+ elif arch in ['armv7l']:
|
||||
+ uefi_list = [UEFI('/usr/share/edk2/arm/QEMU_EFI-pflash.raw',
|
||||
+ '/usr/share/edk2/arm/vars-template-pflash.raw')]
|
||||
else:
|
||||
raise Exception("Invalid arch for UEFI firmware")
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
||||
From a23d97852bd5a6693920a4f9c823f606e244f783 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Thu, 14 Mar 2019 12:46:38 +0000
|
||||
Subject: [PATCH 10/13] Check for UEFI EDK2 firmware on ARMv7
|
||||
|
||||
Checks for EDK2 firmware on ARMv7 along side aarch64 as it now also
|
||||
supports UEFI now if the firmware is available.
|
||||
|
||||
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
||||
---
|
||||
oz/Guest.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/oz/Guest.py b/oz/Guest.py
|
||||
index 3bb144e..fc3ae6d 100644
|
||||
--- a/oz/Guest.py
|
||||
+++ b/oz/Guest.py
|
||||
@@ -484,7 +484,7 @@ class Guest(object):
|
||||
oz.ozutil.lxml_subelement(osNode, "initrd", initrd)
|
||||
if cmdline:
|
||||
oz.ozutil.lxml_subelement(osNode, "cmdline", cmdline)
|
||||
- if self.tdl.arch == "aarch64":
|
||||
+ if self.tdl.arch in ["aarch64", "armv7l"]:
|
||||
loader, nvram = oz.ozutil.find_uefi_firmware(self.tdl.arch)
|
||||
oz.ozutil.lxml_subelement(osNode, "loader", loader, {'readonly': 'yes', 'type': 'pflash'})
|
||||
oz.ozutil.lxml_subelement(osNode, "nvram", None, {'template': nvram})
|
||||
--
|
||||
2.20.1
|
||||
|
||||
From 00047d25ca9b4afbcc692f36617c38e82b375591 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Thu, 14 Mar 2019 13:02:47 +0000
|
||||
Subject: [PATCH 11/13] Make whether we use UEFI configurable on devices that
|
||||
have legacy options
|
||||
|
||||
This allows us to specifiy whether a OS version supports/defaults to
|
||||
UEFI or legacy BIOS on x86.
|
||||
|
||||
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
||||
---
|
||||
oz/Fedora.py | 15 ++++++++++++---
|
||||
oz/Guest.py | 15 ++++++++++-----
|
||||
oz/Linux.py | 4 ++--
|
||||
oz/RedHat.py | 12 ++++++------
|
||||
4 files changed, 30 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/oz/Fedora.py b/oz/Fedora.py
|
||||
index 1d73ca1..9ecc744 100644
|
||||
--- a/oz/Fedora.py
|
||||
+++ b/oz/Fedora.py
|
||||
@@ -32,7 +32,7 @@ class FedoraConfiguration(object):
|
||||
"""
|
||||
def __init__(self, has_virtio_channel, use_yum, use_dev_cdrom_device,
|
||||
createpart, directkernel, default_netdev, default_diskbus,
|
||||
- brokenisomethod, haverepo):
|
||||
+ brokenisomethod, haverepo, useuefi=False):
|
||||
self._has_virtio_channel = has_virtio_channel
|
||||
self._use_yum = use_yum
|
||||
self._use_dev_cdrom_device = use_dev_cdrom_device
|
||||
@@ -42,6 +42,7 @@ class FedoraConfiguration(object):
|
||||
self._default_diskbus = default_diskbus
|
||||
self._brokenisomethod = brokenisomethod
|
||||
self._haverepo = haverepo
|
||||
+ self._useuefi = useuefi
|
||||
|
||||
@property
|
||||
def has_virtio_channel(self):
|
||||
@@ -107,6 +108,13 @@ class FedoraConfiguration(object):
|
||||
"""
|
||||
return self._haverepo
|
||||
|
||||
+ @property
|
||||
+ def useuefi(self):
|
||||
+ """
|
||||
+ Property method for whether to default to using UEFI as firmware or legacy method.
|
||||
+ """
|
||||
+ return self._useuefi
|
||||
+
|
||||
|
||||
version_to_config = {
|
||||
'28': FedoraConfiguration(has_virtio_channel=True, use_yum=False,
|
||||
@@ -230,7 +238,7 @@ class FedoraGuest(oz.RedHat.RedHatLinuxCDYumGuest):
|
||||
# ignored now; we leave it in place for backwards API compatibility.
|
||||
def __init__(self, tdl, config, auto, nicmodel, haverepo, diskbus, # pylint: disable=unused-argument
|
||||
brokenisomethod, output_disk=None, macaddress=None, # pylint: disable=unused-argument
|
||||
- assumed_update=None):
|
||||
+ assumed_update=None, useuefi=False):
|
||||
self.config = version_to_config[tdl.update]
|
||||
if nicmodel is None:
|
||||
nicmodel = self.config.default_netdev
|
||||
@@ -242,7 +250,8 @@ class FedoraGuest(oz.RedHat.RedHatLinuxCDYumGuest):
|
||||
oz.RedHat.RedHatLinuxCDYumGuest.__init__(self, tdl, config, auto,
|
||||
output_disk, nicmodel, diskbus,
|
||||
True, True, self.config.directkernel,
|
||||
- macaddress, self.config.use_yum)
|
||||
+ macaddress, self.config.use_yum,
|
||||
+ self.config.useuefi)
|
||||
|
||||
if self.assumed_update is not None:
|
||||
self.log.warning("==== WARN: TDL contains Fedora update %s, which is newer than Oz knows about; pretending this is Fedora %s, but this may fail ====", tdl.update, assumed_update)
|
||||
diff --git a/oz/Guest.py b/oz/Guest.py
|
||||
index fc3ae6d..c33a25e 100644
|
||||
--- a/oz/Guest.py
|
||||
+++ b/oz/Guest.py
|
||||
@@ -129,7 +129,7 @@ class Guest(object):
|
||||
self._discover_libvirt_type()
|
||||
|
||||
def __init__(self, tdl, config, auto, output_disk, nicmodel, clockoffset,
|
||||
- mousetype, diskbus, iso_allowed, url_allowed, macaddress):
|
||||
+ mousetype, diskbus, iso_allowed, url_allowed, macaddress, useuefi):
|
||||
self.tdl = tdl
|
||||
|
||||
# for backwards compatibility
|
||||
@@ -488,6 +488,11 @@ class Guest(object):
|
||||
loader, nvram = oz.ozutil.find_uefi_firmware(self.tdl.arch)
|
||||
oz.ozutil.lxml_subelement(osNode, "loader", loader, {'readonly': 'yes', 'type': 'pflash'})
|
||||
oz.ozutil.lxml_subelement(osNode, "nvram", None, {'template': nvram})
|
||||
+ # x86_64 has legacy requirements so we check for defaults as well as for edk2
|
||||
+ if self.tdl.arch in ["x86_64"] and self.config.useuefi == True:
|
||||
+ loader, nvram = oz.ozutil.find_uefi_firmware(self.tdl.arch)
|
||||
+ oz.ozutil.lxml_subelement(osNode, "loader", loader, {'readonly': 'yes', 'type': 'pflash'})
|
||||
+ oz.ozutil.lxml_subelement(osNode, "nvram", None, {'template': nvram})
|
||||
# poweroff, reboot, crash
|
||||
oz.ozutil.lxml_subelement(domain, "on_poweroff", "destroy")
|
||||
oz.ozutil.lxml_subelement(domain, "on_reboot", "destroy")
|
||||
@@ -1314,10 +1319,10 @@ class CDGuest(Guest):
|
||||
self.seqnum = seqnum
|
||||
|
||||
def __init__(self, tdl, config, auto, output_disk, nicmodel, clockoffset,
|
||||
- mousetype, diskbus, iso_allowed, url_allowed, macaddress):
|
||||
+ mousetype, diskbus, iso_allowed, url_allowed, macaddress, useuefi):
|
||||
Guest.__init__(self, tdl, config, auto, output_disk, nicmodel,
|
||||
clockoffset, mousetype, diskbus, iso_allowed,
|
||||
- url_allowed, macaddress)
|
||||
+ url_allowed, macaddress, useuefi)
|
||||
|
||||
self.orig_iso = os.path.join(self.data_dir, "isos",
|
||||
self.tdl.distro + self.tdl.update + self.tdl.arch + "-" + self.tdl.installtype + ".iso")
|
||||
@@ -1782,9 +1787,9 @@ class FDGuest(Guest):
|
||||
Class for guest installation via floppy disk.
|
||||
"""
|
||||
def __init__(self, tdl, config, auto, output_disk, nicmodel, clockoffset,
|
||||
- mousetype, diskbus, macaddress):
|
||||
+ mousetype, diskbus, macaddress, useuefi):
|
||||
Guest.__init__(self, tdl, config, auto, output_disk, nicmodel,
|
||||
- clockoffset, mousetype, diskbus, False, True, macaddress)
|
||||
+ clockoffset, mousetype, diskbus, False, True, macaddress, useuefi)
|
||||
self.orig_floppy = os.path.join(self.data_dir, "floppies",
|
||||
self.tdl.distro + self.tdl.update + self.tdl.arch + ".img")
|
||||
self.modified_floppy_cache = os.path.join(self.data_dir, "floppies",
|
||||
diff --git a/oz/Linux.py b/oz/Linux.py
|
||||
index a9e8935..aef837f 100644
|
||||
--- a/oz/Linux.py
|
||||
+++ b/oz/Linux.py
|
||||
@@ -33,10 +33,10 @@ class LinuxCDGuest(oz.Guest.CDGuest):
|
||||
Class for Linux installation.
|
||||
"""
|
||||
def __init__(self, tdl, config, auto, output_disk, nicmodel, diskbus,
|
||||
- iso_allowed, url_allowed, macaddress):
|
||||
+ iso_allowed, url_allowed, macaddress, useuefi):
|
||||
oz.Guest.CDGuest.__init__(self, tdl, config, auto, output_disk,
|
||||
nicmodel, None, None, diskbus, iso_allowed,
|
||||
- url_allowed, macaddress)
|
||||
+ url_allowed, macaddress, useuefi)
|
||||
|
||||
def _test_ssh_connection(self, guestaddr):
|
||||
"""
|
||||
diff --git a/oz/RedHat.py b/oz/RedHat.py
|
||||
index fa0084a..7cb7bb6 100644
|
||||
--- a/oz/RedHat.py
|
||||
+++ b/oz/RedHat.py
|
||||
@@ -40,10 +40,10 @@ class RedHatLinuxCDGuest(oz.Linux.LinuxCDGuest):
|
||||
Class for RedHat-based CD guests.
|
||||
"""
|
||||
def __init__(self, tdl, config, auto, output_disk, nicmodel, diskbus,
|
||||
- iso_allowed, url_allowed, initrdtype, macaddress):
|
||||
+ iso_allowed, url_allowed, initrdtype, macaddress, useuefi):
|
||||
oz.Linux.LinuxCDGuest.__init__(self, tdl, config, auto, output_disk,
|
||||
nicmodel, diskbus, iso_allowed,
|
||||
- url_allowed, macaddress)
|
||||
+ url_allowed, macaddress, useuefi)
|
||||
self.crond_was_active = False
|
||||
self.sshd_was_active = False
|
||||
self.sshd_config = """\
|
||||
@@ -714,11 +714,11 @@ class RedHatLinuxCDYumGuest(RedHatLinuxCDGuest):
|
||||
Class for RedHat-based CD guests with yum support.
|
||||
"""
|
||||
def __init__(self, tdl, config, auto, output_disk, nicmodel, diskbus,
|
||||
- iso_allowed, url_allowed, initrdtype, macaddress, use_yum):
|
||||
+ iso_allowed, url_allowed, initrdtype, macaddress, use_yum, useuefi):
|
||||
oz.RedHat.RedHatLinuxCDGuest.__init__(self, tdl, config, auto,
|
||||
output_disk, nicmodel, diskbus,
|
||||
iso_allowed, url_allowed,
|
||||
- initrdtype, macaddress)
|
||||
+ initrdtype, macaddress, useuefi)
|
||||
|
||||
self.use_yum = use_yum
|
||||
|
||||
@@ -837,9 +837,9 @@ class RedHatFDGuest(oz.Guest.FDGuest):
|
||||
Class for RedHat-based floppy guests.
|
||||
"""
|
||||
def __init__(self, tdl, config, auto, output_disk, nicmodel, diskbus,
|
||||
- macaddress):
|
||||
+ macaddress, useuefi):
|
||||
oz.Guest.FDGuest.__init__(self, tdl, config, auto, output_disk,
|
||||
- nicmodel, None, None, diskbus, macaddress)
|
||||
+ nicmodel, None, None, diskbus, macaddress, useuefi)
|
||||
|
||||
if self.tdl.arch != "i386":
|
||||
raise oz.OzException.OzException("Invalid arch " + self.tdl.arch + "for " + self.tdl.distro + " guest")
|
||||
--
|
||||
2.20.1
|
||||
|
||||
From 4f5df1e7b1081c550f846e53197277a41dd9dc88 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Thu, 14 Mar 2019 13:05:13 +0000
|
||||
Subject: [PATCH 12/13] Add Fedora 29 support
|
||||
|
||||
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
||||
---
|
||||
oz/Fedora.py | 5 +++++
|
||||
oz/auto/Fedora29.auto | 23 +++++++++++++++++++++++
|
||||
2 files changed, 28 insertions(+)
|
||||
create mode 100644 oz/auto/Fedora29.auto
|
||||
|
||||
diff --git a/oz/Fedora.py b/oz/Fedora.py
|
||||
index 9ecc744..118fd84 100644
|
||||
--- a/oz/Fedora.py
|
||||
+++ b/oz/Fedora.py
|
||||
@@ -117,6 +117,11 @@ class FedoraConfiguration(object):
|
||||
|
||||
|
||||
version_to_config = {
|
||||
+ '29': FedoraConfiguration(has_virtio_channel=True, use_yum=False,
|
||||
+ use_dev_cdrom_device=True, createpart=False,
|
||||
+ directkernel="cpio", default_netdev='virtio',
|
||||
+ default_diskbus='virtio', brokenisomethod=False,
|
||||
+ haverepo=True),
|
||||
'28': FedoraConfiguration(has_virtio_channel=True, use_yum=False,
|
||||
use_dev_cdrom_device=True, createpart=False,
|
||||
directkernel="cpio", default_netdev='virtio',
|
||||
diff --git a/oz/auto/Fedora29.auto b/oz/auto/Fedora29.auto
|
||||
new file mode 100644
|
||||
index 0000000..1dae86a
|
||||
--- /dev/null
|
||||
+++ b/oz/auto/Fedora29.auto
|
||||
@@ -0,0 +1,23 @@
|
||||
+install
|
||||
+text
|
||||
+keyboard us
|
||||
+lang en_US.UTF-8
|
||||
+skipx
|
||||
+network --device ens3 --bootproto dhcp
|
||||
+rootpw %ROOTPW%
|
||||
+firewall --disabled
|
||||
+authconfig --enableshadow --enablemd5
|
||||
+selinux --enforcing
|
||||
+timezone --utc America/New_York
|
||||
+bootloader --location=mbr --append="console=tty0 console=ttyS0,115200"
|
||||
+
|
||||
+zerombr
|
||||
+clearpart --all --initlabel
|
||||
+autopart --type=lvm
|
||||
+
|
||||
+reboot
|
||||
+
|
||||
+%packages
|
||||
+@core
|
||||
+
|
||||
+%end
|
||||
--
|
||||
2.20.1
|
||||
|
||||
From 5369c963106f2c8d53d36787b51e4d19f8057902 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Thu, 14 Mar 2019 13:07:37 +0000
|
||||
Subject: [PATCH 13/13] Add Fedora 30 support
|
||||
|
||||
In this release, if specified, we default to UEFI support.
|
||||
|
||||
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
||||
---
|
||||
oz/Fedora.py | 5 +++++
|
||||
oz/auto/Fedora30.auto | 23 +++++++++++++++++++++++
|
||||
2 files changed, 28 insertions(+)
|
||||
create mode 100644 oz/auto/Fedora30.auto
|
||||
|
||||
diff --git a/oz/Fedora.py b/oz/Fedora.py
|
||||
index 118fd84..34c4fe7 100644
|
||||
--- a/oz/Fedora.py
|
||||
+++ b/oz/Fedora.py
|
||||
@@ -117,6 +117,11 @@ class FedoraConfiguration(object):
|
||||
|
||||
|
||||
version_to_config = {
|
||||
+ '30': FedoraConfiguration(has_virtio_channel=True, use_yum=False,
|
||||
+ use_dev_cdrom_device=True, createpart=False,
|
||||
+ directkernel="cpio", default_netdev='virtio',
|
||||
+ default_diskbus='virtio', brokenisomethod=False,
|
||||
+ haverepo=True, useuefi=True),
|
||||
'29': FedoraConfiguration(has_virtio_channel=True, use_yum=False,
|
||||
use_dev_cdrom_device=True, createpart=False,
|
||||
directkernel="cpio", default_netdev='virtio',
|
||||
diff --git a/oz/auto/Fedora30.auto b/oz/auto/Fedora30.auto
|
||||
new file mode 100644
|
||||
index 0000000..1dae86a
|
||||
--- /dev/null
|
||||
+++ b/oz/auto/Fedora30.auto
|
||||
@@ -0,0 +1,23 @@
|
||||
+install
|
||||
+text
|
||||
+keyboard us
|
||||
+lang en_US.UTF-8
|
||||
+skipx
|
||||
+network --device ens3 --bootproto dhcp
|
||||
+rootpw %ROOTPW%
|
||||
+firewall --disabled
|
||||
+authconfig --enableshadow --enablemd5
|
||||
+selinux --enforcing
|
||||
+timezone --utc America/New_York
|
||||
+bootloader --location=mbr --append="console=tty0 console=ttyS0,115200"
|
||||
+
|
||||
+zerombr
|
||||
+clearpart --all --initlabel
|
||||
+autopart --type=lvm
|
||||
+
|
||||
+reboot
|
||||
+
|
||||
+%packages
|
||||
+@core
|
||||
+
|
||||
+%end
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
|
5
oz.spec
5
oz.spec
|
@ -1,6 +1,6 @@
|
|||
Name: oz
|
||||
Version: 0.17.0
|
||||
Release: 0.1%{?dist}
|
||||
Release: 0.2%{?dist}
|
||||
Summary: Library and utilities for automated guest OS installs
|
||||
License: LGPLv2
|
||||
URL: http://github.com/clalancette/oz
|
||||
|
@ -88,6 +88,9 @@ fi
|
|||
%{_mandir}/man1/*
|
||||
|
||||
%changelog
|
||||
* Wed Mar 13 2019 Peter Robinson <pbrobinson@fedoraproject.org> 0.17.0-0.2
|
||||
- Rebase to latest PR for ARMv7/aarch64 UEFI
|
||||
|
||||
* Thu Feb 28 2019 Peter Robinson <pbrobinson@fedoraproject.org> 0.17.0-0.1
|
||||
- Upstream git 0.17 snapshot
|
||||
- ARMv7 fixes and support for UEFI
|
||||
|
|
Loading…
Reference in New Issue