Source-Changes-HG archive

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

[src/trunk]: src/distrib/mac68k NetBSD/mac68k installation kernel for use wit...



details:   https://anonhg.NetBSD.org/src/rev/a75da4993717
branches:  trunk
changeset: 467600:a75da4993717
user:      ender <ender%NetBSD.org@localhost>
date:      Fri Mar 26 08:34:36 1999 +0000

description:
NetBSD/mac68k installation kernel for use with sysinst.
Based on NetBSD/alpha instkernel.

diffstat:

 distrib/mac68k/Makefile                              |   5 +
 distrib/mac68k/instkernel/Makefile                   |   5 +
 distrib/mac68k/instkernel/Makefile.inc               |   4 +
 distrib/mac68k/instkernel/instkernel/Makefile        |  19 ++++
 distrib/mac68k/instkernel/ramdisk/Makefile           |  54 ++++++++++++
 distrib/mac68k/instkernel/ramdisk/disktab.preinstall |  31 ++++++
 distrib/mac68k/instkernel/ramdisk/dot.hdprofile      |  58 ++++++++++++
 distrib/mac68k/instkernel/ramdisk/dot.profile        |  66 ++++++++++++++
 distrib/mac68k/instkernel/ramdisk/list               |  90 ++++++++++++++++++++
 distrib/mac68k/instkernel/ramdisk/mtree.conf         |  72 ++++++++++++++++
 distrib/mac68k/instkernel/ramdisk/ramdiskbin.conf    |  34 +++++++
 distrib/mac68k/instkernel/src/list2sh.awk            |  55 ++++++++++++
 distrib/mac68k/instkernel/src/runlist.sh             |  13 ++
 13 files changed, 506 insertions(+), 0 deletions(-)

diffs (truncated from 558 to 300 lines):

diff -r 4bde7dbc4730 -r a75da4993717 distrib/mac68k/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/mac68k/Makefile   Fri Mar 26 08:34:36 1999 +0000
@@ -0,0 +1,5 @@
+#      $NetBSD: Makefile,v 1.3 1999/03/26 08:34:36 ender Exp $
+
+SUBDIR=        instkernel miniroot
+
+.include <bsd.subdir.mk>
diff -r 4bde7dbc4730 -r a75da4993717 distrib/mac68k/instkernel/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/mac68k/instkernel/Makefile        Fri Mar 26 08:34:36 1999 +0000
@@ -0,0 +1,5 @@
+#      $NetBSD: Makefile,v 1.1 1999/03/26 08:34:37 ender Exp $
+
+SUBDIR=        ramdisk instkernel 
+
+.include <bsd.subdir.mk>
diff -r 4bde7dbc4730 -r a75da4993717 distrib/mac68k/instkernel/Makefile.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/mac68k/instkernel/Makefile.inc    Fri Mar 26 08:34:36 1999 +0000
@@ -0,0 +1,4 @@
+#      $NetBSD: Makefile.inc,v 1.1 1999/03/26 08:34:37 ender Exp $
+
+REV!=sh ${BSDSRCDIR}/sys/conf/osrelease.sh -s
+VER!=sh ${BSDSRCDIR}/sys/conf/osrelease.sh
diff -r 4bde7dbc4730 -r a75da4993717 distrib/mac68k/instkernel/instkernel/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/mac68k/instkernel/instkernel/Makefile     Fri Mar 26 08:34:36 1999 +0000
@@ -0,0 +1,19 @@
+#      $NetBSD: Makefile,v 1.1 1999/03/26 08:34:37 ender Exp $
+
+RAMDISK!=cd ${.CURDIR}/../ramdisk; \
+       printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/ramdisk.fs\n" | \
+       ${MAKE} -s -f-
+
+KERNEL=${BSDSRCDIR}/sys/arch/mac68k/compile/INSTALL/netbsd
+
+all:
+       cp ${KERNEL} netbsd
+       mdsetimage -T 0x0 -v netbsd ${RAMDISK}
+       strip netbsd
+       gzip -f netbsd
+
+clean cleandir distclean:
+       rm -f netbsd
+
+.include <bsd.own.mk>
+.include <bsd.obj.mk>
diff -r 4bde7dbc4730 -r a75da4993717 distrib/mac68k/instkernel/ramdisk/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/mac68k/instkernel/ramdisk/Makefile        Fri Mar 26 08:34:36 1999 +0000
@@ -0,0 +1,54 @@
+#      $NetBSD: Makefile,v 1.1 1999/03/26 08:34:37 ender Exp $
+
+TOP=           ${.CURDIR}/..
+
+.include "${TOP}/Makefile.inc"
+IMAGE=         ramdisk.fs
+
+CBIN=          ramdiskbin
+
+MOUNT_POINT?=  /mnt
+# DEV/RDEV file system device, CDEV/RDEV vnconfig device
+VND?=          vnd0
+VND_DEV=       /dev/${VND}a
+VND_RDEV=      /dev/r${VND}a
+VND_CDEV=      /dev/${VND}c
+VND_CRDEV=     /dev/r${VND}c
+IMAGE?=                xxx.fs
+
+LISTS=         list
+CRUNCHCONF=    ${CBIN}.conf
+MTREE=         mtree.conf
+
+all: ${CBIN} 
+       dd if=/dev/zero of=${IMAGE} count=5120
+       vnconfig -v -c ${VND_CDEV} ${IMAGE}
+#      disklabel -rw ${VND_CDEV} ${DISKTYPE}
+       newfs -m 0 -o space -i 5120 ${VND_RDEV}
+       mount ${VND_DEV} ${MOUNT_POINT}
+       mtree -def ${.CURDIR}/${MTREE} -p ${MOUNT_POINT}/ -u
+       TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
+           TARGDIR=${MOUNT_POINT} sh ${TOP}/src/runlist.sh ${.CURDIR}/${LISTS}
+       @echo ""
+       @df -i ${MOUNT_POINT}
+       @echo ""
+       umount ${MOUNT_POINT}
+       vnconfig -u ${VND_CDEV}
+
+unconfig:
+       -umount -f ${MOUNT_POINT}
+       -vnconfig -u ${VND_DEV}
+       -/bin/rm -f ${IMAGE}
+
+${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
+       crunchgen -D ${TOP}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC}
+
+${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
+       make -f ${CBIN}.mk all
+
+clean cleandir distclean:
+       /bin/rm -f *.core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache *.o *.lo *.c
+
+.include <bsd.own.mk>
+.include <bsd.obj.mk>
+.include <bsd.subdir.mk>
diff -r 4bde7dbc4730 -r a75da4993717 distrib/mac68k/instkernel/ramdisk/disktab.preinstall
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/mac68k/instkernel/ramdisk/disktab.preinstall      Fri Mar 26 08:34:36 1999 +0000
@@ -0,0 +1,31 @@
+#      $NetBSD: disktab.preinstall,v 1.1 1999/03/26 08:34:37 ender Exp $
+#
+# Disk geometry and partition layout tables. 
+# Key:
+#      dt      controller type
+#      ty      type of disk (fixed, removeable, simulated)
+#      d[0-4]  drive-type-dependent parameters
+#      ns      #sectors/track
+#      nt      #tracks/cylinder
+#      nc      #cylinders/disk
+#      sc      #sectors/cylinder, nc*nt default
+#      su      #sectors/unit, sc*nc default
+#      se      sector size, DEV_BSIZE default
+#      rm      rpm, 3600 default
+#      sf      supports bad144-style bad sector forwarding
+#      sk      sector skew per track, default 0
+#      cs      sector skew per cylinder, default 0
+#      hs      headswitch time, default 0
+#      ts      one-cylinder seek time, default 0
+#      il      sector interleave (n:1), 1 default
+#      bs      boot block size, default BBSIZE
+#      sb      superblock size, default SBSIZE
+#      o[a-h]  partition offsets in sectors
+#      p[a-h]  partition sizes in sectors
+#      b[a-h]  partition block sizes in bytes
+#      f[a-h]  partition fragment sizes in bytes
+#      t[a-h]  partition types (filesystem, swap, etc)
+#
+# All partition sizes reserve space for bad sector tables.
+# (5 cylinders needed for maintenance + replacement sectors)
+#
diff -r 4bde7dbc4730 -r a75da4993717 distrib/mac68k/instkernel/ramdisk/dot.hdprofile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/mac68k/instkernel/ramdisk/dot.hdprofile   Fri Mar 26 08:34:36 1999 +0000
@@ -0,0 +1,58 @@
+#      $NetBSD: dot.hdprofile,v 1.1 1999/03/26 08:34:37 ender Exp $
+#
+# Copyright (c) 1994 Christopher G. Demetriou
+# 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=vt220
+export TERM
+HOME=/
+export HOME
+
+umask 022
+
+if [ "X${DONEPROFILE}" = "X" ]; then
+       DONEPROFILE=YES
+
+       echo "Checking filesystems..."
+       fsck -y
+
+       echo "Mounting root..."
+       mount -u /
+
+       # set up some sane defaults
+       echo 'erase ^?, werase ^W, kill ^U, intr ^C'
+       stty newcrt werase ^W intr ^C kill ^U erase ^? 9600
+       echo ''
+
+       TERMCAP=/.termcap ; export TERMCAP
+
+       [ -x /sysinst ] && /sysinst
+fi
diff -r 4bde7dbc4730 -r a75da4993717 distrib/mac68k/instkernel/ramdisk/dot.profile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/mac68k/instkernel/ramdisk/dot.profile     Fri Mar 26 08:34:36 1999 +0000
@@ -0,0 +1,66 @@
+#      $NetBSD: dot.profile,v 1.1 1999/03/26 08:34:37 ender 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=vt220
+export TERM
+HOME=/
+export HOME
+
+umask 022
+
+ROOTDEV=/dev/md0a
+
+if [ "X${DONEPROFILE}" = "X" ]; then
+       DONEPROFILE=YES
+
+       # get the terminal type
+       eval `tset -s -m ":?$TERM"`
+
+       # set up some sane defaults
+       echo 'erase ^?, werase ^W, kill ^U, intr ^C'
+       stty newcrt werase ^W intr ^C kill ^U erase ^? 9600
+       echo ''
+
+       # run update, so that installed software is written as it goes.
+       update
+
+       # 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
+
+       # run the installation program
+       sysinst
+fi
diff -r 4bde7dbc4730 -r a75da4993717 distrib/mac68k/instkernel/ramdisk/list
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/mac68k/instkernel/ramdisk/list    Fri Mar 26 08:34:36 1999 +0000
@@ -0,0 +1,90 @@
+#      $NetBSD: list,v 1.1 1999/03/26 08:34:37 ender Exp $
+
+# copy the crunched binary, link to it, and kill it
+COPY   ${OBJDIR}/ramdiskbin            ramdiskbin
+LINK   ramdiskbin                      sysinst
+LINK   ramdiskbin                      bin/cat
+LINK   ramdiskbin                      bin/chmod
+LINK   ramdiskbin                      bin/cp
+LINK   ramdiskbin                      bin/dd
+LINK   ramdiskbin                      bin/df
+LINK   ramdiskbin                      bin/ed
+LINK   ramdiskbin                      bin/ln
+LINK   ramdiskbin                      bin/ls
+LINK   ramdiskbin                      bin/mkdir
+LINK   ramdiskbin                      bin/mt
+LINK   ramdiskbin                      bin/mv
+LINK   ramdiskbin                      bin/pax
+LINK   ramdiskbin                      bin/pwd
+LINK   ramdiskbin                      bin/rm
+LINK   ramdiskbin                      bin/sh
+LINK   ramdiskbin                      bin/stty
+LINK   ramdiskbin                      bin/sync



Home | Main Index | Thread Index | Old Index