From 97b20ca0da2e6916e070ff89baafb4b80b3f46ac Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Tue, 24 Aug 2021 23:34:42 +0200 Subject: [PATCH] distro/rhel85: aarch64 support for bootiso mono Add aarch64 support for the bootiso.mono stage: select the proper efi architecture and include isolinux only on x86. --- internal/distro/rhel85/stage_options.go | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/internal/distro/rhel85/stage_options.go b/internal/distro/rhel85/stage_options.go index 0e38cf5b7..17112d28d 100644 --- a/internal/distro/rhel85/stage_options.go +++ b/internal/distro/rhel85/stage_options.go @@ -269,6 +269,17 @@ func bootISOMonoStageOptions(kernelVer string, arch string) *osbuild.BootISOMono comprOptions.BCJ = bcj } isolabel := fmt.Sprintf("RHEL-8-5-0-BaseOS-%s", arch) + + var architectures []string + + if arch == distro.X86_64ArchName { + architectures = []string{"IA32", "X64"} + } else if arch == distro.Aarch64ArchName { + architectures = []string{"AA64"} + } else { + panic("unsupported architecture") + } + return &osbuild.BootISOMonoStageOptions{ Product: osbuild.Product{ Name: "Red Hat Enterprise Linux", @@ -278,14 +289,11 @@ func bootISOMonoStageOptions(kernelVer string, arch string) *osbuild.BootISOMono Kernel: kernelVer, KernelOpts: fmt.Sprintf("inst.ks=hd:LABEL=%s:%s", isolabel, kspath), EFI: osbuild.EFI{ - Architectures: []string{ - "IA32", - "X64", - }, - Vendor: "redhat", + Architectures: architectures, + Vendor: "redhat", }, ISOLinux: osbuild.ISOLinux{ - Enabled: true, + Enabled: arch == distro.X86_64ArchName, Debug: false, }, Templates: "80-rhel",