[v1,5/5] grub-efi: Add support to install grubaa64 efi

Message ID 1425925876-9663-6-git-send-email-naresh.bhat@linaro.org
State New
Headers show

Commit Message

naresh.bhat@linaro.org March 9, 2015, 6:31 p.m.
Add support to install grubaa64.efi image.  By default GRUB_IMAGE contains
the bootia32.efi image.  Depending on the architecture type the variable is
being updated to either bootia64.efi or grubaa64.efi

Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org>
---
 meta/classes/grub-efi.bbclass |   17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

Patch

diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index 47bd35e..cded1a0 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -31,15 +31,20 @@  efi_populate() {
 	# nested under a top level directory.
 	DEST=$1
 
-	install -d ${DEST}${EFIDIR}
-
 	GRUB_IMAGE="bootia32.efi"
-	if [ "${TARGET_ARCH}" = "x86_64" ]; then
+
+	case ${TARGET_ARCH} in
+		x86_64 )
 		GRUB_IMAGE="bootx64.efi"
-	fi
-	install -m 0644 ${DEPLOY_DIR_IMAGE}/${GRUB_IMAGE} ${DEST}${EFIDIR}
+		;;
+		aarch64 )
+		GRUB_IMAGE="grubaa64.efi"
+		;;
+	esac
+
+	install -m 0644 -D ${DEPLOY_DIR_IMAGE}/${GRUB_IMAGE} ${DEST}${EFIDIR}
 
-	install -m 0644 ${GRUBCFG} ${DEST}${EFIDIR}
+	install -m 0644 -D ${GRUBCFG} ${DEST}${EFIDIR}
 }
 
 efi_iso_populate() {