Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib Add sysinst(8) for hpcsh.
details: https://anonhg.NetBSD.org/src/rev/293a2f9f0781
branches: trunk
changeset: 754540:293a2f9f0781
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Mon May 03 14:14:35 2010 +0000
description:
Add sysinst(8) for hpcsh.
Mostly taken from hpcsmips, but no non-English translations.
Tested on HPW-50PA.
diffstat:
distrib/hpcsh/miniroot/Makefile.inc | 10 +-
distrib/hpcsh/miniroot/dot.profile | 4 +-
distrib/hpcsh/miniroot/list | 11 +-
distrib/utils/sysinst/Makefile | 3 +-
distrib/utils/sysinst/arch/hpcsh/Makefile | 11 +
distrib/utils/sysinst/arch/hpcsh/md.c | 177 +++++++++++++++++++++++++++
distrib/utils/sysinst/arch/hpcsh/md.h | 76 +++++++++++
distrib/utils/sysinst/arch/hpcsh/menus.md.en | 40 ++++++
distrib/utils/sysinst/arch/hpcsh/msg.md.en | 50 +++++++
9 files changed, 365 insertions(+), 17 deletions(-)
diffs (truncated from 451 to 300 lines):
diff -r 8e8f90ce55ad -r 293a2f9f0781 distrib/hpcsh/miniroot/Makefile.inc
--- a/distrib/hpcsh/miniroot/Makefile.inc Mon May 03 12:58:09 2010 +0000
+++ b/distrib/hpcsh/miniroot/Makefile.inc Mon May 03 14:14:35 2010 +0000
@@ -1,12 +1,12 @@
-# $NetBSD: Makefile.inc,v 1.5 2010/02/11 09:06:48 roy Exp $
+# $NetBSD: Makefile.inc,v 1.6 2010/05/03 14:14:35 tsutsui Exp $
-DBG= -O
+WARNS= 1
+DBG= -Os
IMAGESIZE= 4m
MAKEFS_FLAGS= -o density=2k
IMAGEENDIAN= le
MAKEDEVTARGETS= all
-#LISTS+= ${DISTRIBDIR}/common/list.sysinst
+LISTS+= ${DISTRIBDIR}/common/list.sysinst.en
MTREECONF+= ${.CURDIR}/mtree.usr.install
-IMAGEDEPENDS+= ${ARCHDIR}/dot.profile \
- ${DESTDIR}/.profile ${DESTDIR}/etc/spwd.db
+IMAGEDEPENDS+= ${ARCHDIR}/dot.profile
diff -r 8e8f90ce55ad -r 293a2f9f0781 distrib/hpcsh/miniroot/dot.profile
--- a/distrib/hpcsh/miniroot/dot.profile Mon May 03 12:58:09 2010 +0000
+++ b/distrib/hpcsh/miniroot/dot.profile Mon May 03 14:14:35 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: dot.profile,v 1.3 2010/05/01 12:59:26 tsutsui Exp $
+# $NetBSD: dot.profile,v 1.4 2010/05/03 14:14:35 tsutsui Exp $
#
# Copyright (c) 1997 Perry E. Metzger
# Copyright (c) 1994 Christopher G. Demetriou
@@ -66,5 +66,5 @@
grep() sed -n "/$1/p"
# run the installation or upgrade script.
- # sysinst XXX
+ sysinst
fi
diff -r 8e8f90ce55ad -r 293a2f9f0781 distrib/hpcsh/miniroot/list
--- a/distrib/hpcsh/miniroot/list Mon May 03 12:58:09 2010 +0000
+++ b/distrib/hpcsh/miniroot/list Mon May 03 14:14:35 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: list,v 1.8 2010/05/01 12:18:44 tsutsui Exp $
+# $NetBSD: list,v 1.9 2010/05/03 14:14:35 tsutsui Exp $
# extras in bin
#PROG bin/csh
@@ -26,12 +26,5 @@
# Minimize use of MFS
SYMLINK /tmp var/tmp
-# various files that we need in /etc for the install
-COPY ${DESTDIR}/etc/spwd.db etc/spwd.db
-LINK etc/spwd.db etc/pwd.db
-
-# and the installation tools
+# files that we need the installation tools
COPY ${ARCHDIR}/dot.profile .profile
-
-# and a spare .profile
-COPY ${DESTDIR}/.profile tmp/.hdprofile
diff -r 8e8f90ce55ad -r 293a2f9f0781 distrib/utils/sysinst/Makefile
--- a/distrib/utils/sysinst/Makefile Mon May 03 12:58:09 2010 +0000
+++ b/distrib/utils/sysinst/Makefile Mon May 03 14:14:35 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2009/12/05 16:29:11 pooka Exp $
+# $NetBSD: Makefile,v 1.15 2010/05/03 14:14:35 tsutsui Exp $
#
# sysinst is usually built when the crunched install binary is built,
# but can be built here as a normal program for testing.
@@ -25,6 +25,7 @@
SUBDIR += arch/hp700
SUBDIR += arch/hpcarm
SUBDIR += arch/hpcmips
+SUBDIR += arch/hpcsh
SUBDIR += arch/i386
SUBDIR += arch/landisk
SUBDIR += arch/mac68k
diff -r 8e8f90ce55ad -r 293a2f9f0781 distrib/utils/sysinst/arch/hpcsh/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/utils/sysinst/arch/hpcsh/Makefile Mon May 03 14:14:35 2010 +0000
@@ -0,0 +1,11 @@
+# $NetBSD: Makefile,v 1.1 2010/05/03 14:14:35 tsutsui Exp $
+#
+# Makefile for hpcsh
+#
+
+MENUS_MD= menus.md.${SYSINSTLANG} menus.mbr
+MSG_MD= msg.md.${SYSINSTLANG} msg.mbr.${SYSINSTLANG}
+
+LANGUAGES= # no translations ready yet
+
+.include "../../Makefile.inc"
diff -r 8e8f90ce55ad -r 293a2f9f0781 distrib/utils/sysinst/arch/hpcsh/md.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/utils/sysinst/arch/hpcsh/md.c Mon May 03 14:14:35 2010 +0000
@@ -0,0 +1,177 @@
+/* $NetBSD: md.c,v 1.1 2010/05/03 14:14:35 tsutsui 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. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed for the NetBSD Project by
+ * Piermont Information Systems Inc.
+ * 4. 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.
+ */
+
+/* md.c -- hpcsh machine specific routines */
+
+#include <stdio.h>
+#include <util.h>
+#include <sys/param.h>
+#include <machine/cpu.h>
+#include <sys/sysctl.h>
+
+#include "defs.h"
+#include "md.h"
+#include "msg_defs.h"
+#include "menu_defs.h"
+#include "endian.h"
+#include "mbr.h"
+
+void
+md_init(void)
+{
+}
+
+void
+md_init_set_status(int minimal)
+{
+
+ (void)minimal;
+}
+
+int
+md_get_info(void)
+{
+
+ return set_bios_geom_with_mbr_guess();
+}
+
+/*
+ * md back-end code for menu-driven BSD disklabel editor.
+ */
+int
+md_make_bsd_partitions(void)
+{
+
+ return make_bsd_partitions();
+}
+
+/*
+ * any additional partition validation
+ */
+int
+md_check_partitions(void)
+{
+
+ return 1;
+}
+
+/*
+ * hook called before writing new disklabel.
+ */
+int
+md_pre_disklabel(void)
+{
+
+ msg_display(MSG_dofdisk);
+
+ /* write edited MBR onto disk. */
+ if (write_mbr(diskdev, &mbr, 1) != 0) {
+ msg_display(MSG_wmbrfail);
+ process_menu(MENU_ok, NULL);
+ return 1;
+ }
+ return 0;
+}
+
+/*
+ * hook called after writing disklabel to new target disk.
+ */
+int
+md_post_disklabel(void)
+{
+
+ return 0;
+}
+
+/*
+ * hook called after upgrade() or install() has finished setting
+ * up the target disk but immediately before the user is given the
+ * ``disks are now set up'' message.
+ */
+int
+md_post_newfs(void)
+{
+
+ return 0;
+}
+
+void
+md_cleanup_install(void)
+{
+
+#ifndef DEBUG
+ enable_rc_conf();
+#endif
+}
+
+int
+md_pre_update(void)
+{
+
+ return 1;
+}
+
+/* Upgrade support */
+int
+md_update(void)
+{
+
+ md_post_newfs();
+ return 1;
+}
+
+int
+md_post_extract(void)
+{
+
+ return 0;
+}
+
+int
+md_check_mbr(mbr_info_t *mbri)
+{
+
+ return 2;
+}
+
+int
+md_mbr_use_wholedisk(mbr_info_t *mbri)
+{
+
+ return mbr_use_wholedisk(mbri);
+}
diff -r 8e8f90ce55ad -r 293a2f9f0781 distrib/utils/sysinst/arch/hpcsh/md.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/utils/sysinst/arch/hpcsh/md.h Mon May 03 14:14:35 2010 +0000
@@ -0,0 +1,76 @@
+/* $NetBSD: md.h,v 1.1 2010/05/03 14:14:35 tsutsui Exp $ */
+
+/*
+ * Copyright 1997 Piermont Information Systems Inc.
+ * All rights reserved.
+ *
+ * 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. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed for the NetBSD Project by
+ * Piermont Information Systems Inc.
+ * 4. 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.
Home |
Main Index |
Thread Index |
Old Index