Home | History | Annotate | Line # | Download | only in common
Makefile.bootfloppy revision 1.7
      1  1.7  lukem #	$NetBSD: Makefile.bootfloppy,v 1.7 2002/04/16 05:23:40 lukem Exp $
      2  1.7  lukem #
      3  1.7  lukem # Makefile snippet to create a set of USTAR floppies
      4  1.7  lukem #
      5  1.1  lukem 
      6  1.5  lukem .include <bsd.own.mk>
      7  1.5  lukem .include "${_SRC_TOP_}/distrib/Makefile.inc"
      8  1.5  lukem 
      9  1.7  lukem #
     10  1.7  lukem # Required variables:
     11  1.7  lukem #	_SRC_TOP_	Top level of src tree (set by <bsd.own.mk>)
     12  1.7  lukem #	FLOPPYBASE	Basename of floppies. Floppy number ${n} will
     13  1.7  lukem #			be generated as ${FLOPPYBASE}${n}.fs
     14  1.7  lukem #	FLOPPYKERNEL	Kernel to copy 
     15  1.7  lukem #	FLOPPYKERNDIR	${FLOPPYKERNEL} is from ${.CURDIR}/../${FLOPPYKERNDIR}
     16  1.7  lukem 
     17  1.7  lukem #
     18  1.7  lukem # Optional variables:
     19  1.7  lukem #	FLOPPYSIZE	Size of floppy in 512 byte blocks.	[2880]
     20  1.7  lukem #	FLOPPYMAX	Maximum number of floppies to build.	[1]
     21  1.7  lukem #			If 1, final image is installed as ${FLOPPYBASE}.fs
     22  1.7  lukem #	FLOPPYBOOTCODE	Boot blocks to use.  [${DESTDIR}/usr/mdec/biosboot.sym]
     23  1.7  lukem #	FLOPPYMETA	ustar metafile (written between "boot" & "netbsd")
     24  1.7  lukem #	FLOPPYPAD	If defined, pad the last floppy to ${FLOPPYSIZE}
     25  1.7  lukem #
     26  1.7  lukem 
     27  1.7  lukem FLOPPYSIZE?=	2880
     28  1.7  lukem FLOPPYMAX?=	1
     29  1.7  lukem FLOPPYBOOTCODE?=${DESTDIR}/usr/mdec/biosboot.sym
     30  1.7  lukem FLOPPYFILES=	boot ${FLOPPYMETA} netbsd
     31  1.7  lukem 
     32  1.7  lukem FLOPPYKERNOBJ!=	cd ${.CURDIR}/../${FLOPPYKERNDIR} && ${PRINTOBJDIR}
     33  1.7  lukem 
     34  1.7  lukem boot: ${FLOPPYBOOTCODE}
     35  1.7  lukem 	@echo "Copying ${FLOPPYBOOTCODE} to boot"
     36  1.7  lukem 	@rm -f boot
     37  1.7  lukem 	@cp ${FLOPPYBOOTCODE} boot
     38  1.7  lukem 	@${STRIP} boot
     39  1.7  lukem 
     40  1.7  lukem netbsd: ${FLOPPYKERNOBJ}/${FLOPPYKERNEL}
     41  1.7  lukem 	@echo "Copying ${FLOPPYKERNOBJ}/${FLOPPYKERNEL} to netbsd"
     42  1.7  lukem 	@rm -f netbsd
     43  1.7  lukem 	@cp ${FLOPPYKERNOBJ}/${FLOPPYKERNEL} netbsd
     44  1.7  lukem 
     45  1.7  lukem .if defined(FLOPPYMETA)
     46  1.7  lukem ${FLOPPYMETA}:
     47  1.7  lukem 	echo "Creating ${FLOPPYMETA}"
     48  1.7  lukem 	@rm -f ${FLOPPYMETA}
     49  1.7  lukem 	@touch ${FLOPPYMETA}
     50  1.7  lukem .endif
     51  1.7  lukem 
     52  1.7  lukem ${FLOPPYBASE}1.fs: ${FLOPPYFILES}
     53  1.7  lukem 	@echo "Creating ${FLOPPYBASE}1.fs from ${FLOPPYFILES}
     54  1.7  lukem #		XXXDISTRIB; need MI installboot for i386
     55  1.7  lukem 	sh ${DISTRIBDIR}/common/buildfloppies.sh \
     56  1.7  lukem 	    -i "${DESTDIR}/usr/mdec/installboot -b 17 -f ${FLOPPYBOOTCODE} @IMAGE@" \
     57  1.7  lukem 	    ${FLOPPYMAX:D-m "${FLOPPYMAX}"} ${FLOPPYPAD:D-p} \
     58  1.7  lukem 	    ${FLOPPYBASE} ${FLOPPYSIZE} ${FLOPPYFILES}
     59  1.7  lukem 
     60  1.7  lukem CLEANFILES+=	${FLOPPYFILES} ${FLOPPYBASE}?.fs
     61  1.7  lukem 
     62  1.7  lukem 
     63  1.7  lukem realall: ${FLOPPYBASE}1.fs
     64  1.1  lukem 
     65  1.7  lukem release: check_RELEASEDIR .WAIT ${FLOPPYBASE}1.fs
     66  1.1  lukem 	-mkdir -p ${RELEASEDIR}/installation/floppy
     67  1.7  lukem 	if [ -e ${FLOPPYBASE}2.fs ]; then \
     68  1.7  lukem 		${RELINSTALL} ${FLOPPYBASE}?.fs \
     69  1.7  lukem 		    ${RELEASEDIR}/installation/floppy; \
     70  1.7  lukem 	else \
     71  1.7  lukem 		${RELINSTALL} ${FLOPPYBASE}1.fs \
     72  1.7  lukem 		    ${RELEASEDIR}/installation/floppy/${FLOPPYBASE}.fs; \
     73  1.7  lukem 	fi
     74  1.3  lukem 
     75  1.1  lukem 
     76  1.5  lukem .include <bsd.prog.mk>
     77