NetBSD/distrib/sun3/miniroot/Makefile

77 lines
1.9 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.15 1999/05/21 04:06:20 gwr Exp $
TOP= ${.CURDIR}/..
# This include just sets REV=XX
.include "${TOP}/Makefile.inc"
IMAGE= miniroot
TREE= ${TOP}/common/${IMAGE}.tree
1997-12-13 01:37:19 +03:00
LISTS= ${TOP}/common/${IMAGE}.list \
${TOP}/common/mini_sbin.list \
${TOP}/common/mini_bin.list \
1997-12-13 01:37:19 +03:00
${TOP}/common/mini_usr.list
1999-05-16 12:21:52 +04:00
KERNEL3 = ${KERNOBJDIR}/INSTALL/netbsd
KERNEL3X = ${KERNOBJDIR}/INSTALL3X/netbsd
1999-05-16 12:21:52 +04:00
MOUNT_POINT?= /mnt
BDEV?= /dev/sd1b
CDEV?= /dev/rsd1b
1995-11-22 00:18:48 +03:00
# These are all the parameters for the miniroot: (8MB)
DISKTYPE= miniroot
1999-05-16 12:21:52 +04:00
NBLKS= 20480
# bigendian, old format, minfree, opt, b/i trks, sects, cpg
1999-04-22 08:32:12 +04:00
NEWFSARGS= -B be -O -m 0 -o space -i 8192 -t 8 -u 32 -c 16
1996-10-09 04:13:36 +04:00
CLEANFILES= ${IMAGE}.gz install.sub
1998-03-18 02:03:32 +03:00
all: ${IMAGE}.gz
1997-12-13 01:37:19 +03:00
${IMAGE}.gz: ${TREE} ${LISTS} install.sub
1999-04-22 08:32:12 +04:00
-newfs ${NEWFSARGS} -s ${NBLKS} ${CDEV} ${DISKTYPE}
1995-11-22 00:18:48 +03:00
mount ${BDEV} ${MOUNT_POINT}
mtree -def ${TREE} -p ${MOUNT_POINT}/ -u
cp ${KERNEL3} ${MOUNT_POINT}/netbsd.sun3
cp ${KERNEL3X} ${MOUNT_POINT}/netbsd.sun3x
1995-11-22 00:18:48 +03:00
TOPDIR=${TOP} CURDIR=${.CURDIR} \
OBJDIR=${.OBJDIR} TARGDIR=${MOUNT_POINT} \
sh ${TOP}/common/RunList.sh ${LISTS}
sync ; sleep 1 ; sync
cd ${MOUNT_POINT} ;\
usr/mdec/installboot -v ufsboot usr/mdec/bootxx ${CDEV}
1995-11-22 00:18:48 +03:00
sync
@echo ""
@df -i ${MOUNT_POINT}
@echo ""
-umount ${MOUNT_POINT}
dd if=${CDEV} bs=16b count=`expr ${NBLKS} / 16` |\
gzip > ${IMAGE}.tmp
-mv -f ${IMAGE}.tmp ${IMAGE}.gz
1995-10-13 19:38:20 +03:00
# Do not delete this if I change my mind and kill make...
1995-11-22 00:18:48 +03:00
.PRECIOUS: ${IMAGE}.gz
1996-10-09 04:13:36 +04:00
install.sub : ${TOP}/../miniroot/install.sub
sed -e "/^VERSION=/s/=.*/=${REV}/" < $? > $@
1998-09-05 18:46:13 +04:00
clean cleandir distclean:
1995-10-13 19:38:20 +03:00
-rm -f a.out core *.core *.o
-rm -f ${CLEANFILES}
# Standard rules needed by the above...
.include <bsd.obj.mk>
.if !defined(RELEASEDIR)
release:
@echo setenv RELEASEDIR before doing that!
@false
.else # RELEASEDIR
release: ${IMAGE}.gz
cp -p ${IMAGE}.gz \
${RELEASEDIR}/installation/miniroot/${IMAGE}.gz
.endif # RELEASEDIR