From 8391a993033e212a24635dd629c167354f0834f8 Mon Sep 17 00:00:00 2001 From: nkraetzschmar Date: Tue, 22 Mar 2022 20:52:46 +0100 Subject: [PATCH] feat: add aarch64 uefi support --- dracut.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dracut.sh b/dracut.sh index 634ef87bf3..7000931876 100755 --- a/dracut.sh +++ b/dracut.sh @@ -1352,6 +1352,7 @@ if [[ ! $print_cmdline ]]; then exit 1 fi unset EFI_MACHINE_TYPE_NAME + EFI_SECTION_VMA_INITRD=0x3000000 case $(uname -m) in x86_64) EFI_MACHINE_TYPE_NAME=x64 @@ -1359,6 +1360,11 @@ if [[ ! $print_cmdline ]]; then i?86) EFI_MACHINE_TYPE_NAME=ia32 ;; + aarch64) + EFI_MACHINE_TYPE_NAME=aa64 + # aarch64 kernels are uncompressed and thus larger, so we need a bigger gap between vma sections + EFI_SECTION_VMA_INITRD=0x4000000 + ;; *) dfatal "Architecture '$(uname -m)' not supported to create a UEFI executable" exit 1 @@ -2540,7 +2546,7 @@ if [[ $uefi == yes ]]; then ${uefi_cmdline:+--add-section .cmdline="$uefi_cmdline" --change-section-vma .cmdline=0x30000} \ ${uefi_splash_image:+--add-section .splash="$uefi_splash_image" --change-section-vma .splash=0x40000} \ --add-section .linux="$kernel_image" --change-section-vma .linux=0x2000000 \ - --add-section .initrd="${DRACUT_TMPDIR}/initramfs.img" --change-section-vma .initrd=0x3000000 \ + --add-section .initrd="${DRACUT_TMPDIR}/initramfs.img" --change-section-vma .initrd="${EFI_SECTION_VMA_INITRD}" \ "$uefi_stub" "${uefi_outdir}/linux.efi"; then if [[ -n ${uefi_secureboot_key} && -n ${uefi_secureboot_cert} ]]; then if sbsign \