Skip to content

Commit 8391a99

Browse files
nkraetzschmarjohannbg
authored andcommitted
feat: add aarch64 uefi support
1 parent aebeb2e commit 8391a99

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

dracut.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1352,13 +1352,19 @@ if [[ ! $print_cmdline ]]; then
13521352
exit 1
13531353
fi
13541354
unset EFI_MACHINE_TYPE_NAME
1355+
EFI_SECTION_VMA_INITRD=0x3000000
13551356
case $(uname -m) in
13561357
x86_64)
13571358
EFI_MACHINE_TYPE_NAME=x64
13581359
;;
13591360
i?86)
13601361
EFI_MACHINE_TYPE_NAME=ia32
13611362
;;
1363+
aarch64)
1364+
EFI_MACHINE_TYPE_NAME=aa64
1365+
# aarch64 kernels are uncompressed and thus larger, so we need a bigger gap between vma sections
1366+
EFI_SECTION_VMA_INITRD=0x4000000
1367+
;;
13621368
*)
13631369
dfatal "Architecture '$(uname -m)' not supported to create a UEFI executable"
13641370
exit 1
@@ -2540,7 +2546,7 @@ if [[ $uefi == yes ]]; then
25402546
${uefi_cmdline:+--add-section .cmdline="$uefi_cmdline" --change-section-vma .cmdline=0x30000} \
25412547
${uefi_splash_image:+--add-section .splash="$uefi_splash_image" --change-section-vma .splash=0x40000} \
25422548
--add-section .linux="$kernel_image" --change-section-vma .linux=0x2000000 \
2543-
--add-section .initrd="${DRACUT_TMPDIR}/initramfs.img" --change-section-vma .initrd=0x3000000 \
2549+
--add-section .initrd="${DRACUT_TMPDIR}/initramfs.img" --change-section-vma .initrd="${EFI_SECTION_VMA_INITRD}" \
25442550
"$uefi_stub" "${uefi_outdir}/linux.efi"; then
25452551
if [[ -n ${uefi_secureboot_key} && -n ${uefi_secureboot_cert} ]]; then
25462552
if sbsign \

0 commit comments

Comments
 (0)