blob: ea17f254d22bcd4ddb2bb8e00ee342d14bc86f3c (
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
58
59
60
61
62
63
64
65
66
67
|
# $OpenBSD: Makefile,v 1.6 2019/04/29 01:48:39 deraadt Exp $
TOP= ${.CURDIR}/..
.include "${TOP}/Makefile.inc"
FS= miniroot${OSrev}.fs
MOUNT_POINT= /mnt
.ifndef DESTDIR
all ${FS}:
@echo setenv DESTDIR before making a ramdisk!
@false
.else
all: ${FS}
${FS}: vn_up install_files installboot showit vn_down
vn_up: blank_filesystem
vnconfig -v ${FS} > vnd
disklabel -w `cat vnd` fakeramdisk
newfs -m 0 /dev/r`cat vnd`a
mount /dev/`cat vnd`a ${MOUNT_POINT}
showit:
df -i ${MOUNT_POINT}
vn_down:
umount ${MOUNT_POINT}
vnconfig -u `cat vnd`
rm -f vnd
install_files: bsd.rd boot
bsd.rd:
install -c -m 555 -o root -g wheel \
${.OBJDIR}/../bsd.rd/bsd.rd ${MOUNT_POINT}/bsd
boot:
install -c -m 555 -o root -g wheel \
${DESTDIR}/usr/mdec/boot ${MOUNT_POINT}/boot
installboot:
/usr/mdec/installboot -v ${MOUNT_POINT}/boot \
${DESTDRIR}/usr/mdec/bootxx `cat vnd`
blank_filesystem:
dd if=/dev/zero of=${FS} bs=512 count=5760
.endif
unconfig:
-umount -f ${MOUNT_POINT}
-[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd
.ifdef RELEASEDIR
install:
cp ${FS} ${RELEASEDIR}
.endif
clean:
rm -f ${FS}
.include <bsd.own.mk>
.include <bsd.obj.mk>
.include <bsd.subdir.mk>
|