From 124d37cc5d430762dfb94d923a9d9d065754c5f2 Mon Sep 17 00:00:00 2001 From: graichen Date: Sat, 3 May 1997 00:35:22 +0000 Subject: [PATCH] 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 --- distrib/simpleroot/Makefile | 67 +++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 distrib/simpleroot/Makefile 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 +.include -- 2.20.1