From 0effdbd8ef12d0f668afee9505d1f50659f892ef Mon Sep 17 00:00:00 2001 From: Steven Shiau Date: Wed, 28 Feb 2018 22:39:32 +0800 Subject: Add grub-based UEFI boot support for ARM64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: #885692 Fixes: !2 Signed-off-by: Raphaƫl Hertzog --- scripts/build/binary_grub-efi | 48 +++++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 13 deletions(-) diff --git a/scripts/build/binary_grub-efi b/scripts/build/binary_grub-efi index d24532d50..bad4dc82c 100755 --- a/scripts/build/binary_grub-efi +++ b/scripts/build/binary_grub-efi @@ -41,12 +41,19 @@ Check_lockfile .lock Create_lockfile .lock # Check architecture -Check_architectures amd64 i386 +Check_architectures amd64 i386 arm64 Check_crossarchitectures # Checking depends -Check_package chroot /usr/lib/grub/x86_64-efi/configfile.mod grub-efi-amd64-bin -Check_package chroot /usr/lib/grub/i386-efi/configfile.mod grub-efi-ia32-bin +case "${LB_ARCHITECTURES}" in + amd64|i386) + Check_package chroot /usr/lib/grub/x86_64-efi/configfile.mod grub-efi-amd64-bin + Check_package chroot /usr/lib/grub/i386-efi/configfile.mod grub-efi-ia32-bin + ;; + arm64) + Check_package chroot /usr/lib/grub/arm64-efi/configfile.mod grub-efi-arm64-bin + ;; +esac Check_package chroot /usr/bin/grub-mkimage grub-common Check_package chroot /usr/bin/mcopy mtools Check_package chroot /sbin/mkfs.msdos dosfstools @@ -67,7 +74,7 @@ Restore_cache cache/packages.binary Install_package # Cleanup files that we generate -rm -rf binary/boot/efi.img binary/boot/grub/i386-efi/ binary/boot/grub/x86_64-efi +rm -rf binary/boot/efi.img binary/boot/grub/i386-efi/ binary/boot/grub/x86_64-efi binary/boot/grub/arm64-efi # This is workaround till both efi-image and grub-cpmodules are put into a binary package case "${LB_BUILD_WITH_CHROOT}" in @@ -93,6 +100,17 @@ cat >binary.sh <