2001-05-18 04:16:36 +04:00
|
|
|
#
|
2002-03-06 15:14:26 +03:00
|
|
|
# $NetBSD: Make.fsimage,v 1.2 2002/03/06 12:14:26 lukem Exp $
|
2001-05-18 04:16:36 +04:00
|
|
|
#
|
|
|
|
|
|
|
|
# TOP is assumed to be defined by Makefile including this one.
|
|
|
|
# These will be defined by it too:
|
|
|
|
|
2002-03-06 15:14:26 +03:00
|
|
|
IMAGE?= xxx-${DISTRIBREV}
|
2001-05-18 04:16:36 +04:00
|
|
|
CBIN?= xxx-crunched
|
|
|
|
|
|
|
|
TREE?= ${.CURDIR}/${CBIN}.tree
|
|
|
|
LISTS?= ${.CURDIR}/${CBIN}.list
|
|
|
|
|
|
|
|
MOUNT_POINT?= /mnt
|
|
|
|
DISKTYPE?= xxx-disktype
|
|
|
|
BDEV?= /dev/md0a
|
|
|
|
CDEV?= /dev/md0a
|
|
|
|
|
|
|
|
IMAGE_DEPS?= ${CBIN}
|
|
|
|
CLEANFILES+= ${IMAGE}.fs
|
|
|
|
|
|
|
|
# These are all the parameters for the root fs:
|
|
|
|
NBLKS?= 512
|
|
|
|
# args: old fmt, minfree, opt, ...
|
|
|
|
NEWFSARGS?= -O -m 0 -o space
|
|
|
|
|
|
|
|
do_mount:
|
|
|
|
-newfs -B be ${NEWFSARGS} -s ${NBLKS} ${CDEV} ${DISKTYPE}
|
|
|
|
mount ${BDEV} ${MOUNT_POINT}
|
|
|
|
|
|
|
|
do_files:
|
|
|
|
mtree -def ${TREE} -p ${MOUNT_POINT}/ -u
|
|
|
|
TOPDIR=${TOP} CURDIR=${.CURDIR} \
|
|
|
|
OBJDIR=${.OBJDIR} TARGDIR=${MOUNT_POINT} \
|
|
|
|
sh ${TOP}/common/RunList.sh ${LISTS}
|
|
|
|
|
|
|
|
do_umount:
|
|
|
|
@echo ""
|
|
|
|
@df -i ${MOUNT_POINT}
|
|
|
|
@echo ""
|
|
|
|
-umount ${MOUNT_POINT}
|
|
|
|
|