Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib first cut of sysinst for hpcmips.
details: https://anonhg.NetBSD.org/src/rev/5711c195a918
branches: trunk
changeset: 480826:5711c195a918
user: shin <shin%NetBSD.org@localhost>
date: Fri Jan 21 11:25:58 2000 +0000
description:
first cut of sysinst for hpcmips.
based on i386 version.
diffstat:
distrib/hpcmips/miniroot/dot.profile | 81 ++-
distrib/hpcmips/miniroot/list | 15 +-
distrib/hpcmips/miniroot/termcap.vt100 | 29 +
distrib/utils/sysinst/arch/hpcmips/Makefile | 16 +
distrib/utils/sysinst/arch/hpcmips/mbr_buf.s | 6 +
distrib/utils/sysinst/arch/hpcmips/md.c | 633 +++++++++++++++++++++++++
distrib/utils/sysinst/arch/hpcmips/md.h | 167 ++++++
distrib/utils/sysinst/arch/hpcmips/menus.md.en | 330 +++++++++++++
distrib/utils/sysinst/arch/hpcmips/menus.md.fr | 327 ++++++++++++
distrib/utils/sysinst/arch/hpcmips/msg.md.en | 287 +++++++++++
distrib/utils/sysinst/arch/hpcmips/msg.md.fr | 290 +++++++++++
11 files changed, 2160 insertions(+), 21 deletions(-)
diffs (truncated from 2267 to 300 lines):
diff -r 3a8b3c164ccb -r 5711c195a918 distrib/hpcmips/miniroot/dot.profile
--- a/distrib/hpcmips/miniroot/dot.profile Fri Jan 21 11:23:01 2000 +0000
+++ b/distrib/hpcmips/miniroot/dot.profile Fri Jan 21 11:25:58 2000 +0000
@@ -1,20 +1,71 @@
-# $NetBSD: dot.profile,v 1.1.1.1 1999/09/16 12:18:27 takemura Exp $
+# $NetBSD: dot.profile,v 1.2 2000/01/21 11:25:58 shin Exp $
+#
+# Copyright (c) 1994 Christopher G. Demetriou
+# Copyright (c) 1997 Perry E. Metzger
+# All rights reserved.
+#
+# 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 by Christopher G. Demetriou.
+# 4. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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.
+#
+
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
export PATH
+TERM=vt100
+export TERM
+HOME=/
+export HOME
+BLOCKSIZE=1k
+export BLOCKSIZE
+EDITOR=ed
+export EDITOR
- # get the terminal type
- _loop=""
- while [ "X${_loop}" = X"" ]; do
- echo "" >& 2
- echo "Setting terminal type. Options:" >& 2
- echo " rcons for graphics console" >& 2
- echo " vt100 for dumb serial terminal" >& 2
- echo " xterm for xterm." >& 2
- echo "" >& 2
- eval `tset -s -m ":?$TERM"`
- if [ "X${TERM}" != X"unknown" ]; then
- _loop="done"
- fi
- done
+umask 022
+
+ROOTDEV=/dev/md0
+
+if [ "X${DONEPROFILE}" = "X" ]; then
+ DONEPROFILE=YES
+ export DONEPROFILE
+
+ # set up some sane defaults
+ echo 'erase ^?, werase ^W, kill ^U, intr ^C'
+ stty newcrt werase ^W intr ^C kill ^U erase ^? 9600
+ echo ''
+ # mount the ramdisk read write
+ mount -u $ROOTDEV /
+
+ # mount the kern_fs so that we can examine the dmesg state
+ mount -t kernfs /kern /kern
+
+ # pull in the functions that people will use from the shell prompt.
+ # . /.commonutils
+ # . /.instutils
+ dmesg() cat /kern/msgbuf
+ grep() sed -n "/$1/p"
+
+ # run the installation or upgrade script.
sysinst
+fi
diff -r 3a8b3c164ccb -r 5711c195a918 distrib/hpcmips/miniroot/list
--- a/distrib/hpcmips/miniroot/list Fri Jan 21 11:23:01 2000 +0000
+++ b/distrib/hpcmips/miniroot/list Fri Jan 21 11:25:58 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: list,v 1.2 1999/11/23 23:16:06 simonb Exp $
+# $NetBSD: list,v 1.3 2000/01/21 11:25:59 shin Exp $
# hpcmips extra's: mountpoint for kernfs
SPECIAL mkdir kern
@@ -11,6 +11,7 @@
# extras in sbin
LINK instbin sbin/disklabel
+LINK instbin sbin/fdisk
LINK instbin sbin/mount_ext2fs
LINK instbin sbin/fsck_ext2fs
LINK instbin sbin/mount_kernfs
@@ -49,7 +50,7 @@
# crunchgen source directory specials: progs built in nonstandard places
CRUNCHSPECIAL vi srcdir usr.bin/vi/build
-
+CRUNCHSPECIAL sysinst srcdir distrib/utils/sysinst/arch/hpcmips
# Minimize use of MFS
@@ -68,15 +69,17 @@
# the zoneinfo (dont use)
#COPYDIR ${DESTDIR}/usr/share/zoneinfo usr/share/zoneinfo
-# a subset termcap file
-COPY ${ARCHDIR}/termcap.rcons usr/share/misc/termcap
+# and the termcap file
+COPY ${CURDIR}/../hpcmips/miniroot/termcap.vt100 usr/share/misc/termcap
# copy the kernel(s)
-COPY ${CURDIR}/../../sys/arch/hpcmips/compile/GENERIC/netbsd netbsd
+#COPY ${CURDIR}/../../sys/arch/hpcmips/compile/GENERIC/netbsd netbsd
# various files that we need in /etc for the install
#COPY ${DESTDIR}/etc/disktab etc/disktab.shadow
+COPY ${DESTDIR}/etc/spwd.db etc/spwd.db
+LINK etc/spwd.db etc/pwd.db
#SYMLINK /tmp/disktab.shadow etc/disktab
#SYMLINK /tmp/fstab.shadow etc/fstab
#SYMLINK /tmp/resolv.conf.shadow etc/resolv.conf
@@ -87,7 +90,7 @@
# and the installation tools
COPY ${ARCHDIR}/dot.profile .profile
-#LINK instbin sbin/sysinst
+LINK instbin sbin/sysinst
# and a spare .profile
COPY ${DESTDIR}/.profile tmp/.hdprofile
diff -r 3a8b3c164ccb -r 5711c195a918 distrib/hpcmips/miniroot/termcap.vt100
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/hpcmips/miniroot/termcap.vt100 Fri Jan 21 11:25:58 2000 +0000
@@ -0,0 +1,29 @@
+# $NetBSD: termcap.vt100,v 1.1 2000/01/21 11:25:59 shin Exp $
+#
+# termcap for vt100 console(wscons)
+# From:
+######## TERMINAL TYPE DESCRIPTIONS SOURCE FILE
+#
+# Version 9.13.25
+# termcap syntax
+#
+# Eric S. Raymond (current maintainer)
+# John Kunze, Berkeley
+# Craig Leres, Berkeley
+#
+vt100|vt100-am|dec vt100 (w/advanced video):\
+ :am:bs:ms:xn:xo:\
+ :co#80:it#8:li#24:vt#3:\
+ :@8=\EOM:DO=\E[%dB:K1=\EOq:K2=\EOr:K3=\EOs:K4=\EOp:K5=\EOn:\
+ :LE=\E[%dD:RA=\E[?7l:RI=\E[%dC:SA=\E[?7h:UP=\E[%dA:\
+ :ac=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~:\
+ :ae=\E(B:as=\E(0:bl=^G:cb=\E[1K:cd=\E[J:ce=\E[K:cl=\E[H\E[J:\
+ :cm=\E[%i%d;%dH:cr=^M:cs=\E[%i%d;%dr:ct=\E[3g:do=^J:\
+ :eA=\E(B:ho=\E[H:k0=\EOy:k1=\EOP:k2=\EOQ:k3=\EOR:\
+ :k4=\EOS:k5=\EOt:k6=\EOu:k7=\EOv:k8=\EOl:k9=\EOw:k;=\EOx:\
+ :kb=^H:kd=\EOB:ke=\E[?1l\E>:kl=\EOD:kr=\EOC:ks=\E[?1h\E=:\
+ :ku=\EOA:le=^H:mb=\E[5m:md=\E[1m:me=\E[m\017:mr=\E[7m:\
+ :nd=\E[C:r2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:rc=\E8:\
+ :..sa=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;:\
+ :sc=\E7:se=\E[m:sf=^J:so=\E[7m:sr=\EM:st=\EH:ta=^I:ue=\E[m:\
+ :up=\E[A:us=\E[4m:
diff -r 3a8b3c164ccb -r 5711c195a918 distrib/utils/sysinst/arch/hpcmips/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/utils/sysinst/arch/hpcmips/Makefile Fri Jan 21 11:25:58 2000 +0000
@@ -0,0 +1,16 @@
+# $NetBSD: Makefile,v 1.1 2000/01/21 11:25:59 shin Exp $
+#
+# Makefile for i386
+#
+
+# have to have all of them here for crunch ...
+
+SRCS= menu_defs.c msg_defs.c main.c install.c upgrade.c \
+ txtwalk.c run.c factor.c net.c disks.c util.c geom.c \
+ label.c target.c md.c mbr.c mbr_buf.s
+
+fdisk.o md.o: menu_defs.h msg_defs.h
+
+.include "../../Makefile.inc"
+
+CPPFLAGS+=-DINET6
diff -r 3a8b3c164ccb -r 5711c195a918 distrib/utils/sysinst/arch/hpcmips/mbr_buf.s
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/utils/sysinst/arch/hpcmips/mbr_buf.s Fri Jan 21 11:25:58 2000 +0000
@@ -0,0 +1,6 @@
+ .abicalls
+ .bss
+ .align 2
+ .space 2
+ .globl mbr
+mbr: .space 512
diff -r 3a8b3c164ccb -r 5711c195a918 distrib/utils/sysinst/arch/hpcmips/md.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/utils/sysinst/arch/hpcmips/md.c Fri Jan 21 11:25:58 2000 +0000
@@ -0,0 +1,633 @@
+/* $NetBSD: md.c,v 1.1 2000/01/21 11:26:00 shin 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.
+ *
+ * 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 -- Machine specific code for i386 */
+
+#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"
+
+int mbr_present, mbr_len;
+int c1024_resp;
+struct disklist *disklist = NULL;
+struct nativedisk_info *nativedisk;
+struct biosdisk_info *biosdisk = NULL;
+int netbsd_mbr_installed = 0;
+int netbsd_bootsel_installed = 0;
+
+static int md_read_bootcode __P((char *, char *, size_t));
+static int count_mbr_parts __P((struct mbr_partition *));
+static int mbr_part_above_chs __P((struct mbr_partition *));
+static int mbr_partstart_above_chs __P((struct mbr_partition *));
+static void configure_bootsel __P((void));
+static void md_upgrade_mbrtype __P((void));
+
+struct mbr_bootsel *mbs;
+int defbootselpart, defbootseldisk;
+
+static struct mbr_partition mbr_buf[NMBRPART];
+
+/* prototypes */
+
+
+int
+md_get_info()
+{
+ read_mbr(diskdev, mbr, MBR_SECSIZE);
+ if (!valid_mbr(mbr)) {
+ memset(&mbr[MBR_PARTOFF], 0,
+ NMBRPART * sizeof (struct mbr_partition));
+ /* XXX check result and give up if < 0 */
+ *((u_int16_t *)&mbr[MBR_MAGICOFF]) = le_to_native16(MBR_MAGIC);
+ netbsd_mbr_installed = 1;
+ } else
+ mbr_len = MBR_SECSIZE;
Home |
Main Index |
Thread Index |
Old Index