2002-03-06 00:23:28 +03:00
|
|
|
# $NetBSD: Makefile,v 1.8 2002/03/05 21:23:28 thorpej Exp $
|
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
1998-10-16 04:43:02 +04:00
|
|
|
|
1998-10-29 03:37:06 +03:00
|
|
|
IMAGE= cdhdtape
|
1999-03-22 11:44:57 +03:00
|
|
|
IMAGESIZE= 5760
|
1998-10-16 04:43:02 +04:00
|
|
|
NFILES= 3
|
|
|
|
|
2002-03-05 22:53:19 +03:00
|
|
|
INSTKERNELDIR!= cd ${.CURDIR}/../instkernel && ${PRINTOBJDIR}
|
|
|
|
INSTKERNEL= ${INSTKERNELDIR}/netbsd.gz
|
1998-10-16 04:43:02 +04:00
|
|
|
|
|
|
|
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
|
|
|
|
KERN?= netbsd-xxx
|
|
|
|
MDEC= ${DESTDIR}/usr/mdec
|
|
|
|
FSTMP= ustar.tmp
|
|
|
|
|
1999-04-07 10:47:49 +04:00
|
|
|
PRIMARYBOOT= ${DESTDIR}/usr/mdec/bootxx.old
|
1998-10-16 04:43:02 +04:00
|
|
|
SECONDARYBOOT= ${DESTDIR}/usr/mdec/boot
|
|
|
|
|
|
|
|
DISKTYPE= floppy
|
|
|
|
METANAME!= printf USTAR.volsize.%o ${IMAGESIZE}
|
|
|
|
|
|
|
|
CLEANFILES+= netbsd ${FSTMP} ${IMAGE} tmp tmp.gz USTAR.volsize.*
|
|
|
|
|
|
|
|
all: netbsd
|
|
|
|
@echo Making CD/tape image
|
|
|
|
cp /dev/null ${METANAME}
|
|
|
|
cp /dev/null tapelabel
|
|
|
|
tar cvf ${FSTMP} ${SECONDARYBOOT} tapelabel ${METANAME} netbsd
|
|
|
|
@rm tapelabel
|
|
|
|
@echo not really doing rm ${METANAME}
|
|
|
|
@ echo ''
|
|
|
|
@ls -l ${FSTMP} | (read mode links uid gid size junk; \
|
|
|
|
bytes=$$((${IMAGESIZE} * 512 - $$size - 8 * 1024));\
|
|
|
|
echo There are $$bytes \($$(($$bytes / 1024))K\) bytes free)
|
|
|
|
@ echo ''
|
|
|
|
dd if=/dev/zero of=${IMAGE} count=${IMAGESIZE}
|
2001-12-09 03:37:38 +03:00
|
|
|
vnconfig -v -c ${VND} ${IMAGE} \
|
1998-10-16 04:43:02 +04:00
|
|
|
512/18/2/$$((${IMAGESIZE} / (18 * 2)))
|
|
|
|
dd bs=8k seek=1 if=${FSTMP} of=${VND_CDEV}
|
|
|
|
@echo not really doing rm ${FSTMP}
|
2001-12-09 03:37:38 +03:00
|
|
|
disklabel -rw ${VND} ${DISKTYPE}
|
1998-10-16 04:43:02 +04:00
|
|
|
@echo "installing new bootblocks"
|
1999-04-07 10:47:49 +04:00
|
|
|
${MDEC}/installboot.old -b 17 -v \
|
1998-10-16 04:43:02 +04:00
|
|
|
${SECONDARYBOOT} ${PRIMARYBOOT} ${VND_CRDEV}
|
2001-12-09 03:37:38 +03:00
|
|
|
vnconfig -u ${VND}
|
1998-10-16 04:43:02 +04:00
|
|
|
|
|
|
|
netbsd: ${INSTKERNEL}
|
1998-10-29 03:37:06 +03:00
|
|
|
cp ${INSTKERNEL} netbsd
|
1998-10-16 04:43:02 +04:00
|
|
|
|
|
|
|
unconfig:
|
|
|
|
-umount -f ${MOUNT_POINT}
|
2001-12-09 03:37:38 +03:00
|
|
|
-vnconfig -u ${VND}
|
1998-10-16 04:43:02 +04:00
|
|
|
-/bin/rm -f ${IMAGE}
|
|
|
|
|
|
|
|
clean cleandir distclean:
|
|
|
|
/bin/rm -f *.core ${CLEANFILES}
|
|
|
|
|
1999-05-12 00:08:01 +04:00
|
|
|
# nothing to do here
|
|
|
|
depend includes lint regress tags:
|
|
|
|
|
1998-10-16 04:43:02 +04:00
|
|
|
.include <bsd.obj.mk>
|