ed8e534c7e
- move guts of distrib/Makefile.inc to distrib/common/Makefile.distrib (fixes problem caused by implicit include of ../Makefile.inc in certain submake conditions triggered by makefiles not yet in tree) - removed mkdir of ${RELEASEDIR}/*; rely upon "snap_pre" target of etc/Makefile to create all the release directories - renamed RELINSTALL to RELEASE_INSTALL - renamed FLOPPYINSTDIR to FLOPPY_RELEASEDIR - renamed MDSETDIR to MDSET_RELEASEDIR - removed ITARGET - move release target from top level to appropriate subdirectory - ensure release target has correct depends - replace miniroot's IMAGE_MD_POST with common/Makefile.image IMAGEPOSTBUILD - Makefile.image: add realall: ${IMAGE}
77 lines
2.0 KiB
Makefile
77 lines
2.0 KiB
Makefile
# $NetBSD: Makefile,v 1.27 2002/05/02 18:02:58 lukem Exp $
|
|
|
|
.include <bsd.own.mk>
|
|
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
|
|
|
|
TOP= ${.CURDIR}/..
|
|
|
|
.include "${TOP}/Makefile.inc"
|
|
|
|
IMAGE= miniroot
|
|
|
|
TREE= ${TOP}/common/${IMAGE}.tree
|
|
|
|
LISTS= ${TOP}/common/${IMAGE}.list \
|
|
${TOP}/common/mini_sbin.list \
|
|
${TOP}/common/mini_bin.list \
|
|
${TOP}/common/mini_usr.list
|
|
|
|
KERNEL3 = ${KERNOBJDIR}/INSTALL/netbsd
|
|
KERNEL3X = ${KERNOBJDIR}/INSTALL3X/netbsd
|
|
|
|
MOUNT_POINT?= /mnt
|
|
VND?= vnd1
|
|
VND_DEV?= /dev/${VND}a
|
|
VND_RDEV?= /dev/r${VND}a
|
|
VND_CRDEV?= /dev/r${VND}c
|
|
|
|
# These are all the parameters for the miniroot: (12MB)
|
|
DISKTYPE= miniroot
|
|
SIZE= 12
|
|
# bigendian, old format, minfree, opt, b/i, cpg
|
|
NEWFSARGS= -B be -O -m 0 -o space -i 8192 -c 16
|
|
MTREE?= mtree
|
|
|
|
CLEANFILES= ${IMAGE}.gz ${IMAGE} ${IMAGE}.tmp install.sub
|
|
|
|
all: ${IMAGE}.gz
|
|
|
|
${IMAGE}.gz: ${TREE} ${LISTS} install.sub
|
|
dd if=/dev/zero of=${IMAGE} bs=1024k count=${SIZE}
|
|
vnconfig -t ${DISKTYPE} -v -c ${VND} ${IMAGE}
|
|
disklabel -f ${.CURDIR}/disktab -rw ${VND} ${DISKTYPE}
|
|
newfs ${NEWFSARGS} ${VND_RDEV}
|
|
mount ${VND_DEV} ${MOUNT_POINT}
|
|
${MTREE} -def ${TREE} -p ${MOUNT_POINT}/ -u
|
|
cp ${KERNEL3} ${MOUNT_POINT}/netbsd.sun3
|
|
cp ${KERNEL3X} ${MOUNT_POINT}/netbsd.sun3x
|
|
TOPDIR=${TOP} CURDIR=${.CURDIR} DESTDIR=${DESTDIR} \
|
|
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 ${VND_CRDEV}
|
|
sync
|
|
@echo ""
|
|
@df -i ${MOUNT_POINT}
|
|
@echo ""
|
|
-umount ${MOUNT_POINT}
|
|
vnconfig -u ${VND}
|
|
gzip -9f ${IMAGE}
|
|
|
|
unconfig:
|
|
-umount -f ${MOUNT_POINT}
|
|
-vnconfig -u ${VND}
|
|
-/bin/rm -f ${IMAGE} ${IMAGE}.tmp
|
|
|
|
# Do not delete this if I change my mind and kill make...
|
|
.PRECIOUS: ${IMAGE}.gz
|
|
|
|
install.sub : ${TOP}/../miniroot/install.sub
|
|
sed -e "/^VERSION=/s/=.*/=${DISTRIBREV}/" < $? > $@
|
|
|
|
release: check_RELEASEDIR .WAIT ${IMAGE}.gz
|
|
${RELEASE_INSTALL} ${IMAGE}.gz ${RELEASEDIR}/installation/miniroot
|
|
|
|
.include <bsd.prog.mk>
|