2000-01-06 06:47:55 +03:00
|
|
|
# $NetBSD: Makefile,v 1.15 2000/01/06 03:47:55 simonb Exp $
|
1998-12-05 10:33:13 +03:00
|
|
|
|
1999-04-27 16:14:00 +04:00
|
|
|
DISKBINDIR= /installation/diskimage
|
|
|
|
KERNBINDIR= /binary/kernel
|
1998-12-05 10:33:13 +03:00
|
|
|
|
1999-04-16 20:01:33 +04:00
|
|
|
IMAGE= diskimage
|
2000-01-06 06:47:55 +03:00
|
|
|
IMAGESIZE= 4096 # 512 byte blocks, update disktab.diskimage if changed
|
|
|
|
DISKTAB= ${.CURDIR}/disktab.diskimage
|
|
|
|
DISKTYPE= miniroot
|
|
|
|
NEWFSOPTS?= -c 32 -B le -i 32768 # don't need many inodes!
|
1998-12-05 10:33:13 +03:00
|
|
|
|
1999-04-16 20:01:33 +04:00
|
|
|
KERN= ${.CURDIR}/../../../sys/arch/pmax/compile/RAMDISK/netbsd
|
1999-12-28 13:56:54 +03:00
|
|
|
RAMDISK!= cd ${.CURDIR}/../ramdisk; ${MAKE} echoimage
|
1999-05-07 00:50:13 +04:00
|
|
|
CLEANFILES= netbsd netbsd.gz netbsd.ecoff netbsd.ecoff.gz ${IMAGE}.gz
|
1999-04-16 20:01:33 +04:00
|
|
|
|
2000-01-06 06:47:55 +03:00
|
|
|
VND?= vnd0
|
|
|
|
VND_DEV= /dev/${VND}c
|
|
|
|
VND_RDEV= /dev/r${VND}c
|
1999-04-16 20:01:33 +04:00
|
|
|
MOUNT_POINT?= /mnt
|
|
|
|
|
2000-01-06 06:47:55 +03:00
|
|
|
#
|
|
|
|
# install bootblock, so that we can boot from there
|
|
|
|
#
|
|
|
|
BOOTINSTALL= ${DESTDIR}/usr/mdec/installboot ${VND_RDEV} \
|
|
|
|
${DESTDIR}/usr/mdec/bootxx_ffs
|
|
|
|
|
1999-04-27 05:34:49 +04:00
|
|
|
all: netbsd.gz ${IMAGE}.gz
|
1998-12-05 10:33:13 +03:00
|
|
|
|
1999-04-05 10:17:44 +04:00
|
|
|
netbsd.gz: ${KERN} ${RAMDISK}
|
|
|
|
cp ${KERN} netbsd
|
|
|
|
mdsetimage -v netbsd ${RAMDISK}
|
|
|
|
elf2ecoff netbsd netbsd.ecoff
|
1998-12-05 10:33:13 +03:00
|
|
|
rm -f netbsd.ecoff.gz
|
1999-04-05 10:17:44 +04:00
|
|
|
gzip -9 netbsd.ecoff
|
|
|
|
rm -f netbsd.gz
|
|
|
|
gzip -9 netbsd
|
1998-12-05 10:33:13 +03:00
|
|
|
|
2000-01-04 00:59:12 +03:00
|
|
|
${IMAGE}.gz: netbsd.gz ${DESTDIR}/usr/mdec/boot.pmax
|
1999-04-16 20:01:33 +04:00
|
|
|
dd if=/dev/zero of=${IMAGE} count=${IMAGESIZE}
|
2000-01-06 06:47:55 +03:00
|
|
|
vnconfig ${DISKTYPEARG} -v -c ${VND} ${IMAGE} ${VND_GEOM}
|
|
|
|
disklabel -rw -f ${DISKTAB} ${VND} ${DISKTYPE}
|
|
|
|
newfs -B le -m 0 -o space ${NEWFSOPTS} ${VND_RDEV}
|
|
|
|
${DESTDIR}/usr/mdec/installboot ${VND_RDEV} \
|
|
|
|
${DESTDIR}/usr/mdec/bootxx_ffs
|
1999-04-16 20:01:33 +04:00
|
|
|
${BOOTINSTALL}
|
|
|
|
mount ${VND_DEV} ${MOUNT_POINT}
|
2000-01-04 00:59:12 +03:00
|
|
|
cp -p ${DESTDIR}/usr/mdec/boot.pmax ${MOUNT_POINT}
|
1999-04-16 20:01:33 +04:00
|
|
|
cp -p netbsd.gz ${MOUNT_POINT}/netbsd
|
|
|
|
@echo ""
|
|
|
|
@df -i ${MOUNT_POINT}
|
|
|
|
@echo ""
|
|
|
|
umount ${MOUNT_POINT}
|
2000-01-06 06:47:55 +03:00
|
|
|
vnconfig -u ${VND}
|
1999-10-18 05:35:17 +04:00
|
|
|
rm -f ${IMAGE}.gz
|
1999-04-27 05:34:49 +04:00
|
|
|
gzip -9 ${IMAGE}
|
1999-04-16 20:01:33 +04:00
|
|
|
|
2000-01-06 06:47:55 +03:00
|
|
|
unconfig:
|
|
|
|
-umount -f ${MOUNT_POINT}
|
|
|
|
-vnconfig -u ${VND}
|
|
|
|
-/bin/rm -f ${IMAGE} ${IMAGE}.gz
|
|
|
|
|
1999-04-27 16:03:39 +04:00
|
|
|
realinstall:
|
|
|
|
${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -o root -g wheel \
|
1999-04-27 16:14:00 +04:00
|
|
|
-m ${NONBINMODE} ${IMAGE}.gz ${RELEASEDIR}${DISKBINDIR}
|
|
|
|
${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -o root -g wheel \
|
1999-04-27 16:18:47 +04:00
|
|
|
-m ${BINMODE} netbsd.gz ${RELEASEDIR}${KERNBINDIR}/install.gz
|
1999-12-28 13:56:54 +03:00
|
|
|
${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -o root -g wheel \
|
2000-01-04 04:20:23 +03:00
|
|
|
-m ${BINMODE} netbsd.ecoff.gz \
|
|
|
|
${RELEASEDIR}${KERNBINDIR}/install.ecoff.gz
|
1999-04-27 16:03:39 +04:00
|
|
|
|
1998-12-05 10:33:13 +03:00
|
|
|
clean cleandir distclean:
|
|
|
|
rm -f ${CLEANFILES}
|
|
|
|
|
1999-05-04 06:44:22 +04:00
|
|
|
# XXX!
|
|
|
|
depend:
|
|
|
|
|
1998-12-05 10:33:13 +03:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
.include <bsd.obj.mk>
|
1999-04-27 16:03:39 +04:00
|
|
|
.include "../Makefile.inc"
|