Blame SOURCES/0041-Work-around-aarch64-not-having-quite-the-same-grub-c.patch

903092
From d9009de3ff466ed12604d93f92329000aca7b33e Mon Sep 17 00:00:00 2001
903092
From: Peter Jones <pjones@redhat.com>
903092
Date: Thu, 2 Jul 2015 15:06:15 -0400
903092
Subject: [PATCH 41/41] Work around aarch64 not having quite the same grub
903092
 commands as x86.
903092
903092
A workaround for a workaround :/
903092
903092
Related: rhbz#1200045
903092
Related: rhbz#1142545
903092
Related: rhbz#1184014
903092
903092
Signed-off-by: Peter Jones <pjones@redhat.com>
903092
---
903092
 test.sh                          |  21 +++++--
903092
 test/results/add/g2-1.15.aarch64 | 126 +++++++++++++++++++++++++++++++++++++++
903092
 2 files changed, 142 insertions(+), 5 deletions(-)
903092
 create mode 100644 test/results/add/g2-1.15.aarch64
903092
903092
diff --git a/test.sh b/test.sh
903092
index 74857af..c2a66e2 100755
903092
--- a/test.sh
903092
+++ b/test.sh
903092
@@ -525,11 +525,22 @@ if [ "$testgrub2" == "y" ]; then
903092
     grub2Test grub2.5 add/g2-1.5 --add-kernel=/boot/new-kernel.img \
903092
         --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
903092
         --copy-default
903092
-    grub2Test grub2.15 add/g2-1.15 \
903092
-        --add-kernel=/boot/vmlinuz-0-rescue-5a94251776a14678911d4ae0949500f5 \
903092
-        --initrd /boot/initramfs-0-rescue-5a94251776a14678911d4ae0949500f5.img \
903092
-        --copy-default --title "Fedora 21 Rescue" --args=root=/fooooo \
903092
-        --remove-kernel=wtf --boot-filesystem=/boot/ --efi
903092
+    case $ARCH in
903092
+        aarch64)
903092
+            grub2Test grub2.15 add/g2-1.15.aarch64 \
903092
+                --add-kernel=/boot/vmlinuz-0-rescue-5a94251776a14678911d4ae0949500f5 \
903092
+                --initrd /boot/initramfs-0-rescue-5a94251776a14678911d4ae0949500f5.img \
903092
+                --copy-default --title "Fedora 21 Rescue" --args=root=/fooooo \
903092
+                --remove-kernel=wtf --boot-filesystem=/boot/ --efi
903092
+            ;;
903092
+        *)
903092
+            grub2Test grub2.15 add/g2-1.15 \
903092
+                --add-kernel=/boot/vmlinuz-0-rescue-5a94251776a14678911d4ae0949500f5 \
903092
+                --initrd /boot/initramfs-0-rescue-5a94251776a14678911d4ae0949500f5.img \
903092
+                --copy-default --title "Fedora 21 Rescue" --args=root=/fooooo \
903092
+                --remove-kernel=wtf --boot-filesystem=/boot/ --efi
903092
+            ;;
903092
+        esac
903092
 
903092
     testing="GRUB2 add initrd"
903092
     grub2Test grub2.2 add/g2-1.4 --update-kernel=/boot/new-kernel.img \
903092
diff --git a/test/results/add/g2-1.15.aarch64 b/test/results/add/g2-1.15.aarch64
903092
new file mode 100644
903092
index 0000000..ee5f868
903092
--- /dev/null
903092
+++ b/test/results/add/g2-1.15.aarch64
903092
@@ -0,0 +1,126 @@
903092
+#
903092
+# DO NOT EDIT THIS FILE
903092
+#
903092
+# It is automatically generated by grub2-mkconfig using templates
903092
+# from /etc/grub.d and settings from /etc/default/grub
903092
+#
903092
+
903092
+### BEGIN /etc/grub.d/00_header ###
903092
+set pager=1
903092
+
903092
+if [ -s $prefix/grubenv ]; then
903092
+  load_env
903092
+fi
903092
+if [ "${next_entry}" ] ; then
903092
+   set default="${next_entry}"
903092
+   set next_entry=
903092
+   save_env next_entry
903092
+   set boot_once=true
903092
+else
903092
+   set default="${saved_entry}"
903092
+fi
903092
+
903092
+if [ x"${feature_menuentry_id}" = xy ]; then
903092
+  menuentry_id_option="--id"
903092
+else
903092
+  menuentry_id_option=""
903092
+fi
903092
+
903092
+export menuentry_id_option
903092
+
903092
+if [ "${prev_saved_entry}" ]; then
903092
+  set saved_entry="${prev_saved_entry}"
903092
+  save_env saved_entry
903092
+  set prev_saved_entry=
903092
+  save_env prev_saved_entry
903092
+  set boot_once=true
903092
+fi
903092
+
903092
+function savedefault {
903092
+  if [ -z "${boot_once}" ]; then
903092
+    saved_entry="${chosen}"
903092
+    save_env saved_entry
903092
+  fi
903092
+}
903092
+
903092
+function load_video {
903092
+  if [ x$feature_all_video_module = xy ]; then
903092
+    insmod all_video
903092
+  else
903092
+    insmod efi_gop
903092
+    insmod efi_uga
903092
+    insmod ieee1275_fb
903092
+    insmod vbe
903092
+    insmod vga
903092
+    insmod video_bochs
903092
+    insmod video_cirrus
903092
+  fi
903092
+}
903092
+
903092
+terminal_output console
903092
+if [ x$feature_timeout_style = xy ] ; then
903092
+  set timeout_style=menu
903092
+  set timeout=5
903092
+# Fallback normal timeout code in case the timeout_style feature is
903092
+# unavailable.
903092
+else
903092
+  set timeout=5
903092
+fi
903092
+### END /etc/grub.d/00_header ###
903092
+
903092
+### BEGIN /etc/grub.d/10_linux ###
903092
+menuentry 'Fedora 21 Rescue' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.15.0-0.rc5.git2.10.fc21.x86_64-advanced-a14e3dcb-ade3-42f7-832f-d9f66b5ae6a3' {
903092
+	load_video
903092
+	set gfxpayload=keep
903092
+	insmod gzio
903092
+	insmod part_msdos
903092
+	insmod ext2
903092
+	set root='hd0,msdos1'
903092
+	if [ x$feature_platform_search_hint = xy ]; then
903092
+	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  6169b46f-0257-4319-b2e4-caaed2a8e06b
903092
+	else
903092
+	  search --no-floppy --fs-uuid --set=root 6169b46f-0257-4319-b2e4-caaed2a8e06b
903092
+	fi
903092
+	linuxefi /vmlinuz-0-rescue-5a94251776a14678911d4ae0949500f5 root=/fooooo ro  rd.lvm.lv=fedora_uefi/root rd.lvm.lv=fedora_uefi/swap rhgb quiet
903092
+	initrd /initramfs-0-rescue-5a94251776a14678911d4ae0949500f5.img
903092
+}
903092
+menuentry 'Fedora, with Linux 3.15.0-0.rc5.git2.10.fc21.x86_64' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.15.0-0.rc5.git2.10.fc21.x86_64-advanced-a14e3dcb-ade3-42f7-832f-d9f66b5ae6a3' {
903092
+	load_video
903092
+	set gfxpayload=keep
903092
+	insmod gzio
903092
+	insmod part_msdos
903092
+	insmod ext2
903092
+	set root='hd0,msdos1'
903092
+	if [ x$feature_platform_search_hint = xy ]; then
903092
+	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  6169b46f-0257-4319-b2e4-caaed2a8e06b
903092
+	else
903092
+	  search --no-floppy --fs-uuid --set=root 6169b46f-0257-4319-b2e4-caaed2a8e06b
903092
+	fi
903092
+	linuxefi /vmlinuz-3.15.0-0.rc5.git2.10.fc21.x86_64 root=/dev/mapper/fedora_uefi-root ro  rd.lvm.lv=fedora_uefi/root rd.lvm.lv=fedora_uefi/swap rhgb quiet
903092
+}
903092
+
903092
+### END /etc/grub.d/10_linux ###
903092
+
903092
+### BEGIN /etc/grub.d/20_linux_xen ###
903092
+
903092
+### END /etc/grub.d/20_linux_xen ###
903092
+
903092
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
903092
+### END /etc/grub.d/20_ppc_terminfo ###
903092
+
903092
+### BEGIN /etc/grub.d/30_os-prober ###
903092
+### END /etc/grub.d/30_os-prober ###
903092
+
903092
+### BEGIN /etc/grub.d/40_custom ###
903092
+# This file provides an easy way to add custom menu entries.  Simply type the
903092
+# menu entries you want to add after this comment.  Be careful not to change
903092
+# the 'exec tail' line above.
903092
+### END /etc/grub.d/40_custom ###
903092
+
903092
+### BEGIN /etc/grub.d/41_custom ###
903092
+if [ -f  ${config_directory}/custom.cfg ]; then
903092
+  source ${config_directory}/custom.cfg
903092
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
903092
+  source $prefix/custom.cfg;
903092
+fi
903092
+### END /etc/grub.d/41_custom ###
903092
-- 
903092
2.4.3
903092