summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Graichen <graichen@cvs.openbsd.org>1997-05-03 00:35:23 +0000
committerThomas Graichen <graichen@cvs.openbsd.org>1997-05-03 00:35:23 +0000
commit60ecc6cc0fc73f7f0384077e9a2372e530b927f8 (patch)
treefe784840915c11c5849877fa38512de9e340a31b
parent8acd7ebdc5484f6bf3b564010100dcd0253d961d (diff)
simpleroot: rootfilesystem for installing the pmax and maybe the alpha
on those machines you can't boot off the swap partition and thus mini- root doesn't work - ramdisk doesn't work due to exec format problems ... so the installation will be simply dd'ing a complete rootfilesystem image onto the disk and install the rest from there - simpleroot is this complete rootfilesystem image - the name simpleroot comes from niklas - thanks to him for the idea how to put it here into the distrib tree
-rw-r--r--distrib/simpleroot/Makefile67
1 files changed, 67 insertions, 0 deletions
diff --git a/distrib/simpleroot/Makefile b/distrib/simpleroot/Makefile
new file mode 100644
index 00000000000..6eb6cf96fc7
--- /dev/null
+++ b/distrib/simpleroot/Makefile
@@ -0,0 +1,67 @@
+# Revision is 2.1
+REV= 21
+
+ARCHDIR= ${.CURDIR}/../${MACHINE}/simpleroot
+
+.if exists(${ARCHDIR}/Makefile.inc)
+.include "${ARCHDIR}/Makefile.inc"
+.endif
+
+MOUNT_POINT?= /mnt
+VND?= vnd0
+VND_DEV= /dev/${VND}a
+VND_RDEV= /dev/r${VND}a
+DISKTYPE= simpleroot
+PID!= echo $$$$
+REALIMAGE!= echo /var/tmp/image.${PID}
+IMAGE?= /var/tmp/simpleroot${REV}.fs
+NEWFSOPTS?=
+
+LIST= ${ARCHDIR}/list
+
+.ifndef DESTDIR
+all:
+ @echo setenv DESTDIR before makeing a miniroot!
+ @false
+.else
+
+all:
+ dd if=/dev/zero of=${REALIMAGE} count=${IMAGESIZE}
+ vnconfig -v -c ${VND} ${REALIMAGE}
+ disklabel -w -r ${VND} ${DISKTYPE}
+.ifdef BOOT_DISKLABEL
+ disklabel -B ${BOOT_DISKLABEL} ${VND} ${DISKTYPE}
+.endif
+ newfs ${NEWFSOPTS} ${VND_RDEV} ${DISKTYPE}
+ mount ${VND_DEV} ${MOUNT_POINT}
+.ifdef BOOT_INSTALLBOOT
+ /usr/mdec/installboot -v ${MOUNT_POINT} ${BOOT_INSTALLBOOT} ${VND}
+.endif
+ cd ${DESTDIR} && tar cf - `cat ${LIST}` | ( cd ${MOUNT_POINT}; \
+ tar xpf - ) && \
+ ( cd ${MOUNT_POINT} && \
+ tar cf - .??* * | ${GZIP} ${GZIPFLAGS} \
+ > /var/tmp/simpleroot${REV}.tar${GZIPEXT} )
+ @echo ""
+ @df -i ${MOUNT_POINT}
+ @echo ""
+ umount ${MOUNT_POINT}
+ vnconfig -u ${VND_DEV}
+ cat /*bin/* > /dev/null
+ cp ${REALIMAGE} ${IMAGE}
+.if (${GZIP} == "gzip")
+ ${GZIP} ${IMAGE}
+.endif
+ rm ${REALIMAGE}
+
+unconfig:
+ -umount -f ${MOUNT_POINT}
+ -vnconfig -u ${VND_DEV}
+ -/bin/rm -f ${IMAGE}
+
+clean cleandir:
+ /bin/rm -f core ${IMAGE}
+
+.endif # DESTDIR check
+.include <bsd.obj.mk>
+.include <bsd.subdir.mk>