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