Module Name: src
Committed By: riz
Date: Thu Jul 5 18:16:15 UTC 2012
Modified Files:
src/distrib/vax/miniroot [netbsd-6]: Makefile.inc
src/sys/arch/vax/include [netbsd-6]: disklabel.h types.h
src/sys/sys [netbsd-6]: bootblock.h
Log Message:
Pull up following revision(s) (requested by abs in ticket #403):
sys/arch/vax/include/disklabel.h: revision 1.6
sys/sys/bootblock.h: revision 1.54
sys/arch/vax/include/types.h: revision 1.46
distrib/vax/miniroot/Makefile.inc: revision 1.21
- Increase MAXPARTITIONS for vax from 8 to 16, using the standard NetBSD
mechanism to ensure all existing /dev nodes continue to work
- Adjust boot block layout to fit additional partitions
- Adjust number of inodes on install media
To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.20.8.1 src/distrib/vax/miniroot/Makefile.inc
cvs rdiff -u -r1.5 -r1.5.8.1 src/sys/arch/vax/include/disklabel.h
cvs rdiff -u -r1.44 -r1.44.2.1 src/sys/arch/vax/include/types.h
cvs rdiff -u -r1.52 -r1.52.14.1 src/sys/sys/bootblock.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/distrib/vax/miniroot/Makefile.inc
diff -u src/distrib/vax/miniroot/Makefile.inc:1.20 src/distrib/vax/miniroot/Makefile.inc:1.20.8.1
--- src/distrib/vax/miniroot/Makefile.inc:1.20 Thu Feb 11 09:06:51 2010
+++ src/distrib/vax/miniroot/Makefile.inc Thu Jul 5 18:16:15 2012
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile.inc,v 1.20 2010/02/11 09:06:51 roy Exp $
+# $NetBSD: Makefile.inc,v 1.20.8.1 2012/07/05 18:16:15 riz Exp $
IMAGESIZE= 7m
-MAKEFS_FLAGS= -o density=4k
+MAKEFS_FLAGS= -o density=3k
IMAGEENDIAN= le
MAKEDEVTARGETS= all
LISTS+= ${DISTRIBDIR}/common/list.sysinst
Index: src/sys/arch/vax/include/disklabel.h
diff -u src/sys/arch/vax/include/disklabel.h:1.5 src/sys/arch/vax/include/disklabel.h:1.5.8.1
--- src/sys/arch/vax/include/disklabel.h:1.5 Tue Aug 30 12:39:59 2011
+++ src/sys/arch/vax/include/disklabel.h Thu Jul 5 18:16:14 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: disklabel.h,v 1.5 2011/08/30 12:39:59 bouyer Exp $ */
+/* $NetBSD: disklabel.h,v 1.5.8.1 2012/07/05 18:16:14 riz Exp $ */
/*
* Copyright (c) 1994 Christopher G. Demetriou
@@ -33,11 +33,25 @@
#ifndef _MACHINE_DISKLABEL_H_
#define _MACHINE_DISKLABEL_H_
-#define LABELUSESMBR 0 /* no MBR partitionning */
-#define LABELSECTOR 0 /* sector containing label */
-#define LABELOFFSET 64 /* offset of label in sector */
-#define MAXPARTITIONS 8 /* number of partitions */
-#define RAW_PART 2 /* raw partition: xx?c */
+#define LABELUSESMBR 0 /* no MBR partitionning */
+#define LABELSECTOR 0 /* sector containing label */
+#define LABELOFFSET 64 /* offset of label in sector */
+#define MAXPARTITIONS 16 /* number of partitions */
+#define OLDMAXPARTITIONS 8 /* number of partitions before nb-6 */
+#define RAW_PART 2 /* raw partition: xx?c */
+
+/*
+ * We use the highest bit of the minor number for the partition number.
+ * This maintains backward compatibility with device nodes created before
+ * MAXPARTITIONS was increased.
+ */
+#define __VAX_MAXDISKS ((1 << 20) / MAXPARTITIONS)
+#define DISKUNIT(dev) ((minor(dev) / OLDMAXPARTITIONS) % __VAX_MAXDISKS)
+#define DISKPART(dev) ((minor(dev) % OLDMAXPARTITIONS) + \
+ ((minor(dev) / (__VAX_MAXDISKS * OLDMAXPARTITIONS)) * OLDMAXPARTITIONS))
+#define DISKMINOR(unit, part) \
+ (((unit) * OLDMAXPARTITIONS) + ((part) % OLDMAXPARTITIONS) + \
+ ((part) / OLDMAXPARTITIONS) * (__VAX_MAXDISKS * OLDMAXPARTITIONS))
/* Just a dummy */
#ifndef _LOCORE
Index: src/sys/arch/vax/include/types.h
diff -u src/sys/arch/vax/include/types.h:1.44 src/sys/arch/vax/include/types.h:1.44.2.1
--- src/sys/arch/vax/include/types.h:1.44 Tue Jan 17 20:34:57 2012
+++ src/sys/arch/vax/include/types.h Thu Jul 5 18:16:14 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.44 2012/01/17 20:34:57 joerg Exp $ */
+/* $NetBSD: types.h,v 1.44.2.1 2012/07/05 18:16:14 riz Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -78,6 +78,7 @@ typedef volatile char __cpu_simple_lock_
#define __HAVE_CPU_DATA_FIRST
#define __HAVE_MM_MD_READWRITE
#define __HAVE_MM_MD_DIRECT_MAPPED_PHYS
+#define __HAVE_OLD_DISKLABEL
#define __HAVE___LWP_GETPRIVATE_FAST
#define __HAVE_NO___THREAD
Index: src/sys/sys/bootblock.h
diff -u src/sys/sys/bootblock.h:1.52 src/sys/sys/bootblock.h:1.52.14.1
--- src/sys/sys/bootblock.h:1.52 Thu Jan 6 01:08:48 2011
+++ src/sys/sys/bootblock.h Thu Jul 5 18:16:15 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: bootblock.h,v 1.52 2011/01/06 01:08:48 jakllsch Exp $ */
+/* $NetBSD: bootblock.h,v 1.52.14.1 2012/07/05 18:16:15 riz Exp $ */
/*-
* Copyright (c) 2002-2004 The NetBSD Foundation, Inc.
@@ -1389,7 +1389,8 @@ struct vax_boot_block {
uint8_t bb_mbone; /* must be one */
uint16_t bb_lbn_hi; /* lbn (hi word) of bootstrap */
uint16_t bb_lbn_low; /* lbn (low word) of bootstrap */
- uint8_t pad1[332];
+ uint8_t pad1[460];
+ /* disklabel offset is 64 from base, or 56 from start of pad1 */
/* The rest of these fields are identification area and describe
* the secondary block for uVAX VMB.
@@ -1411,7 +1412,7 @@ struct vax_boot_block {
/* The rest is unused.
*/
- uint8_t pad2[148];
+ uint8_t pad2[20];
} __packed;
#define VAX_BOOT_MAGIC1 0x18 /* size of BB info? */