blob: 5086bcddeceb9c2e3619e95222c73b5eb7652e17 (
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
|
# $OpenBSD: Makefile,v 1.5 2008/02/18 16:08:26 jsing Exp $
TOP= ${.CURDIR}/..
.include "${TOP}/Makefile.inc"
BSDRD= bsd.rd
CDROM= cd${REV}.iso
CDROM2= cd${REV}.tmp
FFS= ffs.img
all: ${CDROM}
${CDROM}:
-rm -rf ${.OBJDIR}/cd-dir
mkdir -p ${.OBJDIR}/cd-dir/
#cp ${DESTDIR}/usr/mdec/boot ${.OBJDIR}/boot
objcopy -Sg -R .comment ${DESTDIR}/usr/mdec/boot ${.OBJDIR}/boot
strip ${.OBJDIR}/boot
gzip -9f < ${.OBJDIR}/../ramdisk/${BSDRD} > ${.OBJDIR}/bsd
dd if=/dev/zero of=${.OBJDIR}/${FFS} bs=1m count=8
vnconfig -v -c svnd0 ${.OBJDIR}/${FFS}
disklabel -w svnd0 rdroot "OpenBSD/sgi "
newfs /dev/rsvnd0a
mount /dev/svnd0a ${.OBJDIR}/cd-dir
mkdir -p ${.OBJDIR}/cd-dir/${OSrev}/sgi
cp ${.OBJDIR}/bsd ${.OBJDIR}/cd-dir/bsd
ln ${.OBJDIR}/cd-dir/bsd ${.OBJDIR}/cd-dir/bsd.rd
ln ${.OBJDIR}/cd-dir/bsd ${.OBJDIR}/cd-dir/${OSrev}/sgi/bsd
ln ${.OBJDIR}/cd-dir/bsd ${.OBJDIR}/cd-dir/${OSrev}/sgi/bsd.rd
cp ${.OBJDIR}/boot ${.OBJDIR}/cd-dir/boot
umount ${.OBJDIR}/cd-dir
@df /dev/svnd0a
vnconfig -u svnd0
dd if=/dev/zero of=${.OBJDIR}/${CDROM} bs=1m count=10
vnconfig -v -c svnd0 ${.OBJDIR}/${CDROM}
# would love to use -h 64, but boot is slightly too big
/usr/mdec/sgivol -i -h 88 svnd0 > ${.OBJDIR}/volhdr
/usr/mdec/sgivol -w boot ${.OBJDIR}/boot svnd0
/usr/mdec/sgivol -l boot sashARCS svnd0
vnconfig -u svnd0
dd if=${.OBJDIR}/${FFS} of=${.OBJDIR}/${CDROM} bs=512 \
seek=`cat ${.OBJDIR}/volhdr | grep 'Volume Header' | awk '{print $$3}'`
install:
cp ${CDROM} ${DESTDIR}/snapshot
unconfig:
-umount /mnt
-umount ${.OBJDIR}/cd-dir
-vnconfig -u svnd0
clean cleandir:
/bin/rm -f ${CDROM} ${CDROM2} ${FFS} volhdr bsd boot
rm -rf cd-dir
.include <bsd.obj.mk>
.include <bsd.subdir.mk>
|