- Add couple patches to allow grob to be installed on FreeBSD GPT partitions.
- Remove an ugly patch. - Pass a maintainership to submitter. Submitted by: Rick <rick_at_lgarchitecture.com>
This commit is contained in:
parent
e679ebcac7
commit
69c580fd80
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=262901
@ -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*
|
||||
|
20
sysutils/grub2/files/patch-include-grub-gpt_partition.h
Normal file
20
sysutils/grub2/files/patch-include-grub-gpt_partition.h
Normal file
@ -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];
|
@ -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__ */
|
||||
|
23
sysutils/grub2/files/patch-util-i386-pc-grub-setup.c
Normal file
23
sysutils/grub2/files/patch-util-i386-pc-grub-setup.c
Normal file
@ -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;
|
Loading…
Reference in New Issue
Block a user