summaryrefslogtreecommitdiff
path: root/distrib/sparc64/cdfs/Makefile
blob: e64ddfa3df6d8da1feb3429290c6399f2ec75e2d (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
#	$OpenBSD: Makefile,v 1.2 2001/10/12 16:45:43 jason Exp $

TARGET=cd.fs

.ifndef DESTDIR
all ${TARGET}:
	@echo setenv DESTDIR before making a ramdisk!
	@false
.else

all: ${TARGET}

${TARGET}: vn_up install_files installboot vn_down

vn_up: blank_filesystem
	vnconfig svnd0 ${TARGET}
	disklabel -w svnd0 fakeramdisk
	newfs /dev/rsvnd0a
	mount /dev/svnd0a /mnt

vn_down:
	-umount /mnt
	-vnconfig -u svnd0

install_files: bsd.rd ofwboot

bsd.rd:
	install -c -m 555 -o root -g wheel \
	    ${.OBJDIR}/../bsd.rd/bsd.rd /mnt/bsd

ofwboot:
	install -c -m 555 -o root -g wheel \
	    ${DESTDIR}/usr/mdec/ofwboot /mnt/ofwboot

installboot:
	/usr/mdec/installboot -v ${DESTDIR}/usr/mdec/bootblk /dev/svnd0c

blank_filesystem:
	dd if=/dev/zero of=${TARGET} bs=512 count=12800

.endif

install:
	cp cd.fs ${DESTDIR}/snapshot/

clean:
	rm -f ${TARGET}


.include <bsd.own.mk>
.include <bsd.obj.mk>
.include <bsd.subdir.mk>