Blame SOURCES/0008-Use-the-correct-load-commands-for-aarch64-efi.patch

903092
From 939f2d3dc981fe6a3258ac943673c43d7a4964a1 Mon Sep 17 00:00:00 2001
903092
From: no one <noone@example.com>
903092
Date: Thu, 13 Feb 2014 10:30:11 -0500
903092
Subject: [PATCH 08/41] Use the correct load commands for aarch64 efi.
903092
903092
Resolves: rhbz#1081269
903092
---
903092
 grubby.c |  7 +++++++
903092
 test.sh  | 17 ++++++++++++++---
903092
 2 files changed, 21 insertions(+), 3 deletions(-)
903092
903092
diff --git a/grubby.c b/grubby.c
903092
index aa228c3..0205882 100644
903092
--- a/grubby.c
903092
+++ b/grubby.c
903092
@@ -714,10 +714,17 @@ static enum lineType_e preferredLineType(enum lineType_e type,
903092
 					 struct configFileInfo *cfi) {
903092
     if (isEfi && cfi == &grub2ConfigType) {
903092
 	switch (type) {
903092
+#if defined(__aarch64__)
903092
+	case LT_KERNEL:
903092
+	    return LT_KERNEL;
903092
+	case LT_INITRD:
903092
+	    return LT_INITRD;
903092
+#else
903092
 	case LT_KERNEL:
903092
 	    return LT_KERNEL_EFI;
903092
 	case LT_INITRD:
903092
 	    return LT_INITRD_EFI;
903092
+#endif
903092
 	default:
903092
 	    return type;
903092
 	}
903092
diff --git a/test.sh b/test.sh
903092
index 5be4006..1d28fb1 100755
903092
--- a/test.sh
903092
+++ b/test.sh
903092
@@ -443,9 +443,20 @@ if [ "$testgrub2" == "y" ]; then
903092
     grub2Test grub2.1 add/g2-1.1 --add-kernel=/boot/new-kernel.img \
903092
         --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
903092
         --copy-default
903092
-    grub2Test grub2.1 add/g2-1.6 --add-kernel=/boot/new-kernel.img \
903092
-        --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
903092
-        --copy-default --efi
903092
+    case $ARCH in
903092
+        aarch64)
903092
+            grub2Test grub2.1 add/g2-1.1 --add-kernel=/boot/new-kernel.img \
903092
+                --title='title' \
903092
+                --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
903092
+                --copy-default --efi
903092
+            ;;
903092
+        *)
903092
+            grub2Test grub2.1 add/g2-1.6 --add-kernel=/boot/new-kernel.img \
903092
+                --title='title' \
903092
+                --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
903092
+                --copy-default --efi
903092
+            ;;
903092
+    esac
903092
     grub2Test grub2.6 add/g2-1.7 --add-kernel=/boot/new-kernel.img \
903092
         --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
903092
         --copy-default --efi
903092
-- 
903092
2.4.3
903092