grub2/0099-Use-linux16-when-appropriate-880840.patch
Peter Jones ec4acbbd98 Update grub2 for f28
- Try to fix things for new compiler madness.
  I really don't know why gcc decided __attribute__((packed)) on a "typedef
  struct" should imply __attribute__((align (1))) and that it should have a
  warning that it does so.  The obvious behavior would be to keep the alignment
  of the first element unless it's used in another object or type that /also/
  hask the packed attribute.  Why should it change the default alignment at
  all?
- Merge in the BLS patches Javier and I wrote.
- Attempt to fix pmtimer initialization failures to not be super duper slow.

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-02-28 10:08:00 -05:00

53 lines
1.4 KiB
Diff

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