Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/sparc64/xminiroot Make the size of the miniroot more...
details: https://anonhg.NetBSD.org/src/rev/8bfe2ea0142f
branches: trunk
changeset: 513011:8bfe2ea0142f
user: eeh <eeh%NetBSD.org@localhost>
date: Sat Jul 21 06:01:03 2001 +0000
description:
Make the size of the miniroot more easily tuneable and install it in a kernel.
diffstat:
distrib/sparc64/xminiroot/Makefile | 34 +++++++++++++++++++++++++---------
distrib/sparc64/xminiroot/disktab | 9 +++------
distrib/sparc64/xminiroot/list.m4 | 4 ++--
3 files changed, 30 insertions(+), 17 deletions(-)
diffs (114 lines):
diff -r 009d4b3580e4 -r 8bfe2ea0142f distrib/sparc64/xminiroot/Makefile
--- a/distrib/sparc64/xminiroot/Makefile Sat Jul 21 05:58:28 2001 +0000
+++ b/distrib/sparc64/xminiroot/Makefile Sat Jul 21 06:01:03 2001 +0000
@@ -1,10 +1,17 @@
-# $NetBSD: Makefile,v 1.2 2001/01/07 09:33:17 mrg Exp $
+# $NetBSD: Makefile,v 1.3 2001/07/21 06:01:03 eeh Exp $
TOP= ${.CURDIR}/..
MINIROOT= ${TOP}/../miniroot
+
+.include "${TOP}/Makefile.inc"
+
+.include <bsd.own.mk> # So we use /etc/mk.conf.
+.include <bsd.kernobj.mk>
+
HACKSRC= ${TOP}/../utils/libhack
SRCROOT= ${TOP}/../..
WARNS=1
+KERN?= ${KERNOBJDIR}/INSTALL/netbsd
.if ${MACHINE_ARCH} == "i386"
RAW_PART= d
@@ -28,9 +35,6 @@
CBIN= ramdiskbin
-.if ${MACHINE_ARCH} == "sparc64"
-CSIZE?= 10240
-.endif
MOUNT_POINT?= /mnt
# DEV/RDEV file system device, CDEV/RDEV vnconfig device
@@ -39,8 +43,8 @@
VND_RDEV= /dev/r${VND}c
VND_CDEV= /dev/${VND}${RAW_PART}
VND_CRDEV= /dev/r${VND}${RAW_PART}
+CSIZE?= 14000
IMAGE?= miniroot.fs
-CSIZE?= 3312
MDEC= ${DESTDIR}/usr/mdec
LISTS= list
@@ -50,11 +54,21 @@
CRUNCHGEN?= crunchgen
DISKTYPE?= miniroot
-all: ${CBIN} ${AUXDEPENDS} ${MTREE} ${LISTS} dot.profile
+all: netbsd.INSTALL ${IMAGE}
+
+netbsd.INSTALL: ${KERN} ${IMAGE}
+ cp ${KERN} netbsd.tmp
+ mdsetimage -v netbsd.tmp ${IMAGE}
+ strip netbsd.tmp
+ mv netbsd.tmp ${.TARGET}
+
+
+${IMAGE}: ${CBIN} ${AUXDEPENDS} ${MTREE} ${LISTS} dot.profile
dd if=/dev/zero of=${IMAGE} count=${CSIZE}
vnconfig -v -c ${VND_CDEV} ${IMAGE}
- disklabel -f ${.CURDIR}/disktab -rw ${VND_CDEV} ${DISKTYPE}
- newfs -B ${FS_END} -m 0 -o space -i 5120 -c 80 ${VND_RDEV} ${DISKTYPE}
+ -disklabel -f ${.CURDIR}/disktab -rw ${VND_CDEV} ${DISKTYPE}
+ #newfs -B ${FS_END} -m 0 -o space -i 5120 -c 80 ${VND_RDEV} ${DISKTYPE}
+ newfs -B ${FS_END} -m 0 -o space ${VND_RDEV} ${DISKTYPE}
mount -o softdep ${VND_DEV} ${MOUNT_POINT}
mtree -def ${.CURDIR}/${MTREE} -p ${MOUNT_POINT}/ -u
TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
@@ -64,8 +78,10 @@
@df -i ${MOUNT_POINT}
@echo ""
@echo "installing new bootblocks"
- ${MDEC}/binstall -m ${DESTDIR}/usr/mdec -u -v ffs ${MOUNT_POINT}
+ #${MDEC}/binstall -m ${DESTDIR}/usr/mdec -u -v ffs ${MOUNT_POINT}
umount ${MOUNT_POINT}
+ dd if=${MDEC}/bootblk of=${VND_CDEV} bs=512 count=15 conv=notrunc seek=1
+ #${MDEC}/installboot -v ${MDEC}/bootblk ${VND_CDEV}
vnconfig -u ${VND_CDEV}
unconfig:
diff -r 009d4b3580e4 -r 8bfe2ea0142f distrib/sparc64/xminiroot/disktab
--- a/distrib/sparc64/xminiroot/disktab Sat Jul 21 05:58:28 2001 +0000
+++ b/distrib/sparc64/xminiroot/disktab Sat Jul 21 06:01:03 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: disktab,v 1.1 2001/01/07 09:30:19 mrg Exp $
+# $NetBSD: disktab,v 1.2 2001/07/21 06:01:03 eeh Exp $
#
# Disk geometry and partition layout tables.
# Key:
@@ -30,8 +30,5 @@
# (5 cylinders needed for maintenance + replacement sectors)
#
-# pseudo-geometry taken from rd7945
-miniroot:\
- :ty=winchester:ns#16:nt#7:nc#968:\
- :pa#10240:ba#8192:fa#1024:\
- :pc#10240:bc#8192:fc#1024:
+# Let disklabel figure this out.
+miniroot:ty=simulated:ns#1:nt#1:
diff -r 009d4b3580e4 -r 8bfe2ea0142f distrib/sparc64/xminiroot/list.m4
--- a/distrib/sparc64/xminiroot/list.m4 Sat Jul 21 05:58:28 2001 +0000
+++ b/distrib/sparc64/xminiroot/list.m4 Sat Jul 21 06:01:03 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: list.m4,v 1.1 2001/01/07 09:30:20 mrg Exp $
+# $NetBSD: list.m4,v 1.2 2001/07/21 06:01:04 eeh Exp $
# copy the crunched binary, link to it, and kill it
COPY ${OBJDIR}/ramdiskbin ramdiskbin
@@ -130,4 +130,4 @@
#the lists of obsolete files used by sysinst
SPECIAL sh ${CURDIR}/../../sets/makeobsolete -b -s ${CURDIR}/../../sets -t ./dist
-ifelse(MACHINE,sparc64, SPECIAL gzip -9 < ${SRCDIR}/sys/arch/sparc64/compile/GENERIC/netbsd > netbsd)
+ifelse(MACHINE,sparc64, SPECIAL gzip -9 < ${KERNOBJDIR}/GENERIC/netbsd > netbsd)
Home |
Main Index |
Thread Index |
Old Index