curtin-dev team mailing list archive
-
curtin-dev team
-
Mailing list archive
-
Message #01149
[Merge] ~kleinm/curtin:centos-arm64-fixes into curtin:master
Mark Klein has proposed merging ~kleinm/curtin:centos-arm64-fixes into curtin:master.
Commit message:
This adds arm64 compatibility for RH installations
The current behaviour for Redhat based installs assumes x86_64 arch for grub. This change queries the target arch and makes decisions on packages based on that.
Requested reviews:
curtin developers (curtin-dev)
For more details, see:
https://code.launchpad.net/~kleinm/curtin/+git/curtin/+merge/394831
--
Your team curtin developers is requested to review the proposed merge of ~kleinm/curtin:centos-arm64-fixes into curtin:master.
diff --git a/curtin/commands/curthooks.py b/curtin/commands/curthooks.py
index 4cf7301..44aead6 100644
--- a/curtin/commands/curthooks.py
+++ b/curtin/commands/curthooks.py
@@ -1266,15 +1266,26 @@ def install_missing_packages(cfg, target, osfamily=DISTROS.debian):
if util.is_uefi_bootable():
uefi_pkgs = ['efibootmgr']
if osfamily == DISTROS.redhat:
- # centos/redhat doesn't support 32-bit?
- if 'grub2-efi-x64-modules' not in installed_packages:
- # Previously Curtin only supported unsigned GRUB due to an
- # upstream bug. By default lp:maas-image-builder and
- # packer-maas have grub preinstalled. If grub2-efi-x64-modules
- # is already in the image use unsigned grub so the install
- # doesn't require Internet access. If grub is missing use the
- # signed version.
- uefi_pkgs.extend(['grub2-efi-x64', 'shim-x64'])
+ arch = distro.get_architecture()
+ if arch == 'x86_64':
+ # centos/redhat doesn't support 32-bit?
+ if 'grub2-efi-x64-modules' not in installed_packages:
+ # Previously Curtin only supported unsigned GRUB due to an
+ # upstream bug. By default lp:maas-image-builder and
+ # packer-maas have grub preinstalled. If grub2-efi-x64-modules
+ # is already in the image use unsigned grub so the install
+ # doesn't require Internet access. If grub is missing use the
+ # signed version.
+ uefi_pkgs.extend(['grub2-efi-x64', 'shim-x64'])
+ if arch == 'arm64':
+ if 'grub2-efi-aa64-modules' not in installed_packages:
+ # Previously Curtin only supported unsigned GRUB due to an
+ # upstream bug. By default lp:maas-image-builder and
+ # packer-maas have grub preinstalled. If grub2-efi-aa64-modules
+ # is already in the image use unsigned grub so the install
+ # doesn't require Internet access. If grub is missing use the
+ # signed version.
+ uefi_pkgs.extend(['grub2-efi-aa64-modules', 'grub2-efi-aa64', 'shim-aa64'])
elif osfamily == DISTROS.debian:
arch = distro.get_architecture()
if arch == 'i386':
diff --git a/curtin/commands/install_grub.py b/curtin/commands/install_grub.py
index 5f8311f..99c22b9 100644
--- a/curtin/commands/install_grub.py
+++ b/curtin/commands/install_grub.py
@@ -51,6 +51,11 @@ def get_grub_package_name(target_arch, uefi, rhel_ver=None):
# grub2-efi-x64 installs a signed grub bootloader
grub_name = "grub2-efi-x64"
grub_target = "x86_64-efi"
+ elif target_arch == 'aarch64':
+ # centos 7+, no centos6 support
+ # grub2-efi-x64 installs a signed grub bootloader
+ grub_name = "grub2-efi-aa64"
+ grub_target = "arm64-efi"
elif target_arch == 'arm64':
grub_name = 'grub-efi-%s' % target_arch
grub_target = "arm64-efi"
Follow ups
-
[Merge] ~kleinm/curtin:centos-arm64-fixes into curtin:master
From: Server Team CI bot, 2021-01-15
-
Re: [Merge] ~kleinm/curtin:centos-arm64-fixes into curtin:master
From: Server Team CI bot, 2021-01-15
-
[Merge] ~kleinm/curtin:centos-arm64-fixes into curtin:master
From: Michael Hudson-Doyle, 2021-01-14
-
[Merge] ~kleinm/curtin:centos-arm64-fixes into curtin:master
From: Michael Hudson-Doyle, 2021-01-14
-
[Merge] ~kleinm/curtin:centos-arm64-fixes into curtin:master
From: Server Team CI bot, 2021-01-14
-
Invalid Commit Message
From: Server Team CI bot, 2021-01-14
-
Re: [Merge] ~kleinm/curtin:centos-arm64-fixes into curtin:master
From: Server Team CI bot, 2021-01-14
-
[Merge] ~kleinm/curtin:centos-arm64-fixes into curtin:master
From: Michael Hudson-Doyle, 2021-01-14
-
Re: [Merge] ~kleinm/curtin:centos-arm64-fixes into curtin:master
From: Michael Hudson-Doyle, 2021-01-14
-
Re: [Merge] ~kleinm/curtin:centos-arm64-fixes into curtin:master
From: Mark Klein, 2020-12-04
-
Re: [Merge] ~kleinm/curtin:centos-arm64-fixes into curtin:master
From: Michael Hudson-Doyle, 2020-12-04