Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/alpha/floppy-GENERIC Convert from vnd and installboo...



details:   https://anonhg.NetBSD.org/src/rev/88f9a00d5d1e
branches:  trunk
changeset: 526474:88f9a00d5d1e
user:      lukem <lukem%NetBSD.org@localhost>
date:      Sat May 04 01:40:06 2002 +0000

description:
Convert from vnd and installboot.old to Makefile.tarfloppy and MI installboot.
Allow various parameters to be tweaked via external make(1) or
environment variables, to allow for easy creation of floppy sets
containing arbitrary kernels.

XXX: GENERIC still doesn't fit on a single floppy, so this won't build as-is
and is still not enabled by default.  (Per discussion with Ross & Jason.)

diffstat:

 distrib/alpha/floppy-GENERIC/Makefile |  93 ++++++++++++++--------------------
 1 files changed, 39 insertions(+), 54 deletions(-)

diffs (111 lines):

diff -r 3b6e4e3e6605 -r 88f9a00d5d1e distrib/alpha/floppy-GENERIC/Makefile
--- a/distrib/alpha/floppy-GENERIC/Makefile     Sat May 04 01:34:36 2002 +0000
+++ b/distrib/alpha/floppy-GENERIC/Makefile     Sat May 04 01:40:06 2002 +0000
@@ -1,68 +1,53 @@
-#      $NetBSD: Makefile,v 1.15 2002/05/02 18:02:18 lukem Exp $
+#      $NetBSD: Makefile,v 1.16 2002/05/04 01:40:06 lukem Exp $
 
 .include <bsd.own.mk>
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
 
 .include <bsd.kernobj.mk>
 
-MOUNT_POINT?=  /mnt
-VND?=          vnd0
-VND_DEV=       /dev/${VND}a
-VND_RDEV=      /dev/r${VND}a
-VND_CDEV=      /dev/${VND}c
-VND_CRDEV=     /dev/r${VND}c
-MDEC?=         ${DESTDIR}/usr/mdec
-KERNEL?=       ${KERNOBJDIR}/GENERIC/netbsd
-STRIP?=                strip
-
-GZKERNEL=      netbsd
-IMAGE=         GENERIC.fs
+# Stuff an arbitrary kernel onto a ustarfs boot floppy set.
+#
+# Optional variables available:
+#      FLOPPYKERNEL    Path to kernel to stuff onto the floppy.
+#                      [ ${KERNOBJDIR}/GENERIC/netbsd ]
+#
+#      FLOPPYBASE      Basename of floppies (written as "${FLOPPYBASE}N.fs")
+#                      [ "generic" ]
+#
+#      FLOPPYSIZE      Size of a floppy.  [ 2880 ]
+#
+#      FLOPPYMAX       Maximum number of floppies allowed in the set.  [1]
+#
+FLOPPYKERNEL?= ${KERNOBJDIR}/GENERIC/netbsd
+FLOPPYBASE?=   generic
+FLOPPYMAX?=    1
 
-DISKTYPE=      floppy
-
-# Some reasonable values for the -i parameter to newfs are:
-#
-#   6144       1147k, 189 inodes free
-#  16384       1159k,  93 inodes free
-# 204800       1167k,  29 inodes free
-INO_BYTES?=    6144
-
-CLEANFILES+=   ${IMAGE} ${GZKERNEL}
-
-all: GENERIC.fs
+FLOPPY_RELEASEDIR?=    installation/misc
 
-GENERIC.fs: ${GZKERNEL} ${MDEC}/boot ${MDEC}/bootxx.old
-       @echo Creating tar image
-       ${PAX} -wvf ustar.tmp ${MDEC}/boot ${GZKERNEL}
-       @echo Creating vn image
-       dd if=/dev/zero of=${.TARGET}.tmp count=2880
-       vnconfig -t ${DISKTYPE} -v -c ${VND} ${.TARGET}.tmp
-       dd bs=8k seek=1 if=ustar.tmp of=${VND_CDEV}
-       disklabel -rw ${VND} ${DISKTYPE}
-       ${MDEC}/installboot.old -b 17 -v        \
-               ${MDEC}/boot ${MDEC}/bootxx.old ${VND_CRDEV}
-       vnconfig -u ${VND}
-       mv ${.TARGET}.tmp ${.TARGET}
+.if defined(FLOPPYSIZE) && (${FLOPPYSIZE} != 2880)
+FLOPPYMETAFILE!=printf "tapelabel USTAR.volsize.%o" ${FLOPPYSIZE}
+.else
+FLOPPYSIZE=    2880
+.endif
+
+FLOPPYFILES=   boot ${FLOPPYMETAFILE} netbsd
 
-${GZKERNEL}: ${KERNEL}
-       cp ${KERNEL} ${.TARGET}
-       ${STRIP} ${.TARGET}
-       gzip -9f ${.TARGET}
-       mv ${.TARGET}.gz ${.TARGET}
-
-unconfig:
-       -vnconfig -u ${VND}
+MDEC=          ${DESTDIR}/usr/mdec
+KERNOBJ!=      cd ${.CURDIR}/../instkernel && ${PRINTOBJDIR}
+FLOPPY_BOOT=   ${MDEC}/ustarboot
+FLOPPYINSTBOOT=\
+       "${INSTALLBOOT} -m ${MACHINE} -t raw -v -b 17 @IMAGE@ ${FLOPPY_BOOT}"
 
-disk: all
-       dd if=GENERIC.fs bs=18k of=/dev/rfd0a
-
-clean cleandir distclean:
-       /bin/rm -f *.core ${CLEANFILES} ${GZKERNEL} ${GZKERNEL}.gz *.tmp
+netbsd: ${FLOPPYKERNEL}
+       @echo "Copying stripped and gzipped ${.ALLSRC} to ${.TARGET}"
+       @rm -f ${.TARGET} ${.TARGET}.tmp
+       cp ${.ALLSRC} ${.TARGET}.tmp
+       ${STRIP} ${.TARGET}.tmp
+       gzip -9f ${.TARGET}.tmp
+       mv ${.TARGET}.tmp.gz ${.TARGET}
 
-# nothing to do here
-depend includes lint regress tags:
+CLEANFILES+=   netbsd netbsd.tmp netbsd.tmp.gz
 
-release: check_RELEASEDIR .WAIT GENERIC.fs
-       ${RELEASE_INSTALL} GENERIC.fs ${RELEASEDIR}/installation/misc
+.include "${DISTRIBDIR}/common/Makefile.tarfloppy"
 
 .include <bsd.prog.mk>



Home | Main Index | Thread Index | Old Index