summaryrefslogtreecommitdiffstats
path: root/usr.sbin/installboot
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2013-12-28 13:58:15 +0000
committerjsing <jsing@openbsd.org>2013-12-28 13:58:15 +0000
commitf06a109e0a08e85e2b04f39da790f50bcff018d4 (patch)
tree3b95b511f1a456be1e2fde2025f6153a82547723 /usr.sbin/installboot
parentAdd installboot support for vax. (diff)
downloadwireguard-openbsd-f06a109e0a08e85e2b04f39da790f50bcff018d4.tar.xz
wireguard-openbsd-f06a109e0a08e85e2b04f39da790f50bcff018d4.zip
Add installboot support for the remaining `disklabel -B' architectures
(hp300, hppa64 and landisk). hp300 and landisk are untested, however they should "just work" - hopefully someone with access to this hardware can confirm.
Diffstat (limited to 'usr.sbin/installboot')
-rw-r--r--usr.sbin/installboot/Makefile6
-rw-r--r--usr.sbin/installboot/hp300/Makefile.inc7
-rw-r--r--usr.sbin/installboot/hp300/hp300_installboot.c37
-rw-r--r--usr.sbin/installboot/hppa/hppa_installboot.c4
-rw-r--r--usr.sbin/installboot/hppa64/Makefile.inc7
-rw-r--r--usr.sbin/installboot/hppa64/hppa64_installboot.c37
-rw-r--r--usr.sbin/installboot/landisk/Makefile.inc7
-rw-r--r--usr.sbin/installboot/landisk/landisk_installboot.c38
8 files changed, 138 insertions, 5 deletions
diff --git a/usr.sbin/installboot/Makefile b/usr.sbin/installboot/Makefile
index f1462584f64..817cf9222d3 100644
--- a/usr.sbin/installboot/Makefile
+++ b/usr.sbin/installboot/Makefile
@@ -1,8 +1,10 @@
-# $OpenBSD: Makefile,v 1.5 2013/12/28 12:03:57 jsing Exp $
+# $OpenBSD: Makefile,v 1.6 2013/12/28 13:58:15 jsing Exp $
NOMAN=
-.if (${MACHINE} == "amd64" || ${MACHINE} == "hppa" || ${MACHINE} == "i386" || \
+.if (${MACHINE} == "amd64" || ${MACHINE} == "hp300" || \
+ ${MACHINE} == "hppa" || ${MACHINE} == "hppa64" || \
+ ${MACHINE} == "i386" || ${MACHINE} == "landisk" || \
${MACHINE} == "vax")
PROG= installboot
diff --git a/usr.sbin/installboot/hp300/Makefile.inc b/usr.sbin/installboot/hp300/Makefile.inc
new file mode 100644
index 00000000000..6d3868e9698
--- /dev/null
+++ b/usr.sbin/installboot/hp300/Makefile.inc
@@ -0,0 +1,7 @@
+# $OpenBSD: Makefile.inc,v 1.1 2013/12/28 13:58:15 jsing Exp $
+
+CPPFLAGS += -I${.CURDIR}/hp300
+CFLAGS += -DBOOTSTRAP
+
+.PATH: ${.CURDIR}/hp300
+SRCS += hp300_installboot.c
diff --git a/usr.sbin/installboot/hp300/hp300_installboot.c b/usr.sbin/installboot/hp300/hp300_installboot.c
new file mode 100644
index 00000000000..667e711f1ce
--- /dev/null
+++ b/usr.sbin/installboot/hp300/hp300_installboot.c
@@ -0,0 +1,37 @@
+/* $OpenBSD: hp300_installboot.c,v 1.1 2013/12/28 13:58:15 jsing Exp $ */
+
+/*
+ * Copyright (c) 2013 Joel Sing <jsing@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include "installboot.h"
+
+void
+md_init(void)
+{
+ stages = 1;
+ stage1 = "/usr/mdec/uboot.lif";
+}
+
+void
+md_loadboot(void)
+{
+}
+
+void
+md_installboot(int devfd, char *dev)
+{
+ bootstrap(devfd, dev, stage1);
+}
diff --git a/usr.sbin/installboot/hppa/hppa_installboot.c b/usr.sbin/installboot/hppa/hppa_installboot.c
index a37b9ee3654..9bbdd38d90c 100644
--- a/usr.sbin/installboot/hppa/hppa_installboot.c
+++ b/usr.sbin/installboot/hppa/hppa_installboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hppa_installboot.c,v 1.1 2013/12/27 14:23:49 jsing Exp $ */
+/* $OpenBSD: hppa_installboot.c,v 1.2 2013/12/28 13:58:15 jsing Exp $ */
/*
* Copyright (c) 2013 Joel Sing <jsing@openbsd.org>
@@ -16,8 +16,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <unistd.h>
-
#include "installboot.h"
void
diff --git a/usr.sbin/installboot/hppa64/Makefile.inc b/usr.sbin/installboot/hppa64/Makefile.inc
new file mode 100644
index 00000000000..229d2e9d92d
--- /dev/null
+++ b/usr.sbin/installboot/hppa64/Makefile.inc
@@ -0,0 +1,7 @@
+# $OpenBSD: Makefile.inc,v 1.1 2013/12/28 13:58:15 jsing Exp $
+
+CPPFLAGS += -I${.CURDIR}/hppa64
+CFLAGS += -DBOOTSTRAP
+
+.PATH: ${.CURDIR}/hppa64
+SRCS += hppa64_installboot.c
diff --git a/usr.sbin/installboot/hppa64/hppa64_installboot.c b/usr.sbin/installboot/hppa64/hppa64_installboot.c
new file mode 100644
index 00000000000..d5e0af4a087
--- /dev/null
+++ b/usr.sbin/installboot/hppa64/hppa64_installboot.c
@@ -0,0 +1,37 @@
+/* $OpenBSD: hppa64_installboot.c,v 1.1 2013/12/28 13:58:15 jsing Exp $ */
+
+/*
+ * Copyright (c) 2013 Joel Sing <jsing@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include "installboot.h"
+
+void
+md_init(void)
+{
+ stages = 1;
+ stage1 = "/usr/mdec/boot.lif";
+}
+
+void
+md_loadboot(void)
+{
+}
+
+void
+md_installboot(int devfd, char *dev)
+{
+ bootstrap(devfd, dev, stage1);
+}
diff --git a/usr.sbin/installboot/landisk/Makefile.inc b/usr.sbin/installboot/landisk/Makefile.inc
new file mode 100644
index 00000000000..a2e2938c47a
--- /dev/null
+++ b/usr.sbin/installboot/landisk/Makefile.inc
@@ -0,0 +1,7 @@
+# $OpenBSD: Makefile.inc,v 1.1 2013/12/28 13:58:15 jsing Exp $
+
+CPPFLAGS += -I${.CURDIR}/landisk
+CFLAGS += -DBOOTSTRAP
+
+.PATH: ${.CURDIR}/landisk
+SRCS += landisk_installboot.c
diff --git a/usr.sbin/installboot/landisk/landisk_installboot.c b/usr.sbin/installboot/landisk/landisk_installboot.c
new file mode 100644
index 00000000000..0862e750a4e
--- /dev/null
+++ b/usr.sbin/installboot/landisk/landisk_installboot.c
@@ -0,0 +1,38 @@
+/* $OpenBSD: landisk_installboot.c,v 1.1 2013/12/28 13:58:15 jsing Exp $ */
+
+/*
+ * Copyright (c) 2013 Joel Sing <jsing@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include "installboot.h"
+
+void
+md_init(void)
+{
+ stages = 2;
+ stage1 = "/usr/mdec/xxboot";
+ stage2 = "/boot";
+}
+
+void
+md_loadboot(void)
+{
+}
+
+void
+md_installboot(int devfd, char *dev)
+{
+ bootstrap(devfd, dev, stage1);
+}