2002-03-06 00:23:28 +03:00
|
|
|
# $NetBSD: Makefile,v 1.7 2002/03/05 21:23:28 thorpej Exp $
|
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
1998-10-16 04:43:02 +04:00
|
|
|
|
|
|
|
IMAGE1= disk1of2
|
|
|
|
IMAGE2= disk2of2
|
|
|
|
|
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
|
|
|
|
|
|
|
|
CLEANFILES+= netbsd ${FSTMP} ${IMAGE1} ${IMAGE2} tmp tmp.gz
|
|
|
|
|
|
|
|
all: netbsd
|
|
|
|
@echo Making disk number one.
|
|
|
|
tar cvf ${FSTMP} ${SECONDARYBOOT} netbsd
|
|
|
|
@ echo ''
|
|
|
|
@ls -l ${FSTMP} | (read mode links uid gid size junk; \
|
|
|
|
bytes=$$((2880 * 512 * 2 - $$size - 8 * 1024)); \
|
|
|
|
echo There are $$bytes \($$(($$bytes / 1024))K\) bytes free\
|
|
|
|
on disk 2.)
|
|
|
|
@ echo ''
|
|
|
|
dd if=/dev/zero of=${IMAGE1} count=2880
|
2001-12-09 03:37:38 +03:00
|
|
|
vnconfig -t ${DISKTYPE} -v -c ${VND} ${IMAGE1}
|
1998-10-16 04:43:02 +04:00
|
|
|
dd bs=8k seek=1 count=179 if=${FSTMP} of=${VND_CDEV}
|
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
|
|
|
@echo Making disk number two.
|
|
|
|
echo USTARFS 2 > ${IMAGE2}
|
|
|
|
(echo 'Prototype image created on: '; \
|
|
|
|
echo -n ' '; date; \
|
|
|
|
echo -n ' '; date -u) >> ${IMAGE2}
|
|
|
|
(echo Hash value of corresponding volume:; md5 ${IMAGE1}) >> ${IMAGE2}
|
|
|
|
dd bs=8k seek=1 skip=179 conv=sync if=${FSTMP} of=${IMAGE2}
|
|
|
|
@rm ${FSTMP}
|
|
|
|
|
|
|
|
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 ${IMAGE1} ${IMAGE2}
|
|
|
|
|
|
|
|
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>
|