diff --git a/0001-Fall-back-to-old-efi-GOP-detection-behavior.patch b/0001-Fall-back-to-old-efi-GOP-detection-behavior.patch new file mode 100644 index 0000000..f377b49 --- /dev/null +++ b/0001-Fall-back-to-old-efi-GOP-detection-behavior.patch @@ -0,0 +1,46 @@ +From 2696bda9f0bd3811b7d51930c5a619dcb0d64d7b Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Tue, 27 Sep 2011 16:42:40 -0400 +Subject: [PATCH] Fall back to old efi GOP detection behavior. + +It appears that on many machines, the GOP driver is not connected to PCI_IO. +The fix to make some macs work better didn't take this into account, so it +broke those machines. This patch falls back to the older behavior which worked +on those machines. + +--- + efi/efigraph.c | 3 +++ + efi/efiuga.c | 3 +++ + 2 files changed, 6 insertions(+), 0 deletions(-) + +diff --git a/efi/efigraph.c b/efi/efigraph.c +index c285d39..fc88123 100644 +--- a/efi/efigraph.c ++++ b/efi/efigraph.c +@@ -1413,6 +1413,9 @@ enable(struct graphics_backend *backend) + + grub_free(handles); + ++ if (!eg->output_intf) ++ eg->output_intf = grub_efi_locate_protocol(&graphics_output_guid, NULL); ++ + if (!eg->output_intf) + goto fail; + +diff --git a/efi/efiuga.c b/efi/efiuga.c +index e035c55..b27500b 100644 +--- a/efi/efiuga.c ++++ b/efi/efiuga.c +@@ -912,6 +912,9 @@ enable(struct graphics_backend *backend) + + grub_free(handles); + ++ if (!uga->draw_intf) ++ uga->draw_intf = grub_efi_locate_protocol(&draw_guid, NULL); ++ + if (!uga->draw_intf) { + grub_free(uga); + return 0; +-- +1.7.6 + diff --git a/0001-Fix-strange-compilation-problem.patch b/0001-Fix-strange-compilation-problem.patch new file mode 100644 index 0000000..0e8b419 --- /dev/null +++ b/0001-Fix-strange-compilation-problem.patch @@ -0,0 +1,31 @@ +From a36b871255e0a05690f95942ed2a6be57c24ba1e Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Wed, 28 Sep 2011 17:03:39 -0400 +Subject: [PATCH] Fix strange compilation problem. + +the compiler seems to be optimizing finish_param_parse out and doing a +poor job of it. So make it a non-static function and that doesn't +happen. +--- + efi/efidp.c | 5 ++++- + 1 files changed, 4 insertions(+), 1 deletions(-) + +diff --git a/efi/efidp.c b/efi/efidp.c +index d8ca03d..f4ca452 100644 +--- a/efi/efidp.c ++++ b/efi/efidp.c +@@ -578,7 +578,10 @@ dpname_matches(char *str, char *candidate) + return rc; + } + +-static void ++extern void ++finish_param_parse(char *pos, char **end, char *tmp); ++ ++void + finish_param_parse(char *pos, char **end, char *tmp) + { + if (!pos || !end || !tmp) +-- +1.7.6 + diff --git a/grub.spec b/grub.spec index 94672e8..b41c678 100644 --- a/grub.spec +++ b/grub.spec @@ -1,6 +1,6 @@ Name: grub Version: 0.97 -Release: 77%{?dist} +Release: 83%{?dist} Epoch: 1 Summary: Grand Unified Boot Loader. Group: System Environment/Base @@ -25,6 +25,8 @@ Source0: ftp://alpha.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz # This is from # http://git.kernel.org/?p=boot/grub-fedora/grub-fedora.git;a=summary Patch0: grub-fedora-16.patch +Patch1: 0001-Fall-back-to-old-efi-GOP-detection-behavior.patch +Patch2: 0001-Fix-strange-compilation-problem.patch %description GRUB (Grand Unified Boot Loader) is an experimental boot loader @@ -32,6 +34,14 @@ capable of booting into most free operating systems - Linux, FreeBSD, NetBSD, GNU Mach, and others as well as most commercial operating systems. +%package efi +Summary: GRUB bootloader for EFI systems +Group: System Environment/Base +Obsoletes: grub < 1:0.97-83 + +%description efi +GRUB for EFI systems is a bootloader used to boot EFI systems. + %prep %setup -q git init @@ -48,7 +58,7 @@ sed -i 's/0\.97/%{version}-%{release}/' configure.in autoreconf autoconf GCCVERS=$(gcc --version | head -1 | cut -d\ -f3 | cut -d. -f1) -CFLAGS="-Os -g -fno-strict-aliasing -Wall -Werror -Wno-shadow -Wno-unused" +CFLAGS="-O0 -g -fno-strict-aliasing -Wall -Werror -Wno-shadow -Wno-unused" if [ "$GCCVERS" == "4" ]; then CFLAGS="$CFLAGS -Wno-pointer-sign" fi @@ -92,7 +102,6 @@ fi %defattr(-,root,root) %doc AUTHORS ChangeLog NEWS README COPYING TODO docs/menu.lst /boot/grub -%attr(0755,root,root)/boot/efi/EFI/redhat /sbin/grub /sbin/grub-install /sbin/grub-terminfo @@ -104,7 +113,37 @@ fi %{_mandir}/man*/* %{_datadir}/grub +%files efi +%defattr(-,root,root) +%attr(0755,root,root)/boot/efi/EFI/redhat +/sbin/grub-terminfo +/sbin/grub-md5-crypt +/sbin/grub-crypt + %changelog +* Wed Oct 12 2011 Adam Williamson - 0.97-83 +- the obsolete doesn't work as phrased in -82, make it correct and + specific + +* Wed Oct 12 2011 Peter Jones - 0.97-82 +- grub-efi also needs to obsolete grub. + +* Tue Oct 11 2011 Peter Jones - 0.97-81 +- We don't need the conflicts with grub2 any more since grub2 has an + obsolete. + +* Tue Oct 04 2011 Peter Jones - 0.97-80 +- Separate grub-efi into a separate subpackage + Resolves: rhbz#743376 + +* Wed Sep 28 2011 Peter Jones - 0.97-79 +- Fix compile problem + Related: rhbz#741781 + +* Tue Sep 27 2011 Peter Jones - 0.97-78 +- Fall back to old efi GOP detection behavior. + Resolves: rhbz#741781 + * Thu Aug 25 2011 Peter Jones - 0.97-77 - Update to kernel.org fedora-16 branch - Add findiso command