aboutsummaryrefslogtreecommitdiff
path: root/sysutils/grub2
diff options
context:
space:
mode:
authorSergey Matveychuk <sem@FreeBSD.org>2010-10-12 15:48:46 +0000
committerSergey Matveychuk <sem@FreeBSD.org>2010-10-12 15:48:46 +0000
commit69c580fd805f255c70a93554bc78e5f5e09f884b (patch)
tree696fb6ffad8dddfab26fa826a7b29d5870f38404 /sysutils/grub2
parente679ebcac7414f78d754699c6261515d04820501 (diff)
downloadports-69c580fd805f255c70a93554bc78e5f5e09f884b.tar.gz
ports-69c580fd805f255c70a93554bc78e5f5e09f884b.zip
Notes
Diffstat (limited to 'sysutils/grub2')
-rw-r--r--sysutils/grub2/Makefile2
-rw-r--r--sysutils/grub2/files/patch-include-grub-gpt_partition.h20
-rw-r--r--sysutils/grub2/files/patch-util-getroot.c11
-rw-r--r--sysutils/grub2/files/patch-util-i386-pc-grub-setup.c23
4 files changed, 44 insertions, 12 deletions
diff --git a/sysutils/grub2/Makefile b/sysutils/grub2/Makefile
index 697a6686f612..0bea68c2605f 100644
--- a/sysutils/grub2/Makefile
+++ b/sysutils/grub2/Makefile
@@ -11,7 +11,7 @@ CATEGORIES= sysutils
MASTER_SITES= ftp://alpha.gnu.org/gnu/grub/
DISTNAME= grub-${PORTVERSION}
-MAINTAINER= sem@FreeBSD.org
+MAINTAINER= rick@lgarchitecture.com
COMMENT= Multiboot boot loader
CONFLICTS= grub-0*
diff --git a/sysutils/grub2/files/patch-include-grub-gpt_partition.h b/sysutils/grub2/files/patch-include-grub-gpt_partition.h
new file mode 100644
index 000000000000..b26b0c1741ac
--- /dev/null
+++ b/sysutils/grub2/files/patch-include-grub-gpt_partition.h
@@ -0,0 +1,20 @@
+--- include/grub/gpt_partition.h.orig 2010-03-06 12:51:37.000000000 -0800
++++ include/grub/gpt_partition.h 2010-10-10 02:57:26.000000000 -0700
+@@ -40,6 +40,17 @@
+ { 0x74, 0x4e, 0x65, 0x65, 0x64, 0x45, 0x46, 0x49 } \
+ }
+
++#define GRUB_GPT_PARTITION_TYPE_FREEBSD_BOOT \
++ { grub_cpu_to_le32 (0x83BD6B9D), grub_cpu_to_le16 (0x7F41), grub_cpu_to_le16 (0x11DC), \
++ { 0xBE, 0x0B, 0x00, 0x15, 0x60, 0xB8, 0x4F, 0x0F } \
++ }
++
++#define GRUB_GPT_PARTITION_TYPE_SOLARIS_BOOT \
++ { grub_cpu_to_le32 (0x6A82CB45), grub_cpu_to_le16 (0x1DD2), grub_cpu_to_le16 (0x11B2), \
++ { 0x99, 0xA6, 0x08, 0x00, 0x20, 0x73, 0x66, 0x31 } \
++ }
++
++
+ struct grub_gpt_header
+ {
+ grub_uint8_t magic[8];
diff --git a/sysutils/grub2/files/patch-util-getroot.c b/sysutils/grub2/files/patch-util-getroot.c
deleted file mode 100644
index ebf767912531..000000000000
--- a/sysutils/grub2/files/patch-util-getroot.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- util/getroot.c.orig 2010-06-11 10:37:54.000000000 +0400
-+++ util/getroot.c 2010-06-11 10:38:31.000000000 +0400
-@@ -454,7 +454,7 @@
- #else
-
- /* This might be truly slow, but is there any better way? */
-- os_dev = find_root_device ("/dev", st.st_dev);
-+ os_dev = find_root_device ("/dev", st.st_rdev);
- #endif
- #endif /* !__GNU__ */
-
diff --git a/sysutils/grub2/files/patch-util-i386-pc-grub-setup.c b/sysutils/grub2/files/patch-util-i386-pc-grub-setup.c
new file mode 100644
index 000000000000..e29a828fecc4
--- /dev/null
+++ b/sysutils/grub2/files/patch-util-i386-pc-grub-setup.c
@@ -0,0 +1,23 @@
+--- util/i386/pc/grub-setup.c.orig 2010-03-06 12:51:37.000000000 -0800
++++ util/i386/pc/grub-setup.c 2010-10-10 02:56:55.000000000 -0700
+@@ -38,7 +38,8 @@
+ #include <grub/util/getroot.h>
+
+ static const grub_gpt_part_type_t grub_gpt_partition_type_bios_boot = GRUB_GPT_PARTITION_TYPE_BIOS_BOOT;
+-
++static const grub_gpt_part_type_t grub_gpt_partition_type_freebsd_boot = GRUB_GPT_PARTITION_TYPE_FREEBSD_BOOT;
++static const grub_gpt_part_type_t grub_gpt_partition_type_solaris_boot = GRUB_GPT_PARTITION_TYPE_SOLARIS_BOOT;
+ #include <grub_setup_init.h>
+
+ #include <stdio.h>
+@@ -138,7 +139,9 @@
+ struct grub_gpt_partentry *gptdata = p->data;
+
+ /* If there's an embed region, it is in a dedicated partition. */
+- if (! memcmp (&gptdata->type, &grub_gpt_partition_type_bios_boot, 16))
++ if (! memcmp (&gptdata->type, &grub_gpt_partition_type_bios_boot, 16) ||
++ ! memcmp (&gptdata->type, &grub_gpt_partition_type_freebsd_boot, 16) ||
++ ! memcmp (&gptdata->type, &grub_gpt_partition_type_solaris_boot, 16))
+ {
+ embed_region.start = p->start;
+ embed_region.end = p->start + p->len;