diff options
-rw-r--r-- | distrib/luna88k/Makefile | 5 | ||||
-rw-r--r-- | distrib/luna88k/Makefile.inc | 9 | ||||
-rw-r--r-- | distrib/luna88k/ramdisk/Makefile | 92 | ||||
-rw-r--r-- | distrib/luna88k/ramdisk/Makefile.inc | 44 | ||||
-rw-r--r-- | distrib/luna88k/ramdisk/install.md | 78 | ||||
-rw-r--r-- | distrib/luna88k/ramdisk/list | 76 | ||||
-rw-r--r-- | sys/arch/luna88k/conf/RAMDISK | 60 |
7 files changed, 364 insertions, 0 deletions
diff --git a/distrib/luna88k/Makefile b/distrib/luna88k/Makefile new file mode 100644 index 00000000000..3c9cba45eea --- /dev/null +++ b/distrib/luna88k/Makefile @@ -0,0 +1,5 @@ +# $OpenBSD: Makefile,v 1.1 2004/04/21 18:40:18 miod Exp $ + +SUBDIR=ramdisk + +.include <bsd.subdir.mk> diff --git a/distrib/luna88k/Makefile.inc b/distrib/luna88k/Makefile.inc new file mode 100644 index 00000000000..8eaf135052a --- /dev/null +++ b/distrib/luna88k/Makefile.inc @@ -0,0 +1,9 @@ +# $OpenBSD: Makefile.inc,v 1.1 2004/04/21 18:40:18 miod Exp $ + +REV=${OSrev} + +LDSTATIC=-static + +# Hack needed to find kernel images... +BSDSRCDIR?=/usr/src +SRCSYSDIR?=${BSDSRCDIR}/sys diff --git a/distrib/luna88k/ramdisk/Makefile b/distrib/luna88k/ramdisk/Makefile new file mode 100644 index 00000000000..d18165f41d1 --- /dev/null +++ b/distrib/luna88k/ramdisk/Makefile @@ -0,0 +1,92 @@ +# $OpenBSD: Makefile,v 1.1 2004/04/21 18:40:21 miod Exp $ + +TOP= ${.CURDIR}/.. + +.include "${TOP}/Makefile.inc" +BSD_RD= bsd.rd +IMAGE= mr.fs +CBIN?= instbin +LISTS= ${.CURDIR}/list +UTILS?= ${.CURDIR}/../../miniroot + +MOUNT_POINT= /mnt +MTREE= ${UTILS}/mtree.conf + +VND?= svnd0 +VND_DEV= /dev/${VND}a +VND_RDEV= /dev/r${VND}a +VND_CRDEV= /dev/r${VND}c +PID!= echo $$$$ + + +DISKTYPE= rdroot +NBLKS= 4096 +# minfree, opt, b/i trks, sects, cpg +NEWFSARGS= -t ffs -m 0 -o space -u 32 -c 16 + +all: ${BSD_RD} + +${BSD_RD}: ${CBIN} ${IMAGE} bsd rdsetroot + cp bsd ${BSD_RD} + ${.OBJDIR}/rdsetroot ${BSD_RD} < ${IMAGE} + +${IMAGE}: rd_setup do_files rd_teardown + +bsd: +.ifndef(NOBUILD) + cd ${.CURDIR}/../../../sys/arch/luna88k/conf && config RAMDISK + cd ${.CURDIR}/../../../sys/arch/luna88k/compile/RAMDISK && \ + make clean && make +.endif + cp ${.CURDIR}/../../../sys/arch/luna88k/compile/RAMDISK/bsd bsd + +rd_test: rd_setup rd_teardown + +rd_setup: + dd if=/dev/zero of=${IMAGE} bs=512 count=${NBLKS} + vnconfig -v -c ${VND} ${IMAGE} + disklabel -w -r ${VND} ${DISKTYPE} + newfs ${NEWFSARGS} ${VND_RDEV} + fsck ${VND_RDEV} + mount ${VND_DEV} ${MOUNT_POINT} + +rd_teardown: + @df -i ${MOUNT_POINT} + -umount ${MOUNT_POINT} + -vnconfig -u ${VND} + +rdsetroot: ${TOP}/../common/rdsetroot.c + ${HOSTCC} -DDEBUG -o rdsetroot ${TOP}/../common/rdsetroot.c + +unconfig: + -umount -f ${MOUNT_POINT} + -vnconfig -u ${VND} + +.PRECIOUS: ${IMAGE} + +install: + cp ${BSD_RD} ${DESTDIR}/snapshot/${BSD_RD} + +${CBIN}.conf: ${LISTS} + awk -f ${UTILS}/makeconf.awk CBIN=${CBIN} ${LISTS} > ${CBIN}.conf + +${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CBIN}.conf + crunchgen -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib ${CBIN}.conf + +${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c + make -f ${CBIN}.mk all + +do_files: + mtree -def ${MTREE} -p ${MOUNT_POINT}/ -u + TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \ + REV=${REV} TARGDIR=${MOUNT_POINT} UTILS=${UTILS} \ + sh ${UTILS}/runlist.sh ${LISTS} + rm ${MOUNT_POINT}/${CBIN} + +clean cleandir: + /bin/rm -f core ${IMAGE} ${CBIN} ${CBIN}.conf ${CBIN}.mk ${CBIN}.cache \ + *.o *.lo *.c bsd bsdmix bsdofw ${BSD_RD} \ + rdsetroot + +.include <bsd.obj.mk> +.include <bsd.subdir.mk> diff --git a/distrib/luna88k/ramdisk/Makefile.inc b/distrib/luna88k/ramdisk/Makefile.inc new file mode 100644 index 00000000000..75cb26964ce --- /dev/null +++ b/distrib/luna88k/ramdisk/Makefile.inc @@ -0,0 +1,44 @@ +# +# $OpenBSD: Makefile.inc,v 1.1 2004/04/21 18:40:21 miod Exp $ +# + +# TOP is assumed to be defined by Makefile including this one. + +CBIN?= instbin +LISTS= ${.CURDIR}/list +UTILS?= ${.CURDIR}/../../miniroot + +COMMONDIR= ${TOP}/ramdisk +MOUNT_POINT?= ${TOP}/${BASE}/fs + +CRUNCHCONF?= ${COMMONDIR}/${CBIN}.conf +MTREE= ${UTILS}/mtree.conf +RAWLABEL= + +${CBIN}.conf: ${LISTS} + awk -f ${UTILS}/makeconf.awk CBIN=${CBIN} ${LISTS} > ${CBIN}.conf + +${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CBIN}.conf + crunchgen -D ${BSDSRCDIR} -L ${DESTDIR}/usr/lib ${CBIN}.conf + +${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c + make -f ${CBIN}.mk all + +#${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF} +# crunchgen -D ${BSDSRCDIR} -L ${DESTDIR}/usr/lib ${CRUNCHCONF} + +#${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c +# make -f ${CBIN}.mk all + +do_files: + mtree -def ${MTREE} -p ${MOUNT_POINT}/ -u + TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \ + TARGDIR=${MOUNT_POINT} UTILS=${UTILS} \ + sh ${UTILS}/runlist.sh ${LISTS} + rm ${MOUNT_POINT}/${CBIN} + +clean cleandir: + /bin/rm -f core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache *.o *.lo *.c + +.include <bsd.obj.mk> +.include <bsd.subdir.mk> diff --git a/distrib/luna88k/ramdisk/install.md b/distrib/luna88k/ramdisk/install.md new file mode 100644 index 00000000000..95ba94c27bb --- /dev/null +++ b/distrib/luna88k/ramdisk/install.md @@ -0,0 +1,78 @@ +# $OpenBSD: install.md,v 1.1 2004/04/21 18:40:21 miod Exp $ +# Copyright (c) 1996 The NetBSD Foundation, Inc. +# All rights reserved. +# +# This code is derived from software contributed to The NetBSD Foundation +# by Jason R. Thorpe. +# +# 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 the NetBSD +# Foundation, Inc. and its contributors. +# 4. Neither the name of The NetBSD Foundation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +# ``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 REGENTS OR CONTRIBUTORS 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. +# +# +# machine dependent section of installation/upgrade script. +# +# + +MDTERM=vt100 +ARCH=ARCH + +md_set_term() { +} + +md_installboot() { +} + +# $1 is the disk to check +md_checkfordisklabel() { + local rval=0 + + disklabel $1 >/dev/null 2>/tmp/checkfordisklabel + + if grep "disk label corrupted" /tmp/checkfordisklabel; then + rval=2 + fi >/dev/null 2>&1 + + rm -f /tmp/checkfordisklabel + return $rval +} + +md_prep_disklabel() { + local _disk=$1 + + md_checkfordisklabel $_disk + case $? in + 2) echo "WARNING: Label on disk $_disk is corrupted. You will be repairing it.\n" + ;; + esac + + disklabel -W $_disk >/dev/null 2>&1 + disklabel -f /tmp/fstab.$_disk -E $_disk +} + +md_congrats() { +} diff --git a/distrib/luna88k/ramdisk/list b/distrib/luna88k/ramdisk/list new file mode 100644 index 00000000000..948ad62ef6b --- /dev/null +++ b/distrib/luna88k/ramdisk/list @@ -0,0 +1,76 @@ +# $OpenBSD: list,v 1.1 2004/04/21 18:40:21 miod Exp $ + +SRCDIRS distrib/special +SRCDIRS gnu/usr.bin usr.bin bin sbin usr.sbin + +# copy the crunched binary, link to it, and kill it +COPY ${OBJDIR}/instbin instbin +LINK instbin bin/cat +LINK instbin bin/chmod bin/chgrp sbin/chown +LINK instbin bin/cp +LINK instbin bin/dd +LINK instbin bin/df +LINK instbin bin/ed +LINK instbin bin/expr +LINK instbin bin/hostname +LINK instbin bin/ln +LINK instbin bin/ls +LINK instbin bin/mkdir +LINK instbin bin/mt +LINK instbin bin/mv +LINK instbin bin/pax bin/tar bin/cpio +LINK instbin bin/rm +LINK instbin bin/ksh bin/sh +ARGVLINK ksh -sh +LINK instbin bin/stty +LINK instbin bin/test bin/[ +#LINK instbin sbin/dhclient +LINK instbin sbin/disklabel +LINK instbin sbin/dmesg +LINK instbin sbin/fsck_ffs sbin/fsck +LINK instbin sbin/reboot sbin/halt +LINK instbin sbin/ifconfig +LINK instbin sbin/init +LINK instbin sbin/mknod +LINK instbin sbin/mount +LINK instbin sbin/mount_cd9660 +LINK instbin sbin/mount_ffs +LINK instbin sbin/mount_nfs +LINK instbin sbin/newfs +LINK instbin sbin/ping +LINK instbin sbin/ping6 +LINK instbin sbin/rtsol +LINK instbin sbin/route +LINK instbin sbin/umount +LINK instbin usr/bin/grep usr/bin/fgrep usr/bin/egrep +LINK instbin usr/bin/less usr/bin/more +LINK instbin usr/bin/ftp +LINK instbin usr/bin/gzip usr/bin/gunzip usr/bin/gzcat +LINK instbin usr/bin/sed + +# copy the MAKEDEV script and make some devices +SCRIPT ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV +SPECIAL cd dev; sh MAKEDEV ramdisk + +# various files that we need in /etc for the install +COPY ${DESTDIR}/etc/group etc/group +COPY ${CURDIR}/../../miniroot/protocols etc/protocols +COPY ${CURDIR}/../../miniroot/services etc/services +COPY ${DESTDIR}/etc/spwd.db etc/spwd.db +SYMLINK /tmp/disktab.shadow etc/disktab +SYMLINK /tmp/fstab.shadow etc/fstab +SYMLINK /tmp/resolv.conf.shadow etc/resolv.conf +SYMLINK /tmp/hosts etc/hosts +TERMCAP vt100,vt220,dumb usr/share/misc/termcap + +# dhcp things +SCRIPT ${DESTDIR}/sbin/dhclient-script sbin/dhclient-script + +# and the installation tools +SCRIPT ${CURDIR}/../../miniroot/dot.profile .profile +SCRIPT ${CURDIR}/install.md install.md +SCRIPT ${CURDIR}/../../miniroot/install.sh install +SCRIPT ${CURDIR}/../../miniroot/upgrade.sh upgrade +SCRIPT ${CURDIR}/../../miniroot/install.sub install.sub + +SPECIAL chmod 755 install upgrade sbin/dhclient-script diff --git a/sys/arch/luna88k/conf/RAMDISK b/sys/arch/luna88k/conf/RAMDISK new file mode 100644 index 00000000000..2d3639d4a99 --- /dev/null +++ b/sys/arch/luna88k/conf/RAMDISK @@ -0,0 +1,60 @@ +# $OpenBSD: RAMDISK,v 1.1 2004/04/21 18:40:21 miod Exp $ + +machine luna88k + +# 4 meg ramdisk +option MINIROOTSIZE=4096 +option RAMDISK_HOOKS + +option "NCPUS=1" # number of CPUs supported (max 4) + +# Define this if your processor has the xxx.usr bug (mask C82N) +option ERRATA__XXX_USR + +maxusers 32 + +config bsd root rd0 swap on rd0b + +option SCSITERSE +option SMALL_KERNEL +option NO_PROPOLICE +option TIMEZONE=0 +option DST=0 +option FFS +option NFSCLIENT +option CD9660 +option FIFO +option INET +option INET6 +option BOOT_CONFIG + +# +# devices +# + +mainbus0 at root +clock0 at mainbus0 +le0 at mainbus0 +sio0 at mainbus0 +siotty0 at sio0 +ws0 at sio0 +fb0 at mainbus0 +spc0 at mainbus0 +spc1 at mainbus0 + +# Workstation Console attachments +wsdisplay* at fb? +wskbd* at ws? console ? +wsmouse* at ws? + +# SCSI bus support +scsibus* at spc? + +# SCSI devices +sd* at scsibus? target ? lun ? # SCSI disks +st* at scsibus? target ? lun ? # SCSI tapes +cd* at scsibus? target ? lun ? # SCSI CD-ROM + +pseudo-device loop 1 +pseudo-device bpfilter 1 +pseudo-device rd 1 |