Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/sysinst Add a dummy sysinst architecture for ports ...



details:   https://anonhg.NetBSD.org/src/rev/b3a70a39091f
branches:  trunk
changeset: 797766:b3a70a39091f
user:      dholland <dholland%NetBSD.org@localhost>
date:      Sat Jul 26 19:56:30 2014 +0000

description:
Add a dummy sysinst architecture for ports that don't have their own yet.

This makes the presence of sysinst in /usr/sbin MI (as intended) --
remember that one of the goals is for sysinst to be able to install
chroots, and installing a chroot is a sensible operation on all ports,
even those for which an installer per se might not make sense.

Currently this dummy architecture fails instead of doing anything, but
as they say, one thing at a time.

diffstat:

 usr.sbin/sysinst/Makefile             |   16 ++++-
 usr.sbin/sysinst/arch/dummy/Makefile  |    8 ++
 usr.sbin/sysinst/arch/dummy/md.c      |  115 ++++++++++++++++++++++++++++++++++
 usr.sbin/sysinst/arch/dummy/md.h      |   35 ++++++++++
 usr.sbin/sysinst/arch/dummy/msg.md.de |    9 ++
 usr.sbin/sysinst/arch/dummy/msg.md.en |    9 ++
 usr.sbin/sysinst/arch/dummy/msg.md.es |    9 ++
 usr.sbin/sysinst/arch/dummy/msg.md.fr |    9 ++
 usr.sbin/sysinst/arch/dummy/msg.md.pl |    9 ++
 9 files changed, 217 insertions(+), 2 deletions(-)

diffs (269 lines):

diff -r a53fd0c8a63c -r b3a70a39091f usr.sbin/sysinst/Makefile
--- a/usr.sbin/sysinst/Makefile Sat Jul 26 19:35:59 2014 +0000
+++ b/usr.sbin/sysinst/Makefile Sat Jul 26 19:56:30 2014 +0000
@@ -1,9 +1,14 @@
-#      $NetBSD: Makefile,v 1.1 2014/07/26 19:30:44 dholland Exp $
+#      $NetBSD: Makefile,v 1.2 2014/07/26 19:56:30 dholland Exp $
 #
 # sysinst is usually built when the crunched install binary is built,
 # but can be built here as a normal program for testing.
 
-SUBDIR = arch/${MACHINE}
+.if exists(arch/${MACHINE})
+SUBDIR+=arch/${MACHINE}
+.else
+SUBDIR+=arch/dummy
+.endif
+
 
 .if ALL_MACHINES
 
@@ -49,6 +54,13 @@
 SUBDIR += arch/zaurus
 
 # XXX notyet SUBDIR += arch/iyonix
+
+# These dirs are present in sys/arch but not here:
+#    amigappc cesfic dreamcast epoc32 evbsh3 ia64 ibmnws iyonix luna68k
+#    mmeye mvmeppc netwinder next68k rs6000 sbmips sun2 sun3
+# (also evbsh5, but it doesn't really exist)
+SUBDIR += arch/dummy
+
 .endif
 
 install:
diff -r a53fd0c8a63c -r b3a70a39091f usr.sbin/sysinst/arch/dummy/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.sbin/sysinst/arch/dummy/Makefile      Sat Jul 26 19:56:30 2014 +0000
@@ -0,0 +1,8 @@
+#      $NetBSD: Makefile,v 1.1 2014/07/26 19:56:30 dholland Exp $
+#
+# Makefile for dummy architecture
+#
+
+MENUS_MD=
+
+.include "../../Makefile.inc"
diff -r a53fd0c8a63c -r b3a70a39091f usr.sbin/sysinst/arch/dummy/md.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.sbin/sysinst/arch/dummy/md.c  Sat Jul 26 19:56:30 2014 +0000
@@ -0,0 +1,115 @@
+/*     $NetBSD: md.c,v 1.1 2014/07/26 19:56:30 dholland Exp $  */
+
+/*
+ * Copyright 1997 Piermont Information Systems Inc.
+ * All rights reserved.
+ *
+ * Based on code written by Philip A. Nelson for Piermont Information
+ * Systems Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of Piermont Information Systems Inc. may not be used to endorse
+ *    or promote products derived from this software without specific prior
+ *    written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <err.h>
+
+#include "defs.h"
+#include "md.h"
+
+void
+md_init(void)
+{
+       errx(1, "sysinst has not been properly ported to this platform");
+}
+
+void
+md_init_set_status(int flags)
+{
+       (void)flags;
+}
+
+int
+md_get_info(void)
+{
+       return 1;
+}
+
+int
+md_make_bsd_partitions(void)
+{
+       return make_bsd_partitions();
+}
+
+int
+md_check_partitions(void)
+{
+       return 1;
+}
+
+int
+md_pre_disklabel(void)
+{
+       return 0;
+}
+
+int
+md_post_disklabel(void)
+{
+       return 0;
+}
+
+int
+md_post_newfs(void)
+{
+       return 0;
+}
+
+int
+md_post_extract(void)
+{
+       return 0;
+}
+
+void
+md_cleanup_install(void)
+{
+}
+
+int
+md_pre_update(void)
+{
+       return 1;
+}
+
+int
+md_update(void)
+{
+       return 1;
+}
+
+int
+md_pre_mount(void)
+{
+       return 0;
+}
diff -r a53fd0c8a63c -r b3a70a39091f usr.sbin/sysinst/arch/dummy/md.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.sbin/sysinst/arch/dummy/md.h  Sat Jul 26 19:56:30 2014 +0000
@@ -0,0 +1,35 @@
+/*     $NetBSD: md.h,v 1.1 2014/07/26 19:56:30 dholland Exp $  */
+
+/*
+ * Copyright 1997 Piermont Information Systems Inc.
+ * All rights reserved.
+ *
+ * Based on code written by Philip A. Nelson for Piermont Information
+ * Systems Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of Piermont Information Systems Inc. may not be used to endorse
+ *    or promote products derived from this software without specific prior
+ *    written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#define XNEEDMB                100
diff -r a53fd0c8a63c -r b3a70a39091f usr.sbin/sysinst/arch/dummy/msg.md.de
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.sbin/sysinst/arch/dummy/msg.md.de     Sat Jul 26 19:56:30 2014 +0000
@@ -0,0 +1,9 @@
+/*     $NetBSD: msg.md.de,v 1.1 2014/07/26 19:56:30 dholland Exp $     */
+
+message md_hello
+{
+}
+
+message md_may_remove_boot_medium
+{
+}
diff -r a53fd0c8a63c -r b3a70a39091f usr.sbin/sysinst/arch/dummy/msg.md.en
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.sbin/sysinst/arch/dummy/msg.md.en     Sat Jul 26 19:56:30 2014 +0000
@@ -0,0 +1,9 @@
+/*     $NetBSD: msg.md.en,v 1.1 2014/07/26 19:56:30 dholland Exp $     */
+
+message md_hello
+{
+}
+
+message md_may_remove_boot_medium
+{
+}
diff -r a53fd0c8a63c -r b3a70a39091f usr.sbin/sysinst/arch/dummy/msg.md.es
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.sbin/sysinst/arch/dummy/msg.md.es     Sat Jul 26 19:56:30 2014 +0000
@@ -0,0 +1,9 @@
+/*     $NetBSD: msg.md.es,v 1.1 2014/07/26 19:56:30 dholland Exp $     */
+
+message md_hello
+{
+}
+
+message md_may_remove_boot_medium
+{
+}
diff -r a53fd0c8a63c -r b3a70a39091f usr.sbin/sysinst/arch/dummy/msg.md.fr
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.sbin/sysinst/arch/dummy/msg.md.fr     Sat Jul 26 19:56:30 2014 +0000
@@ -0,0 +1,9 @@
+/*     $NetBSD: msg.md.fr,v 1.1 2014/07/26 19:56:30 dholland Exp $     */
+
+message md_hello
+{
+}
+
+message md_may_remove_boot_medium
+{
+}
diff -r a53fd0c8a63c -r b3a70a39091f usr.sbin/sysinst/arch/dummy/msg.md.pl
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.sbin/sysinst/arch/dummy/msg.md.pl     Sat Jul 26 19:56:30 2014 +0000
@@ -0,0 +1,9 @@
+/*     $NetBSD: msg.md.pl,v 1.1 2014/07/26 19:56:30 dholland Exp $     */
+
+message md_hello
+{
+}
+
+message md_may_remove_boot_medium
+{
+}



Home | Main Index | Thread Index | Old Index