dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

Blame SOURCES/0115-Use-linux16-when-appropriate-880840.patch

28f7f8
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
f96e0b
From: Peter Jones <pjones@redhat.com>
f96e0b
Date: Mon, 28 Oct 2013 10:05:07 -0400
28f7f8
Subject: [PATCH] Use linux16 when appropriate (#880840)
f96e0b
f96e0b
The kernel group really would prefer that we use the 16 bit entry point
f96e0b
on x86 bios machines.
f96e0b
f96e0b
Resolves: rhbz#880840
f96e0b
f96e0b
Signed-off-by: Peter Jones <pjones@redhat.com>
f96e0b
---
f96e0b
 util/grub.d/10_linux.in | 9 +++++++--
f96e0b
 1 file changed, 7 insertions(+), 2 deletions(-)
f96e0b
f96e0b
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
28f7f8
index e762e1f4e37..600bfd29dc7 100644
f96e0b
--- a/util/grub.d/10_linux.in
f96e0b
+++ b/util/grub.d/10_linux.in
606ea6
@@ -74,6 +74,11 @@ linux_entry ()
f96e0b
   type="$3"
f96e0b
   args="$4"
f96e0b
 
f96e0b
+  sixteenbit=""
f96e0b
+  case "$machine" in
f96e0b
+    i?86|x86_64) sixteenbit="16" ;;
f96e0b
+  esac
f96e0b
+
f96e0b
   if [ -z "$boot_device_id" ]; then
f96e0b
       boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
f96e0b
   fi
606ea6
@@ -132,7 +137,7 @@ linux_entry ()
f96e0b
 EOF
f96e0b
   else
f96e0b
     sed "s/^/$submenu_indentation/" << EOF
f96e0b
-	linux	${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
f96e0b
+	linux${sixteenbit} ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
f96e0b
 EOF
f96e0b
   fi
f96e0b
   if test -n "${initrd}" ; then
606ea6
@@ -142,7 +147,7 @@ EOF
f96e0b
 EOF
f96e0b
     else
f96e0b
       sed "s/^/$submenu_indentation/" << EOF
f96e0b
-	initrd	${rel_dirname}/${initrd}
f96e0b
+	initrd${sixteenbit} ${rel_dirname}/${initrd}
f96e0b
 EOF
f96e0b
     fi
f96e0b
   fi