2002-05-02 22:02:14 +04:00
|
|
|
# $NetBSD: Makefile,v 1.27 2002/05/02 18:02:58 lukem Exp $
|
2002-04-18 19:36:57 +04:00
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
2002-05-02 22:02:14 +04:00
|
|
|
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
|
1995-10-09 02:07:44 +03:00
|
|
|
|
|
|
|
TOP= ${.CURDIR}/..
|
|
|
|
|
|
|
|
.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 \
|
1995-10-09 02:07:44 +03:00
|
|
|
${TOP}/common/mini_bin.list \
|
1997-12-13 01:37:19 +03:00
|
|
|
${TOP}/common/mini_usr.list
|
1995-10-09 02:07:44 +03:00
|
|
|
|
1999-05-16 12:21:52 +04:00
|
|
|
KERNEL3 = ${KERNOBJDIR}/INSTALL/netbsd
|
|
|
|
KERNEL3X = ${KERNOBJDIR}/INSTALL3X/netbsd
|
1995-10-09 02:07:44 +03:00
|
|
|
|
1999-05-16 12:21:52 +04:00
|
|
|
MOUNT_POINT?= /mnt
|
2000-06-09 18:58:32 +04:00
|
|
|
VND?= vnd1
|
|
|
|
VND_DEV?= /dev/${VND}a
|
|
|
|
VND_RDEV?= /dev/r${VND}a
|
|
|
|
VND_CRDEV?= /dev/r${VND}c
|
1995-11-22 00:18:48 +03:00
|
|
|
|
2001-02-13 06:10:56 +03:00
|
|
|
# These are all the parameters for the miniroot: (12MB)
|
1995-11-22 00:18:48 +03:00
|
|
|
DISKTYPE= miniroot
|
2001-02-13 06:10:56 +03:00
|
|
|
SIZE= 12
|
2000-06-09 18:58:32 +04:00
|
|
|
# bigendian, old format, minfree, opt, b/i, cpg
|
|
|
|
NEWFSARGS= -B be -O -m 0 -o space -i 8192 -c 16
|
2001-10-13 10:15:15 +04:00
|
|
|
MTREE?= mtree
|
1995-10-09 02:07:44 +03:00
|
|
|
|
2000-06-09 18:58:32 +04:00
|
|
|
CLEANFILES= ${IMAGE}.gz ${IMAGE} ${IMAGE}.tmp install.sub
|
1995-10-09 02:07:44 +03:00
|
|
|
|
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
|
2000-06-09 18:58:32 +04:00
|
|
|
dd if=/dev/zero of=${IMAGE} bs=1024k count=${SIZE}
|
|
|
|
vnconfig -t ${DISKTYPE} -v -c ${VND} ${IMAGE}
|
2001-02-13 06:10:56 +03:00
|
|
|
disklabel -f ${.CURDIR}/disktab -rw ${VND} ${DISKTYPE}
|
2000-06-09 18:58:32 +04:00
|
|
|
newfs ${NEWFSARGS} ${VND_RDEV}
|
|
|
|
mount ${VND_DEV} ${MOUNT_POINT}
|
2001-10-13 10:15:15 +04:00
|
|
|
${MTREE} -def ${TREE} -p ${MOUNT_POINT}/ -u
|
1998-02-12 22:55:14 +03:00
|
|
|
cp ${KERNEL3} ${MOUNT_POINT}/netbsd.sun3
|
|
|
|
cp ${KERNEL3X} ${MOUNT_POINT}/netbsd.sun3x
|
2000-06-10 07:02:14 +04:00
|
|
|
TOPDIR=${TOP} CURDIR=${.CURDIR} DESTDIR=${DESTDIR} \
|
1995-11-22 00:18:48 +03:00
|
|
|
OBJDIR=${.OBJDIR} TARGDIR=${MOUNT_POINT} \
|
|
|
|
sh ${TOP}/common/RunList.sh ${LISTS}
|
1995-10-09 02:07:44 +03:00
|
|
|
sync ; sleep 1 ; sync
|
|
|
|
cd ${MOUNT_POINT} ;\
|
2000-06-09 18:58:32 +04:00
|
|
|
usr/mdec/installboot -v ufsboot usr/mdec/bootxx ${VND_CRDEV}
|
1995-11-22 00:18:48 +03:00
|
|
|
sync
|
|
|
|
@echo ""
|
|
|
|
@df -i ${MOUNT_POINT}
|
|
|
|
@echo ""
|
|
|
|
-umount ${MOUNT_POINT}
|
2000-06-09 18:58:32 +04:00
|
|
|
vnconfig -u ${VND}
|
2002-04-26 19:05:18 +04:00
|
|
|
gzip -9f ${IMAGE}
|
1995-10-09 02:07:44 +03:00
|
|
|
|
2001-02-13 06:10:56 +03:00
|
|
|
unconfig:
|
|
|
|
-umount -f ${MOUNT_POINT}
|
2001-11-10 00:00:04 +03:00
|
|
|
-vnconfig -u ${VND}
|
2001-02-13 06:10:56 +03:00
|
|
|
-/bin/rm -f ${IMAGE} ${IMAGE}.tmp
|
|
|
|
|
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
|
1995-10-09 02:07:44 +03:00
|
|
|
|
1996-10-09 04:13:36 +04:00
|
|
|
install.sub : ${TOP}/../miniroot/install.sub
|
2002-03-06 15:14:26 +03:00
|
|
|
sed -e "/^VERSION=/s/=.*/=${DISTRIBREV}/" < $? > $@
|
1996-10-09 04:13:36 +04:00
|
|
|
|
2002-05-02 22:02:14 +04:00
|
|
|
release: check_RELEASEDIR .WAIT ${IMAGE}.gz
|
|
|
|
${RELEASE_INSTALL} ${IMAGE}.gz ${RELEASEDIR}/installation/miniroot
|
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|