Gentoo Archives: gentoo-commits

From: Yuta SATOH <nigoro.gentoo@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gentoo-bsd:master commit in: sys-boot/grub/files/, sys-boot/grub/
Date: Sat, 01 Dec 2012 14:24:29
Message-Id: 1354371828.6d3c2fc9b8cf667080181bb0ec0feac8792bf5c9.yuta_satoh@gentoo
1 commit: 6d3c2fc9b8cf667080181bb0ec0feac8792bf5c9
2 Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
3 AuthorDate: Sat Dec 1 14:23:48 2012 +0000
4 Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
5 CommitDate: Sat Dec 1 14:23:48 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=6d3c2fc9
7
8 grub-2.00-r1 -- updated files/grub-2.00-fbsd.patch, drop freebsd-boot partition support
9
10 ---
11 sys-boot/grub/Manifest | 2 +-
12 sys-boot/grub/files/grub-2.00-fbsd.patch | 57 ++----------------------------
13 2 files changed, 4 insertions(+), 55 deletions(-)
14
15 diff --git a/sys-boot/grub/Manifest b/sys-boot/grub/Manifest
16 index d3bd25e..c6002b9 100644
17 --- a/sys-boot/grub/Manifest
18 +++ b/sys-boot/grub/Manifest
19 @@ -1,5 +1,5 @@
20 AUX grub-2.00-config-quoting.patch 3934 SHA256 4f1bc29429a864731edf4a5a5fa53004dc67bf1225bd8fa81cb58b197df12510 SHA512 bed0fb1a8589c1979cf7162599e041c8b8eaa66bff3e8fa4a8b9929c8e8191ec1f85c129bcf2f7c9dcc75d5ea50330067ffd519835308460f7a194aab40bfc13 WHIRLPOOL 979234f1d3e1282d1e6d3ac4aa1e01c86082a3883abd452f0f1886181a6d46ccccd8e6b59628acfa8dc375ad9db1b35037d9483f87df2893a7398402dc7cb51a
21 -AUX grub-2.00-fbsd.patch 5386 SHA256 6c0379c86013a1dac65cdd7654d697d427e1e16714af457db329cc087c65e0a9 SHA512 27eb0c3963f7ea81d2f5f58b2d7f9814faf32e3e20a3ebf93dfd1421bf06a58da15ef472262b6ee28643224e9a71b2729083ca54a1e7a7aa7001ff46afad4283 WHIRLPOOL 0f475324d309b26e0195a3aec75f8f59a6c857bfa6866a3732536325736f5c113bd89c5e7656e09216c747f84eac68a84243052dec6014992d2b951f0b27733b
22 +AUX grub-2.00-fbsd.patch 3197 SHA256 2f857d729b1e82e607c99a22197889ed62f315192fc3cb120c865843fccece07 SHA512 cb7487fc9d0c3e44cb58518e4cc4a55316e1666c0eae637f9171905d8452d20ed784cee2f3e0a9647d2c778e580e8fc24b9de0a62ee6a22cce711dbfa452d730 WHIRLPOOL db28faf67ec8b915fcc11c9b4d94e7d07b33776478421146c7a2b7021893edde05fb22ae969aee9a6568254de0afb880d57db8cc6d9263862629941c45e69d66
23 AUX grub-2.00-fbsd91-boot.patch 1448 SHA256 efb04cc814c8afb91cef8b1eb5916571eda6095c813244ef5c343b90f8c734c7 SHA512 3c05067ba62897b065ec477a1154fe0eeb4ef59a9058b032f11ca2111c73f91b68166a9f77cc4ae3dc4dd9eb3d1ce1639465f354fc46d3dce12b5a1d4a5aa493 WHIRLPOOL 075fd010a30630463ec96368e527fa39928cbe4a16b325190ad9d2279d7cb5168dda8f81b0b03601b4923a910faed3e2cd40952d065068f07cccd742107fae4b
24 AUX grub-2.00-hardcoded-awk.patch 599 SHA256 438c7357a632c7c9efe406b1d7cbb2524694e68c5783b401d3dd17ae0aba6816 SHA512 f47b742b9fa4c57e36e767ace6e14318678cc429ae88cd275e07d95abbc8d3d01d831058da2f6f91662bfdfc4396aed5417198245534488359a43023459d1a1f WHIRLPOOL 17be198f854466ff8a50c5b7d46eaf7883a4ce8cbe3a89cbc0e62d75ae71e94ce863341c0650b113bbee4415220da38896da73177ab59d2b53d3bde7ec9809ba
25 AUX grub-2.00-no-gets.patch 805 SHA256 054d85619905055a0ea0e5f9d27eb8c8596959598ac9a5bae7e82543c19adeaf SHA512 8b89fa40efe232474e7bb03d12542030d40fea1fe0839a9493f6704fbe6de77516b5976841bf652c7236104513f427750efc668248c71ba0ea7f676557e8c9e3 WHIRLPOOL 796a7bc4583829abd1a552f7d16d6cc4f2999707af1ae0b5231fa53e87ce22a265a35a3d0f486fcac2e74dbed5fd54e3a572186cc2ba1a849433adc021a0a65b
26
27 diff --git a/sys-boot/grub/files/grub-2.00-fbsd.patch b/sys-boot/grub/files/grub-2.00-fbsd.patch
28 index 4d7716d..3b6ba0d 100644
29 --- a/sys-boot/grub/files/grub-2.00-fbsd.patch
30 +++ b/sys-boot/grub/files/grub-2.00-fbsd.patch
31 @@ -1,60 +1,9 @@
32 -* Added support freebsd-boot partition on GPT.
33 * FreeBSD's sed doesn't support '\t', change to tab.
34 * grub2-probe is used instead of grub-probe on Gentoo.
35
36 Taken from FreeBSD ports
37 -patch-include-grub-gpt_partition.h
38 -patch-util-i386-pc-grub-setup.c
39 patch-util-grub.d-10_kfreebsd.in
40
41 -diff -Nur grub-2.00.orig/grub-core/partmap/gpt.c grub-2.00/grub-core/partmap/gpt.c
42 ---- grub-2.00.orig/grub-core/partmap/gpt.c 2012-05-22 06:12:44.000000000 +0900
43 -+++ grub-2.00/grub-core/partmap/gpt.c 2012-11-06 23:23:27.000000000 +0900
44 -@@ -37,6 +37,8 @@
45 -
46 - #ifdef GRUB_UTIL
47 - static const grub_gpt_part_type_t grub_gpt_partition_type_bios_boot = GRUB_GPT_PARTITION_TYPE_BIOS_BOOT;
48 -+static const grub_gpt_part_type_t grub_gpt_partition_type_freebsd_boot = GRUB_GPT_PARTITION_TYPE_FREEBSD_BOOT;
49 -+static const grub_gpt_part_type_t grub_gpt_partition_type_solaris_boot = GRUB_GPT_PARTITION_TYPE_SOLARIS_BOOT;
50 - #endif
51 -
52 - /* 512 << 7 = 65536 byte sectors. */
53 -@@ -158,7 +160,9 @@
54 - disk->partition = p2;
55 -
56 - /* If there's an embed region, it is in a dedicated partition. */
57 -- if (! grub_memcmp (&gptdata.type, &grub_gpt_partition_type_bios_boot, 16))
58 -+ if (! grub_memcmp (&gptdata.type, &grub_gpt_partition_type_bios_boot, 16) ||
59 -+ ! grub_memcmp (&gptdata.type, &grub_gpt_partition_type_freebsd_boot, 16) ||
60 -+ ! grub_memcmp (&gptdata.type, &grub_gpt_partition_type_solaris_boot, 16))
61 - {
62 - start = p->start;
63 - len = p->len;
64 -diff -Nur grub-2.00.orig/include/grub/gpt_partition.h grub-2.00/include/grub/gpt_partition.h
65 ---- grub-2.00.orig/include/grub/gpt_partition.h 2012-01-28 22:51:46.000000000 +0900
66 -+++ grub-2.00/include/grub/gpt_partition.h 2012-11-06 23:18:11.000000000 +0900
67 -@@ -50,6 +50,21 @@
68 - { 0x85, 0xD2, 0xE1, 0xE9, 0x04, 0x34, 0xCF, 0xB3 } \
69 - }
70 -
71 -+#define GRUB_GPT_PARTITION_TYPE_FREEBSD_BOOT \
72 -+ { grub_cpu_to_le32_compile_time (0x83BD6B9D), \
73 -+ grub_cpu_to_le16_compile_time (0x7F41), \
74 -+ grub_cpu_to_le16_compile_time (0x11DC), \
75 -+ { 0xBE, 0x0B, 0x00, 0x15, 0x60, 0xB8, 0x4F, 0x0F } \
76 -+ }
77 -+
78 -+#define GRUB_GPT_PARTITION_TYPE_SOLARIS_BOOT \
79 -+ { grub_cpu_to_le32_compile_time (0x6A82CB45), \
80 -+ grub_cpu_to_le16_compile_time (0x1DD2), \
81 -+ grub_cpu_to_le16_compile_time (0x11B2), \
82 -+ { 0x99, 0xA6, 0x08, 0x00, 0x20, 0x73, 0x66, 0x31 } \
83 -+ }
84 -+
85 -+
86 - struct grub_gpt_header
87 - {
88 - grub_uint8_t magic[8];
89 diff -Nur grub-2.00.orig/util/grub.d/10_kfreebsd.in grub-2.00/util/grub.d/10_kfreebsd.in
90 --- grub-2.00.orig/util/grub.d/10_kfreebsd.in 2012-03-05 06:02:30.000000000 +0900
91 +++ grub-2.00/util/grub.d/10_kfreebsd.in 2012-11-07 20:01:10.000000000 +0900
92 @@ -63,7 +12,7 @@ diff -Nur grub-2.00.orig/util/grub.d/10_kfreebsd.in grub-2.00/util/grub.d/10_kfr
93
94 if [ -z "${prepare_module_dir_cache}" ]; then
95 - prepare_module_dir_cache="$(prepare_grub_to_access_device $(grub-probe -t device "${module_dir}") | sed -e "s/^/\t/")"
96 -+ prepare_module_dir_cache="$(prepare_grub_to_access_device $(grub2-probe -t device "${module_dir}") | sed -e "s/^/ /")"
97 ++ prepare_module_dir_cache="$(prepare_grub_to_access_device $(${grub_probe} -t device "${module_dir}") | sed -e "s/^/ /")"
98 fi
99
100 printf '%s\n' "${prepare_module_dir_cache}"
101 @@ -85,7 +34,7 @@ diff -Nur grub-2.00.orig/util/grub.d/10_kfreebsd.in grub-2.00/util/grub.d/10_kfr
102 load_kfreebsd_module acpi true
103
104 - for abstraction in dummy $(grub-probe -t abstraction --device ${GRUB_DEVICE}) ; do
105 -+ for abstraction in dummy $(grub2-probe -t abstraction --device ${GRUB_DEVICE}) ; do
106 ++ for abstraction in dummy $(${grub_probe} -t abstraction --device ${GRUB_DEVICE}) ; do
107 case $abstraction in
108 lvm) load_kfreebsd_module geom_linux_lvm false ;;
109 esac
110 @@ -114,7 +63,7 @@ diff -Nur grub-2.00.orig/util/grub.d/10_kfreebsd.in grub-2.00/util/grub.d/10_kfr
111 zfs)
112 # zpool name
113 - kfreebsd_device=$(grub-probe -t fs_label --device ${GRUB_DEVICE})
114 -+ kfreebsd_device=$(grub2-probe -t fs_label --device ${GRUB_DEVICE})
115 ++ kfreebsd_device=$(${grub_probe} -t fs_label --device ${GRUB_DEVICE})
116 # filesystem name (empty string for the main filesystem)
117 kfreebsd_device="${kfreebsd_device}$(${grub_mkrelpath} / | sed -e "s,/*@$,,")"
118 ;;