From 9ec64933dbdcc17090b678f61af33db9bb515489 Mon Sep 17 00:00:00 2001 From: "d.marlin" Date: Wed, 19 Feb 2014 22:33:08 -0600 Subject: [PATCH] Improve aarch64 UEFI support (#1067671) Update the templates and config file to better support EFI on aarch64 on 64-bit ARM. Resolves: rhbz#1067671 Signed-off-by: David A. Marlin Signed-off-by: Brian C. Lane --- share/aarch64.tmpl | 12 +----------- share/config_files/aarch64/grub2-efi.cfg | 9 ++++----- share/efi.tmpl | 5 +++++ 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/share/aarch64.tmpl b/share/aarch64.tmpl index 701b22e9..c341aae6 100644 --- a/share/aarch64.tmpl +++ b/share/aarch64.tmpl @@ -2,7 +2,6 @@ <% configdir="tmp/config_files/aarch64" PXEBOOTDIR="images/pxeboot" -BOOTDIR="boot" KERNELDIR=PXEBOOTDIR LIVEDIR="LiveOS" %> @@ -11,15 +10,6 @@ mkdir ${LIVEDIR} install ${runtime_img} ${LIVEDIR}/squashfs.img treeinfo stage2 mainimage ${LIVEDIR}/squashfs.img -## install bootloader and config files -mkdir ${BOOTDIR} -install ${configdir}/boot.msg ${BOOTDIR} -install ${configdir}/grub2-efi.cfg ${BOOTDIR} - -## configure bootloader -replace @VERSION@ ${product.version} ${BOOTDIR}/grub2-efi.cfg ${BOOTDIR}/*.msg -replace @PRODUCT@ '${product.name}' ${BOOTDIR}/grub2-efi.cfg ${BOOTDIR}/*.msg - ## install kernels mkdir ${KERNELDIR} %for kernel in kernels: @@ -35,7 +25,7 @@ mkdir ${KERNELDIR} ## WHeeeeeeee, EFI. ## We could remove the basearch restriction someday.. <% efiargs=""; efigraft="" %> -%if exists("boot/efi/EFI/*/gcdaa64.efi"): +%if exists("boot/efi/EFI/*/grubaa64.efi"): <% efiarch = 'AARCH64' efigraft="EFI/BOOT={0}/EFI/BOOT".format(outroot) diff --git a/share/config_files/aarch64/grub2-efi.cfg b/share/config_files/aarch64/grub2-efi.cfg index 289ed43d..83f57637 100644 --- a/share/config_files/aarch64/grub2-efi.cfg +++ b/share/config_files/aarch64/grub2-efi.cfg @@ -9,10 +9,9 @@ set timeout=5 ### END /etc/grub.d/00_header ### ### BEGIN /etc/grub.d/10_linux ### -menuentry 'Install @PRODUCT@ @VERSION@' --class fedora --class gnu-linux --class gnu --class os { - set root='hd0,gpt2' - devicetree @KERNELPATH@/../foundation-v8.dtb - linuxefi @KERNELPATH@ @ROOT@ mem=2G console=ttyAMA0 earlyprintk=pl011,0x1c090000 debug uefi_debug rw - initrdefi @INITRDPATH@ +menuentry 'Install @PRODUCT@ @VERSION@' --class red --class gnu-linux --class gnu --class os { + linux @KERNELPATH@ @ROOT@ ro console=ttyS0,115200 debug earlyprintk=uart8250-32bit,0x1c020000 maxcpus=1 + initrd @INITRDPATH@ + devicetree /images/pxeboot/apm-mustang.dtb } diff --git a/share/efi.tmpl b/share/efi.tmpl index dee095f2..9f0231c8 100644 --- a/share/efi.tmpl +++ b/share/efi.tmpl @@ -7,9 +7,14 @@ APPLE_EFI_DISKNAME=inroot+"/usr/share/pixmaps/bootloader/fedora-media.vol" mkdir ${EFIBOOTDIR} mkdir ${EFIBOOTDIR}/fonts/ +%if efiarch == 'AARCH64': +install boot/efi/EFI/*/grubaa64.efi ${EFIBOOTDIR}/BOOT${efiarch}.efi +install boot/efi/EFI/*/grubaa64.efi ${EFIBOOTDIR}/grubaa64.efi +%else: install boot/efi/EFI/*/shim.efi ${EFIBOOTDIR}/BOOT${efiarch}.efi install boot/efi/EFI/*/MokManager.efi ${EFIBOOTDIR}/ install boot/efi/EFI/*/gcdx64.efi ${EFIBOOTDIR}/grubx64.efi +%endif install boot/efi/EFI/*/fonts/unicode.pf2 ${EFIBOOTDIR}/fonts/ ## actually make the EFI images