1995-06-27 02:17:38 +04:00
|
|
|
# $Id: Makefile.kc,v 1.5 1995/06/26 22:17:38 jtc Exp $
|
1994-04-18 14:16:34 +04:00
|
|
|
|
|
|
|
.ifndef MOUNT_POINT
|
|
|
|
MOUNT_POINT= /mnt
|
|
|
|
.endif
|
|
|
|
.if !defined(VND_DEV) || !defined(VND_DEV)
|
|
|
|
VND_DEV= /dev/vnd0a
|
|
|
|
VND_RDEV= /dev/rvnd0a
|
|
|
|
.endif
|
|
|
|
|
1994-04-21 22:57:19 +04:00
|
|
|
ROOTDIRLIST= / /bin /dev /instbin /mnt /sbin /usr
|
1994-04-18 14:16:34 +04:00
|
|
|
BINDIRLIST= /usr/bin
|
1994-07-18 10:37:20 +04:00
|
|
|
FLOPPYBINS= fsck init mount reboot sh tar test umount
|
1994-04-18 14:16:34 +04:00
|
|
|
|
|
|
|
all:
|
|
|
|
.if !defined(IMAGE) || !defined(KERNEL)
|
|
|
|
@echo both IMAGE and KERNEL must be defined
|
|
|
|
@false
|
|
|
|
.else
|
|
|
|
dd if=/dev/zero of=${IMAGE} bs=100k count=12
|
|
|
|
vnconfig -c ${VND_DEV} ${IMAGE}
|
|
|
|
disklabel -r -w ${VND_DEV} floppy5 \
|
|
|
|
${DESTDIR}/usr/mdec/fdboot ${DESTDIR}/usr/mdec/bootfd
|
|
|
|
newfs -m 0 -o space -i 6144 -c 80 ${VND_DEV} floppy5
|
|
|
|
mount ${VND_DEV} ${MOUNT_POINT}
|
|
|
|
for d in ${ROOTDIRLIST} ; do \
|
|
|
|
install -d -o root -g wheel -m 755 ${MOUNT_POINT}$$d ; \
|
|
|
|
done
|
|
|
|
for d in ${BINDIRLIST} ; do \
|
1995-06-27 02:17:38 +04:00
|
|
|
install -d -o ${BINOWN} -g ${BINGRP} -m 755 ${MOUNT_POINT}$$d ; \
|
1994-04-18 14:16:34 +04:00
|
|
|
done
|
|
|
|
cp ${KERNEL} ${MOUNT_POINT}
|
|
|
|
cp ${.CURDIR}/etc.i386/MAKEDEV ${MOUNT_POINT}/dev
|
|
|
|
(cd ${MOUNT_POINT}/dev; sh MAKEDEV floppy)
|
|
|
|
for b in ${FLOPPYBINS} ; do \
|
|
|
|
( cd ${.CURDIR}/../sys/arch/i386/floppy/$$b ; \
|
|
|
|
make DESTDIR=${MOUNT_POINT} install ) ; \
|
|
|
|
done
|
1994-04-21 22:57:19 +04:00
|
|
|
set -- `grep -v '^#' ${.CURDIR}/etc.i386/files.kc/list`; \
|
|
|
|
while [ $$# -ge 2 ]; do \
|
|
|
|
from=$$1; shift; \
|
|
|
|
to=$$1; shift; \
|
|
|
|
cp ${.CURDIR}/etc.i386/files.kc/$$from ${MOUNT_POINT}/$$to; \
|
|
|
|
done
|
1994-04-19 02:24:20 +04:00
|
|
|
umount ${MOUNT_POINT}
|
1994-04-18 14:16:34 +04:00
|
|
|
vnconfig -u ${VND_DEV} ${IMAGE}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
unconfig:
|
|
|
|
-umount -f ${MOUNT_POINT}
|
|
|
|
-vnconfig -u ${VND_DEV} ${IMAGE}
|
|
|
|
-/bin/rm -f ${IMAGE}
|