summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-08-29 16:48:22 +0000
committerderaadt <deraadt@openbsd.org>2015-08-29 16:48:22 +0000
commit15267e6b6b86ab2877c8b07cd2a8773fee1dbac4 (patch)
tree8713028187cc6f393edd8a04d4aee2dca6088721
parentPortability: including <ohash.h> requires including <stdint.h> before. (diff)
downloadwireguard-openbsd-15267e6b6b86ab2877c8b07cd2a8773fee1dbac4.tar.xz
wireguard-openbsd-15267e6b6b86ab2877c8b07cd2a8773fee1dbac4.zip
create an alpha miniroot
(miod must fix the installboot in it next)
-rw-r--r--distrib/alpha/Makefile5
-rw-r--r--distrib/alpha/miniroot/Makefile64
2 files changed, 67 insertions, 2 deletions
diff --git a/distrib/alpha/Makefile b/distrib/alpha/Makefile
index 7cd14a61549..86a5b0c41da 100644
--- a/distrib/alpha/Makefile
+++ b/distrib/alpha/Makefile
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile,v 1.9 2013/03/09 17:25:23 deraadt Exp $
+# $OpenBSD: Makefile,v 1.10 2015/08/29 16:48:22 deraadt Exp $
-SUBDIR= bsd.rd floppy floppyB floppyC cdfs
+SUBDIR= bsd.rd miniroot floppy floppyB floppyC cdfs
.if make(obj) || make(cleandir) || make(clean)
SUBDIR+= iso
@@ -8,6 +8,7 @@ SUBDIR+= iso
unconfig:
cd bsd.rd; ${MAKE} unconfig
+ cd miniroot; ${MAKE} unconfig
cd floppy; ${MAKE} unconfig
cd floppyB; ${MAKE} unconfig
cd floppyC; ${MAKE} unconfig
diff --git a/distrib/alpha/miniroot/Makefile b/distrib/alpha/miniroot/Makefile
new file mode 100644
index 00000000000..d1450d6ccce
--- /dev/null
+++ b/distrib/alpha/miniroot/Makefile
@@ -0,0 +1,64 @@
+# $OpenBSD: Makefile,v 1.1 2015/08/29 16:52:41 deraadt Exp $
+
+TOP= ${.CURDIR}/..
+
+.include "${TOP}/Makefile.inc"
+
+TARGET=miniroot${REV}.fs
+
+.ifndef DESTDIR
+all ${TARGET}:
+ @echo setenv DESTDIR before making a ramdisk!
+ @false
+.else
+
+all: ${TARGET}
+
+${TARGET}: vn_up install_files installboot showit vn_down
+
+vn_up: blank_filesystem
+ vnconfig vnd0 ${TARGET}
+ disklabel -w vnd0 fakeramdisk
+ newfs -m 0 /dev/rvnd0a
+ mount /dev/vnd0a /mnt
+
+showit:
+ df -ki /mnt
+
+vn_down:
+ -umount /mnt
+ -vnconfig -u vnd0
+
+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/boot /mnt/boot
+
+installboot:
+ installboot -v vnd0
+
+blank_filesystem:
+ dd if=/dev/zero of=${TARGET} bs=512 count=5744
+
+.endif
+
+unconfig:
+ -umount -f /mnt
+ -vnconfig -u /dev/vnd0a
+
+.ifdef RELEASEDIR
+install:
+ cp ${TARGET} ${RELEASEDIR}
+.endif
+
+clean:
+ rm -f ${TARGET}
+
+.include <bsd.own.mk>
+.include <bsd.obj.mk>
+.include <bsd.subdir.mk>