blob: c4cbd127cd491179c619b579c77ff4e09e9ecd22 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# $Id: Makefile.kc,v 1.3 1996/06/11 10:20:26 deraadt Exp $
.ifndef MOUNT_POINT
MOUNT_POINT= /mnt
.endif
.if !defined(VND_DEV) || !defined(VND_DEV)
VND_DEV= /dev/vnd0a
VND_RDEV= /dev/rvnd0a
.endif
PID!= echo $$$$
REALIMAGE!= echo /tmp/image.${PID}
ROOTDIRLIST= / /bin /dev /instbin /mnt /sbin /usr
BINDIRLIST= /usr/bin
FLOPPYBINS= fsck init mount reboot sh tar test umount
all:
.if !defined(IMAGE) || !defined(KERNEL)
@echo both IMAGE and KERNEL must be defined
@false
.else
dd if=/dev/zero of=${REALIMAGE} bs=10k count=120
vnconfig -c ${VND_DEV} ${REALIMAGE}
disklabel -w -B -b ${DESTDIR}/usr/mdec/fdboot -s ${DESTDIR}/usr/mdec/bootfd \
${VND_RDEV} floppy5
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 \
install -d -o ${BINOWN} -g ${BINGRP} -m 755 ${MOUNT_POINT}$$d ; \
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
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
umount ${MOUNT_POINT}
vnconfig -u ${VND_DEV}
cat /*bin/* > /dev/null
cp ${REALIMAGE} ${IMAGE}
.endif
unconfig:
-umount -f ${MOUNT_POINT}
-vnconfig -u ${VND_DEV}
-/bin/rm -f ${REALIMAGE} ${IMAGE}
|