summaryrefslogtreecommitdiff
path: root/distrib/octeon
diff options
context:
space:
mode:
Diffstat (limited to 'distrib/octeon')
-rw-r--r--distrib/octeon/boot/Makefile65
-rw-r--r--distrib/octeon/boot/list9
2 files changed, 74 insertions, 0 deletions
diff --git a/distrib/octeon/boot/Makefile b/distrib/octeon/boot/Makefile
new file mode 100644
index 00000000000..9d9e619bb65
--- /dev/null
+++ b/distrib/octeon/boot/Makefile
@@ -0,0 +1,65 @@
+# $OpenBSD: Makefile,v 1.1 2019/07/17 14:36:32 visa Exp $
+
+FS= miniroot${OSrev}.fs
+FSSIZE= 24576
+FSDISKTYPE= miniroot
+MOUNT_POINT= /mnt
+MTREE= ${UTILS}/mtree.conf
+RAMDISK= BOOT
+
+LISTS= ${.CURDIR}/list
+UTILS= ${.CURDIR}/../../miniroot
+
+MRDISKTYPE= rdroot
+MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096
+
+all: bsd.rd
+
+bsd.rd: mr.fs bsd
+ cp bsd bsd.rd
+ rdsetroot bsd.rd mr.fs
+
+bsd:
+ cd ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK} && \
+ su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE}'
+ cp -p ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK}/obj/bsd bsd
+
+mr.fs: rdboot
+ rm -rf $@.d
+ install -d -o root -g wheel $@.d
+ mtree -def ${MTREE} -p $@.d -u
+ CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} OSrev=${OSrev} \
+ TARGDIR=$@.d UTILS=${UTILS} RELEASEDIR=${RELEASEDIR} \
+ sh ${UTILS}/runlist.sh ${LISTS}
+ makefs ${MRMAKEFSARGS} $@ $@.d
+
+instbin.mk instbin.cache instbin.c: instbin.conf
+ crunchgen -E -M -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib \
+ -c instbin.c -e instbin -m instbin.mk instbin.conf
+
+instbin: instbin.mk instbin.cache instbin.c
+ ${MAKE} -f instbin.mk SRCLIBDIR=${.CURDIR}/../../../lib all
+
+instbin.conf: ${LISTS}
+ awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf
+
+rdboot:
+ cp -p ${.CURDIR}/../../../sys/arch/${MACHINE}/stand/rdboot/obj/rdboot rdboot
+ strip rdboot
+
+unconfig:
+ -umount -f ${MOUNT_POINT}
+ -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd
+
+.ifdef RELEASEDIR
+install:
+ cp bsd.rd ${RELEASEDIR}/boot
+ chmod a+r ${RELEASEDIR}/boot
+.endif
+
+clean cleandir:
+ rm -f *.core mr.fs instbin instbin.mk instbin.cache \
+ lib*.a lib*.olist instbin.map *.o *.lo *.c bsd bsd.rd rdboot
+ rm -rf cd-dir mr.fs.d
+
+.include <bsd.obj.mk>
diff --git a/distrib/octeon/boot/list b/distrib/octeon/boot/list
new file mode 100644
index 00000000000..8bc8325c46e
--- /dev/null
+++ b/distrib/octeon/boot/list
@@ -0,0 +1,9 @@
+# $OpenBSD: list,v 1.1 2019/07/17 14:36:32 visa Exp $
+
+SRCDIRS distrib/special
+
+COPY ${OBJDIR}/rdboot sbin/init
+
+# copy the MAKEDEV script and make some devices
+SCRIPT ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV
+SPECIAL cd dev; sh MAKEDEV boot