Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/sparc64/xminiroot Ensure a disklabel is present sinc...
details: https://anonhg.NetBSD.org/src/rev/eb03bc89b66a
branches: trunk
changeset: 329513:eb03bc89b66a
user: palle <palle%NetBSD.org@localhost>
date: Tue May 27 19:04:29 2014 +0000
description:
Ensure a disklabel is present since sun4v OpenBoot requires a valid disklabel in the disk file image. With this change the miniroot.fs can be used as a virtual disk when using sun4v LDOMs. OK martin@
diffstat:
distrib/sparc64/xminiroot/Makefile | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diffs (33 lines):
diff -r 2916e0f269e7 -r eb03bc89b66a distrib/sparc64/xminiroot/Makefile
--- a/distrib/sparc64/xminiroot/Makefile Tue May 27 17:12:22 2014 +0000
+++ b/distrib/sparc64/xminiroot/Makefile Tue May 27 19:04:29 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.30 2014/01/27 08:18:07 apb Exp $
+# $NetBSD: Makefile,v 1.31 2014/05/27 19:04:29 palle Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -6,10 +6,19 @@
.include <bsd.kernobj.mk>
.include "${.CURDIR}/../instfs/Makefile.instfs"
-IMAGE= miniroot.fs
-IMAGESIZE= 12m
-IMAGEPOSTBUILD= ${TOOL_INSTALLBOOT} -v -m ${MACHINE} ${IMAGE} \
- ${DESTDIR}/usr/mdec/bootblk
+IMAGE= miniroot.fs
+NUMCYLS= 12 # size of image in MB, tune this if we need more space
+SECSPERCYL= 2048
+CYLSIZE= $$(( ${SECSPERCYL} * 512 ))
+IMAGESIZE= $$(( ${NUMCYLS} * ${CYLSIZE} ))
+IMAGEPOSTBUILD= \
+ ${TOOL_INSTALLBOOT} -v -m ${MACHINE} ${IMAGE} \
+ ${DESTDIR}/usr/mdec/bootblk && \
+ echo "Creating disklabel" && \
+ printf 'V nsect %d\nV nhead 1\nV rpm 7200\nV pcyl %d\nV ncyl %d\na 0 %d/0/0\nc 0 %d/0/0\nd 0 %d/0/0\nW\nL\nP\n' \
+ ${SECSPERCYL} ${NUMCYLS} ${NUMCYLS} ${NUMCYLS} ${NUMCYLS} ${NUMCYLS} | \
+ ${TOOL_SUNLABEL} -nq ${IMAGE}
+
IMAGE_RELEASEDIR= installation/miniroot
CRUNCHBINDIR!= cd ${INSTFSDIR} && ${PRINTOBJDIR}
Home |
Main Index |
Thread Index |
Old Index