[grub] Workaround Apple CD oddities (mjg59)

Peter Jones pjones at fedoraproject.org
Fri Apr 13 21:10:28 UTC 2012


commit c16a48cdee65e78c469eaeafcea3ae36f73d9b7c
Author: Peter Jones <pjones at redhat.com>
Date:   Fri Apr 13 17:10:21 2012 -0400

    Workaround Apple CD oddities (mjg59)

 grub-fedora-17.patch => grub-fedora-18.patch |   56 +++++++++++++++++--------
 grub.spec                                    |    7 ++-
 2 files changed, 43 insertions(+), 20 deletions(-)
---
diff --git a/grub-fedora-17.patch b/grub-fedora-18.patch
similarity index 99%
rename from grub-fedora-17.patch
rename to grub-fedora-18.patch
index 00c55a7..2e1400b 100644
--- a/grub-fedora-17.patch
+++ b/grub-fedora-18.patch
@@ -1,15 +1,15 @@
 From: Peter Jones <pjones at redhat.com>" 
-Date: Tue Mar 27 14:11:00 EDT 2012
-Subject: [PATCH] Changes from grub-0.97 to fedora-17
+Date: Fri Apr 13 17:09:54 EDT 2012
+Subject: [PATCH] Changes from grub-0.97 to master
 
-This patch is a bundle of the changes between grub-0.97 and fedora-17.
+This patch is a bundle of the changes between grub-0.97 and master.
 It can be reginerated from the git repository at:
 
-http://git.kernel.org/?p=boot/grub-fedora/grub-fedora.git;a=summary
+git://github.com/vathpela/grub-fedora.git
 
 Using the command:
 
-git diff grub-0.97 fedora-17
+git diff grub-0.97 master
 
  .gitignore                     |   10 
  ChangeLog                      |   48 
@@ -37,7 +37,7 @@ git diff grub-0.97 fedora-17
  efi/efichainloader.c           |  265 +
  efi/eficon.c                   |  306 +
  efi/eficore.c                  |  241 +
- efi/efidisk.c                  |  783 ++++
+ efi/efidisk.c                  |  801 ++++
  efi/efidp.c                    |  999 +++++
  efi/efigraph.c                 | 1501 ++++++++
  efi/efimain.c                  |  129 
@@ -96,7 +96,7 @@ git diff grub-0.97 fedora-17
  lib/.gitignore                 |    2 
  lib/Makefile.in                |  416 --
  lib/device.c                   |  360 +
- makediff                       |   19 
+ makediff                       |   21 
  netboot/.gitignore             |    2 
  netboot/Makefile.in            | 1091 -----
  netboot/etherboot.h            |   34 
@@ -153,7 +153,7 @@ git diff grub-0.97 fedora-17
  util/Makefile.in               |  478 --
  util/grub-crypt.in             |   80 
  util/grub-install.in           |  334 +
- 142 files changed, 26259 insertions(+), 17652 deletions(-)
+ 142 files changed, 26279 insertions(+), 17652 deletions(-)
 
 diff --git a/.gitignore b/.gitignore
 new file mode 100644
@@ -12537,10 +12537,10 @@ index 0000000..8abea7d
 +
 diff --git a/efi/efidisk.c b/efi/efidisk.c
 new file mode 100644
-index 0000000..3f69798
+index 0000000..6a505f3
 --- /dev/null
 +++ b/efi/efidisk.c
-@@ -0,0 +1,783 @@
+@@ -0,0 +1,801 @@
 +/*
 + *  GRUB  --  GRand Unified Bootloader
 + *  Copyright (C) 2006  Free Software Foundation, Inc.
@@ -13065,6 +13065,7 @@ index 0000000..3f69798
 +    {
 +      grub_efi_uint8_t type = GRUB_EFI_DEVICE_PATH_TYPE (dp1);
 +      grub_efi_uint8_t subtype = GRUB_EFI_DEVICE_PATH_SUBTYPE(dp1);
++      grub_efi_uint16_t len = GRUB_EFI_DEVICE_PATH_LENGTH (dp);
 +
 +      if (type == GRUB_EFI_MEDIA_DEVICE_PATH_TYPE &&
 +	      subtype == GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE)
@@ -13075,6 +13076,23 @@ index 0000000..3f69798
 +	  dp1->length[1] = 0;
 +	}
 +
++      if (type == GRUB_EFI_MEDIA_DEVICE_PATH_TYPE &&
++	  subtype == GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE)
++	{
++	  grub_efi_hard_drive_device_path_t temp_hd;
++	  grub_memcpy (&temp_hd, dp1, len);
++	  if (temp_hd.signature_type == 0 && temp_hd.mbr_type >= 0x10) {
++	    /*
++	     * Apple Parttion Map CDs appear as hard drives with non-spec
++	     * partition type fields. Fix them up.
++	     */
++	    dp1->type = GRUB_EFI_END_DEVICE_PATH_TYPE;
++	    dp1->subtype = GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE;
++	    dp1->length[0] = 4;
++	    dp1->length[1] = 0;
++	  }
++	}
++
 +      if (GRUB_EFI_END_ENTIRE_DEVICE_PATH (dp1))
 +	break;
 +
@@ -33120,29 +33138,31 @@ index d0663b3..50540bc 100644
      {
 diff --git a/makediff b/makediff
 new file mode 100755
-index 0000000..f9bce4c
+index 0000000..a82b448
 --- /dev/null
 +++ b/makediff
-@@ -0,0 +1,19 @@
+@@ -0,0 +1,21 @@
 +#!/bin/bash
++(
 +cat << EOF
 +From: Peter Jones <pjones at redhat.com>" 
 +Date: $(date)
-+Subject: [PATCH] Changes from grub-0.97 to fedora-17
++Subject: [PATCH] Changes from grub-0.97 to master
 +
-+This patch is a bundle of the changes between grub-0.97 and fedora-17.
++This patch is a bundle of the changes between grub-0.97 and master.
 +It can be reginerated from the git repository at:
 +
-+http://git.kernel.org/?p=boot/grub-fedora/grub-fedora.git;a=summary
++git://github.com/vathpela/grub-fedora.git
 +
 +Using the command:
 +
-+git diff grub-0.97 fedora-17
++git diff grub-0.97 master
 +
 +EOF
-+git diff grub-0.97 fedora-17 | diffstat -p1
++git diff grub-0.97 master | diffstat -p1
 +echo
-+git diff grub-0.97 fedora-17
++git diff grub-0.97 master
++) | cat
 diff --git a/netboot/.gitignore b/netboot/.gitignore
 new file mode 100644
 index 0000000..5d89f6d
diff --git a/grub.spec b/grub.spec
index 2ee3066..26e2e93 100644
--- a/grub.spec
+++ b/grub.spec
@@ -1,6 +1,6 @@
 Name: grub
 Version: 0.97
-Release: 88%{?dist}
+Release: 89%{?dist}
 Epoch: 1
 Summary: Grand Unified Boot Loader.
 Group: System Environment/Base
@@ -24,7 +24,7 @@ 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-17.patch
+Patch0: grub-fedora-18.patch
 Patch1: 0001-Fix-strange-compilation-problem.patch
 
 %description
@@ -120,6 +120,9 @@ fi
 /sbin/grub-crypt
 
 %changelog
+* Fri Apr 13 2012 Peter Jones <pjones at redhat.com> - 0.97-89
+- Workaround Apple CD oddities (mjg59)
+
 * Tue Mar 27 2012 Peter Jones <pjones at redhat.com> - 0.97-88
 - Add directory listing to uefifs
 - Add -fno-reorder-functions for EFI builds


More information about the scm-commits mailing list