Home | History | Annotate | Line # | Download | only in instkernel
Makefile revision 1.17
      1  1.17      matt #	$NetBSD: Makefile,v 1.17 2000/06/01 06:54:57 matt Exp $
      2  1.16       sjg 
      3  1.16       sjg .include "../../../Makefile.inc"
      4  1.16       sjg .include <bsd.kernobj.mk>
      5  1.17      matt .include <bsd.own.mk>
      6   1.1  jonathan 
      7   1.7    simonb DISKBINDIR=	/installation/diskimage
      8   1.7    simonb KERNBINDIR=	/binary/kernel
      9   1.1  jonathan 
     10   1.3    simonb IMAGE=		diskimage
     11  1.15    simonb IMAGESIZE=	4096 # 512 byte blocks, update disktab.diskimage if changed
     12  1.15    simonb DISKTAB=	${.CURDIR}/disktab.diskimage
     13  1.15    simonb DISKTYPE=	miniroot
     14  1.15    simonb NEWFSOPTS?=	-c 32 -B le -i 32768	# don't need many inodes!
     15   1.1  jonathan 
     16  1.16       sjg KERN=		${KERNOBJDIR}/RAMDISK/netbsd
     17  1.12    simonb RAMDISK!=	cd ${.CURDIR}/../ramdisk; ${MAKE} echoimage
     18  1.10    simonb CLEANFILES=	netbsd netbsd.gz netbsd.ecoff netbsd.ecoff.gz ${IMAGE}.gz
     19   1.3    simonb 
     20  1.15    simonb VND?=		vnd0
     21  1.15    simonb VND_DEV=	/dev/${VND}c
     22  1.15    simonb VND_RDEV=	/dev/r${VND}c
     23   1.3    simonb MOUNT_POINT?=	/mnt
     24   1.3    simonb 
     25  1.15    simonb #
     26  1.15    simonb # install bootblock, so that we can boot from there
     27  1.15    simonb #
     28  1.15    simonb BOOTINSTALL= ${DESTDIR}/usr/mdec/installboot ${VND_RDEV} \
     29  1.15    simonb 	${DESTDIR}/usr/mdec/bootxx_ffs
     30  1.15    simonb 
     31   1.5    simonb all:	netbsd.gz ${IMAGE}.gz
     32   1.1  jonathan 
     33   1.2    simonb netbsd.gz: ${KERN} ${RAMDISK}
     34   1.2    simonb 	cp ${KERN} netbsd
     35   1.2    simonb 	mdsetimage -v netbsd ${RAMDISK}
     36   1.2    simonb 	elf2ecoff netbsd netbsd.ecoff
     37   1.1  jonathan 	rm -f netbsd.ecoff.gz
     38   1.2    simonb 	gzip -9 netbsd.ecoff
     39   1.2    simonb 	rm -f netbsd.gz
     40   1.2    simonb 	gzip -9 netbsd
     41   1.3    simonb 
     42  1.13    simonb ${IMAGE}.gz: netbsd.gz ${DESTDIR}/usr/mdec/boot.pmax
     43   1.3    simonb 	dd if=/dev/zero of=${IMAGE} count=${IMAGESIZE}
     44  1.15    simonb 	vnconfig ${DISKTYPEARG} -v -c ${VND} ${IMAGE} ${VND_GEOM}
     45  1.15    simonb 	disklabel -rw -f ${DISKTAB} ${VND} ${DISKTYPE}
     46  1.15    simonb 	newfs -B le -m 0 -o space ${NEWFSOPTS} ${VND_RDEV}
     47  1.15    simonb 	${DESTDIR}/usr/mdec/installboot ${VND_RDEV} \
     48  1.15    simonb 	    ${DESTDIR}/usr/mdec/bootxx_ffs
     49   1.3    simonb 	${BOOTINSTALL}
     50   1.3    simonb 	mount ${VND_DEV} ${MOUNT_POINT}
     51  1.13    simonb 	cp -p ${DESTDIR}/usr/mdec/boot.pmax ${MOUNT_POINT}
     52   1.3    simonb 	cp -p netbsd.gz ${MOUNT_POINT}/netbsd
     53   1.3    simonb 	@echo ""
     54   1.3    simonb 	@df -i ${MOUNT_POINT}
     55   1.3    simonb 	@echo ""
     56   1.3    simonb 	umount ${MOUNT_POINT}
     57  1.15    simonb 	vnconfig -u ${VND}
     58  1.11    simonb 	rm -f ${IMAGE}.gz
     59   1.5    simonb 	gzip -9 ${IMAGE}
     60  1.15    simonb 
     61  1.15    simonb unconfig:
     62  1.15    simonb 	-umount -f ${MOUNT_POINT}
     63  1.15    simonb 	-vnconfig -u ${VND}
     64  1.15    simonb 	-/bin/rm -f ${IMAGE} ${IMAGE}.gz
     65   1.1  jonathan 
     66   1.6    simonb realinstall:
     67   1.6    simonb 	${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -o root -g wheel \
     68   1.7    simonb 		-m ${NONBINMODE} ${IMAGE}.gz ${RELEASEDIR}${DISKBINDIR}
     69   1.7    simonb 	${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -o root -g wheel \
     70   1.8    simonb 		-m ${BINMODE} netbsd.gz ${RELEASEDIR}${KERNBINDIR}/install.gz
     71  1.12    simonb 	${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -o root -g wheel \
     72  1.14    simonb 		-m ${BINMODE} netbsd.ecoff.gz \
     73  1.14    simonb 		${RELEASEDIR}${KERNBINDIR}/install.ecoff.gz
     74   1.6    simonb 
     75   1.1  jonathan clean cleandir distclean:
     76   1.1  jonathan 	rm -f ${CLEANFILES}
     77   1.9    simonb 
     78   1.9    simonb # XXX!
     79   1.9    simonb depend:
     80   1.1  jonathan 
     81   1.1  jonathan .include <bsd.obj.mk>
     82   1.6    simonb .include "../Makefile.inc"
     83