diff options
author | sem <sem@FreeBSD.org> | 2010-10-12 23:48:46 +0800 |
---|---|---|
committer | sem <sem@FreeBSD.org> | 2010-10-12 23:48:46 +0800 |
commit | 82067ecfe4b4b15659ba2ad94604d92c3c8181a6 (patch) | |
tree | b522fda47162b93661fe333ea1bcc2cedea147ca /sysutils/grub2 | |
parent | 8cef6415121d4a2d0726c91914bd86ffd6e6cc8e (diff) | |
download | freebsd-ports-gnome-82067ecfe4b4b15659ba2ad94604d92c3c8181a6.tar.gz freebsd-ports-gnome-82067ecfe4b4b15659ba2ad94604d92c3c8181a6.tar.zst freebsd-ports-gnome-82067ecfe4b4b15659ba2ad94604d92c3c8181a6.zip |
- 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>
Diffstat (limited to 'sysutils/grub2')
-rw-r--r-- | sysutils/grub2/Makefile | 2 | ||||
-rw-r--r-- | sysutils/grub2/files/patch-include-grub-gpt_partition.h | 20 | ||||
-rw-r--r-- | sysutils/grub2/files/patch-util-getroot.c | 11 | ||||
-rw-r--r-- | sysutils/grub2/files/patch-util-i386-pc-grub-setup.c | 23 |
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; |