pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/grub stage2/pc_slice.h: add the missing diskl...
details: https://anonhg.NetBSD.org/pkgsrc/rev/06d44bc6ea01
branches: trunk
changeset: 520251:06d44bc6ea01
user: bad <bad%pkgsrc.org@localhost>
date: Tue Oct 17 21:55:33 2006 +0000
description:
stage2/pc_slice.h: add the missing disklabel FS_TYPE #defines and RF_PROTECTED_SECTORS.
stage2/disk_io.c: adjust the partition start and size by RF_PROTECTED sectors for partitions of type FS_RAID.
stage2/fsys_ffs.c: accept partitions of type FS_RAID as candidates for FFS, too.
stage2/fsys_ufs2.c: accept partitions of type FS_RAID as candidates for FFSv2, too.
This allows grub to directly boot from NetBSD RAID1 partitions the same way
as with the native bootloader.
Bump PKGREVISION.
diffstat:
sysutils/grub/Makefile | 4 ++--
sysutils/grub/distinfo | 6 +++++-
sysutils/grub/patches/patch-aa | 18 ++++++++++++++++++
sysutils/grub/patches/patch-ab | 20 ++++++++++++++++++++
sysutils/grub/patches/patch-af | 14 ++++++++++++++
sysutils/grub/patches/patch-ag | 14 ++++++++++++++
6 files changed, 73 insertions(+), 3 deletions(-)
diffs (115 lines):
diff -r 42031426fad7 -r 06d44bc6ea01 sysutils/grub/Makefile
--- a/sysutils/grub/Makefile Tue Oct 17 21:45:54 2006 +0000
+++ b/sysutils/grub/Makefile Tue Oct 17 21:55:33 2006 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.44 2006/05/13 14:41:51 jmmv Exp $
+# $NetBSD: Makefile,v 1.45 2006/10/17 21:55:33 bad Exp $
#
DISTNAME= grub-0.97
-PKGREVISION= 5
+PKGREVISION= 6
CATEGORIES= sysutils
MASTER_SITES= ftp://alpha.gnu.org/gnu/grub/
diff -r 42031426fad7 -r 06d44bc6ea01 sysutils/grub/distinfo
--- a/sysutils/grub/distinfo Tue Oct 17 21:45:54 2006 +0000
+++ b/sysutils/grub/distinfo Tue Oct 17 21:55:33 2006 +0000
@@ -1,10 +1,14 @@
-$NetBSD: distinfo,v 1.19 2006/02/03 09:59:32 jmmv Exp $
+$NetBSD: distinfo,v 1.20 2006/10/17 21:55:33 bad Exp $
SHA1 (grub-0.97.tar.gz) = 2580626c4579bd99336d3af4482c346c95dac4fb
RMD160 (grub-0.97.tar.gz) = 7fb5674edf0c950bd38e94f85ff1e2909aa741f0
Size (grub-0.97.tar.gz) = 971783 bytes
+SHA1 (patch-aa) = 2fd8872e6e3d3912d41d3eb8dff9371320a53bf3
+SHA1 (patch-ab) = 945ee0385d82f4ea98e86acfa449bcbf2a214285
SHA1 (patch-ac) = dc7774a09ca88f6696e0680a7be39df56244eedc
SHA1 (patch-ad) = 613e915a015ad22c9bd5712d416e12b1b81fdb93
SHA1 (patch-ae) = 96d8283e90ceb3e887ba0ada05619858c52bc144
+SHA1 (patch-af) = 9447ead52940203c998afb67e38ae3d3d26097f8
+SHA1 (patch-ag) = 1dd709652d457ba03dda47b64d22cd9320f81e26
SHA1 (patch-ai) = 60088cf6786a364da37e19fbb5df4c6fd7641016
SHA1 (patch-aj) = bfbac23a7c250ed615dcfb4a988708c970b617d8
diff -r 42031426fad7 -r 06d44bc6ea01 sysutils/grub/patches/patch-aa
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/grub/patches/patch-aa Tue Oct 17 21:55:33 2006 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-aa,v 1.3 2006/10/17 21:55:33 bad Exp $
+
+--- stage2/pc_slice.h.orig 2003-07-09 13:45:53.000000000 +0200
++++ stage2/pc_slice.h 2006-09-18 00:36:35.000000000 +0200
+@@ -246,6 +246,13 @@
+ #define FS_HFS 15 /* Macintosh HFS */
+ #define FS_FILECORE 16 /* Acorn Filecore Filing System */
+ #define FS_EXT2FS 17 /* Linux Extended 2 file system */
++#define FS_NTFS 18 /* Windows/NT file system */
++#define FS_RAID 19 /* RAIDframe component */
++#define FS_CCD 20 /* concatenated disk component */
++#define FS_JFS2 21 /* IBM JFS2 */
++#define FS_APPLEUFS 22 /* Apple UFS */
++
++#define RF_PROTECTED_SECTORS 64 /* sectors reserved by RAIDframe */
+
+
+ #endif /* _PC_SLICE_H */
diff -r 42031426fad7 -r 06d44bc6ea01 sysutils/grub/patches/patch-ab
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/grub/patches/patch-ab Tue Oct 17 21:55:33 2006 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-ab,v 1.3 2006/10/17 21:55:33 bad Exp $
+
+--- stage2/disk_io.c.orig 2004-05-23 18:35:24.000000000 +0200
++++ stage2/disk_io.c 2006-09-18 01:12:19.000000000 +0200
+@@ -632,6 +632,15 @@
+ bsd_evil_hack = 4;
+ #endif /* ! STAGE1_5 */
+
++ if (BSD_PART_TYPE(buf, i) == FS_RAID)
++ {
++ /* found a RAID partition, restart inside that */
++ /* *offset += RF_PROTECTED_SECTORS; */
++ *start += RF_PROTECTED_SECTORS;
++ *len -= RF_PROTECTED_SECTORS;
++ /* *partition = (*partition & 0xFF00FF) | (0xFF << 8); */
++ /* return next_bsd_partition(); */
++ }
+ return 1;
+ }
+ }
diff -r 42031426fad7 -r 06d44bc6ea01 sysutils/grub/patches/patch-af
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/grub/patches/patch-af Tue Oct 17 21:55:33 2006 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-af,v 1.3 2006/10/17 21:55:33 bad Exp $
+
+--- stage2/fsys_ffs.c.orig 2003-07-09 13:45:52.000000000 +0200
++++ stage2/fsys_ffs.c 2006-09-20 00:38:40.000000000 +0200
+@@ -83,7 +83,8 @@
+ int retval = 1;
+
+ if ((((current_drive & 0x80) || (current_slice != 0))
+- && ! IS_PC_SLICE_TYPE_BSD_WITH_FS (current_slice, FS_BSDFFS))
++ && ! (IS_PC_SLICE_TYPE_BSD_WITH_FS (current_slice, FS_BSDFFS)
++ || IS_PC_SLICE_TYPE_BSD_WITH_FS(current_slice, FS_RAID)))
+ || part_length < (SBLOCK + (SBSIZE / DEV_BSIZE))
+ || !devread (SBLOCK, 0, SBSIZE, (char *) SUPERBLOCK)
+ || SUPERBLOCK->fs_magic != FS_MAGIC)
diff -r 42031426fad7 -r 06d44bc6ea01 sysutils/grub/patches/patch-ag
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/grub/patches/patch-ag Tue Oct 17 21:55:33 2006 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-ag,v 1.3 2006/10/17 21:55:33 bad Exp $
+
+--- stage2/fsys_ufs2.c.orig 2004-06-19 14:17:52.000000000 +0200
++++ stage2/fsys_ufs2.c
+@@ -88,7 +88,8 @@ ufs2_mount (void)
+ type = 0;
+
+ if (! (((current_drive & 0x80) || (current_slice != 0))
+- && ! IS_PC_SLICE_TYPE_BSD_WITH_FS (current_slice, FS_BSDFFS)))
++ && ! (IS_PC_SLICE_TYPE_BSD_WITH_FS (current_slice, FS_BSDFFS)
++ || IS_PC_SLICE_TYPE_BSD_WITH_FS (current_slice, FS_RAID))))
+ {
+ for (i = 0; sblock_try[i] != -1; ++i)
+ {
Home |
Main Index |
Thread Index |
Old Index