summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-10-10 04:21:03 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-10-10 04:21:03 +0000
commit01d90c47df19e3d4e5c7ea1c351ebbe4613fdf1c (patch)
treea8c394b878dcf5820278a4b402febf6787f9856e
parentca0009c553ea95636ab09286930c3451deffed07 (diff)
does this work? I do not know yet
-rw-r--r--distrib/sparc64/Makefile4
-rw-r--r--distrib/sparc64/Makefile.inc5
-rw-r--r--distrib/sparc64/bsd.rd/Makefile139
-rw-r--r--distrib/sparc64/bsd.rd/list14
-rw-r--r--distrib/sparc64/common/Makefile.inc100
-rw-r--r--distrib/sparc64/common/dot.profile (renamed from distrib/sparc64/ramdisk/dot.profile)2
-rw-r--r--distrib/sparc64/common/install.md (renamed from distrib/sparc64/ramdisk/install.md)2
-rw-r--r--distrib/sparc64/common/install.sub (renamed from distrib/sparc64/ramdisk/install.sub)2
-rw-r--r--distrib/sparc64/common/instbin.conf33
-rw-r--r--distrib/sparc64/common/list64
-rw-r--r--distrib/sparc64/common/mtree.conf90
-rw-r--r--distrib/sparc64/common/runlist.sh (renamed from distrib/sparc64/runlist.sh)2
-rw-r--r--distrib/sparc64/common/termcap.vt (renamed from distrib/sparc64/termcap.vt)0
-rw-r--r--distrib/sparc64/install.md232
-rw-r--r--distrib/sparc64/miniroot/Makefile.inc4
-rw-r--r--distrib/sparc64/miniroot/dot.profile92
-rw-r--r--distrib/sparc64/miniroot/list56
-rw-r--r--distrib/sparc64/ramdisk/Makefile60
-rw-r--r--distrib/sparc64/ramdisk/Makefile.inc11
-rw-r--r--distrib/sparc64/ramdisk/instbin.conf13
-rw-r--r--distrib/sparc64/ramdisk/list47
-rw-r--r--distrib/sparc64/ramdiskB/Makefile136
-rw-r--r--distrib/sparc64/ramdiskB/instbin.conf32
-rw-r--r--distrib/sparc64/ramdiskB/list84
-rw-r--r--distrib/sparc64/ramdiskB/mtree.conf90
25 files changed, 861 insertions, 453 deletions
diff --git a/distrib/sparc64/Makefile b/distrib/sparc64/Makefile
index a6b8ce1c8e3..04884503781 100644
--- a/distrib/sparc64/Makefile
+++ b/distrib/sparc64/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.1 2001/09/18 14:27:32 jason Exp $
+# $OpenBSD: Makefile,v 1.2 2001/10/10 04:21:02 deraadt Exp $
-SUBDIR+= ramdisk
+SUBDIR+= ramdisk ramdiskB bsd.rd
.include <bsd.subdir.mk>
diff --git a/distrib/sparc64/Makefile.inc b/distrib/sparc64/Makefile.inc
index 9f8e7b8b719..e6263225293 100644
--- a/distrib/sparc64/Makefile.inc
+++ b/distrib/sparc64/Makefile.inc
@@ -1,6 +1,3 @@
-# $OpenBSD: Makefile.inc,v 1.1 2001/09/18 14:27:32 jason Exp $
+# $OpenBSD: Makefile.inc,v 1.2 2001/10/10 04:21:02 deraadt Exp $
REV= ${OSrev}
-
-BSDSRCDIR?= /usr/src
-SRCSYSDIR?= ${BSDSRCDIR}/sys
diff --git a/distrib/sparc64/bsd.rd/Makefile b/distrib/sparc64/bsd.rd/Makefile
new file mode 100644
index 00000000000..2fbffd53cb9
--- /dev/null
+++ b/distrib/sparc64/bsd.rd/Makefile
@@ -0,0 +1,139 @@
+# $OpenBSD: Makefile,v 1.1 2001/10/10 04:21:02 deraadt Exp $
+
+TOP= ${.CURDIR}/..
+
+.include "${TOP}/Makefile.inc"
+IMAGE= ramdisk${REV}.fs
+CBIN?= instbin
+CRUNCHCONF?= ${TOP}/common/${CBIN}.conf
+CRUNCHCONF?= ${.CURDIR}/../common/${CBIN}.conf
+LISTS?= ${.CURDIR}/../common/list ${.CURDIR}/list
+
+MOUNT_POINT= /mnt
+
+VND?= svnd0
+VND_DEV= /dev/${VND}a
+VND_RDEV= /dev/r${VND}a
+VND_CRDEV= /dev/r${VND}c
+PID!= echo $$$$
+REALIMAGE!= echo /var/tmp/image.${PID}
+
+STRIP?= strip
+GZIP?= gzip
+GZIPFLAGS?= -9f
+INSTALLBOOT?= /usr/mdec/installboot -v
+MTREE= ${.CURDIR}/../common/mtree.conf
+
+RAMDISK= RAMDISK
+BOOT?= /usr/mdec/boot
+BOOTXX?= /usr/mdec/bootxx
+
+RDSETROOT= elfrdsetroot
+
+#.include "${TOP}/common/Makefile.inc"
+
+all: ${CBIN} bsd.rd
+ @echo "all done"
+
+DISKTYPE= rdroot
+NBLKS= 5744
+
+# old format, minfree, opt, b/i trks, sects, cpg
+NEWFSARGS= -t ffs -m 0 -o space
+NEWFSARGS_RD= -i 8192 -c 80
+NEWFSARGS_FD= -i 524288 -c 80
+
+bsd.rd: bsd.rd_unz
+ objcopy -Sg -R .comment bsd.rd_unz bsd.strip
+ ${STRIP} bsd.strip
+ ${GZIP} -c ${GZIPFLAGS} bsd.strip > bsd.rd
+
+bsd.rd_unz: bsd ${IMAGE} ${RDSETROOT}
+ cp bsd bsd.rd_unz
+ ${.OBJDIR}/${RDSETROOT} bsd.rd_unz < ${IMAGE}
+
+bsd:
+ cd ${.CURDIR}/../../../sys/arch/sparc64/conf && config ${RAMDISK}
+ cd ${.CURDIR}/../../../sys/arch/sparc64/compile/${RAMDISK} && \
+ make depend && make clean && COPTS=-Os make
+ cp ${.CURDIR}/../../../sys/arch/sparc64/compile/${RAMDISK}/bsd bsd
+
+${IMAGE}: do_prep do_mount do_files do_umount
+ mv -f ${REALIMAGE} ${IMAGE}
+
+ecoffrdsetroot: ${TOP}/ecoffrdsetroot.c
+ ${HOSTCC} ${HOSTCFLAGS} -o ecoffrdsetroot ${TOP}/ecoffrdsetroot.c
+
+elfrdsetroot: ${TOP}/../common/elfrdsetroot.c
+ ${HOSTCC} ${HOSTCFLAGS} -o elfrdsetroot ${TOP}/../common/elfrdsetroot.c
+
+do_prep:
+ dd if=/dev/zero of=${REALIMAGE} count=${NBLKS}
+ vnconfig -v -c ${VND} ${REALIMAGE}
+ disklabel -w -r ${VND} ${DISKTYPE}
+
+do_mount:
+ newfs ${NEWFSARGS} ${NEWFSARGS_RD} -s ${NBLKS} ${VND_RDEV}
+ mount ${VND_DEV} ${MOUNT_POINT}
+
+do_umount:
+ @echo ""
+ @df -i ${MOUNT_POINT}
+ @echo ""
+ umount ${MOUNT_POINT}
+ vnconfig -u ${VND}
+
+unconfig:
+ -umount ${MOUNT_POINT}
+ -vnconfig -u ${VND}
+
+${IMAGE}: ${CBIN} rd_setup do_files rd_teardown
+
+rd_setup: ${CBIN}
+ dd if=/dev/zero of=${REALIMAGE} bs=512 count=${NBLKS}
+ vnconfig -v -c ${VND} ${REALIMAGE}
+ 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}
+ cp ${REALIMAGE} ${IMAGE}
+ rm ${REALIMAGE}
+
+rdsetroot: ${TOP}/../../common/rdsetroot.c
+ ${HOSTCC} -DDEBUG -o rdsetroot ${TOP}/../../common/rdsetroot.c
+
+unconfig:
+ -umount -f ${MOUNT_POINT}
+ -vnconfig -u ${VND}
+ -/bin/rm -f ${IMAGE}
+
+.PRECIOUS: ${IMAGE}
+
+install:
+.ifndef NOBSDRD
+ cp bsd.rd ${DESTDIR}/snapshot/bsd.rd
+.endif
+
+${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
+ crunchgen -E -D ${BSDSRCDIR} -L ${DESTDIR}/usr/lib \
+ -c ${CBIN}.c -e ${CBIN} -m ${CBIN}.mk ${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} \
+ REV=${REV} TARGDIR=${MOUNT_POINT} sh ${TOP}/common/runlist.sh ${LISTS}
+
+clean cleandir:
+ /bin/rm -f core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}*.cache \
+ *.o *.lo *.c bsd bsd.rd bsd.gz bsd.strip floppy*.fs rdsetroot
+
+.include <bsd.obj.mk>
+.include <bsd.subdir.mk>
diff --git a/distrib/sparc64/bsd.rd/list b/distrib/sparc64/bsd.rd/list
new file mode 100644
index 00000000000..0442e0a2e15
--- /dev/null
+++ b/distrib/sparc64/bsd.rd/list
@@ -0,0 +1,14 @@
+# $OpenBSD: list,v 1.1 2001/10/10 04:21:02 deraadt Exp $
+
+# we strip comments from files since we need the space...
+
+# the disktab explanation file
+#SPECIAL sed -e '/^#[ ].*$/d' < ${CURDIR}/../common/disktab.preinstall > etc/disktab.preinstall
+
+# and the installation tools
+SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' < ${CURDIR}/../common/dot.profile > .profile
+SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' -e "/^VERSION=/s/=.*/=${REV}/" < ${CURDIR}/../../miniroot/install.sub > install.sub
+SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' < ${CURDIR}/../../miniroot/install.sh > install
+SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' -e "s/^ARCH=ARCH$/ARCH=`arch -s`/" < ${CURDIR}/../common/install.md > install.md
+SPECIAL chmod 755 install
+#SPECIAL chmod 755 upgrade
diff --git a/distrib/sparc64/common/Makefile.inc b/distrib/sparc64/common/Makefile.inc
new file mode 100644
index 00000000000..6a340edcbae
--- /dev/null
+++ b/distrib/sparc64/common/Makefile.inc
@@ -0,0 +1,100 @@
+# $OpenBSD: Makefile.inc,v 1.1 2001/10/10 04:21:02 deraadt Exp $
+
+TOP= ${.CURDIR}/..
+
+.include "${TOP}/Makefile.inc"
+IMAGE= mr.fs
+CBIN?= instbin
+CRUNCHCONF?= ${.CURDIR}/../common/${CBIN}.conf
+LISTS?= ${.CURDIR}/../common/list ${.CURDIR}/list
+
+MOUNT_POINT= /mnt
+MTREE= ${.CURDIR}/../common/mtree.conf
+
+XNAME?= floppy
+FS?= ${XNAME}${REV}.fs
+VND?= svnd0
+VND_DEV= /dev/${VND}a
+VND_RDEV= /dev/r${VND}a
+VND_CRDEV= /dev/r${VND}c
+PID!= echo $$$$
+REALIMAGE!= echo /var/tmp/image.${PID}
+LISTFLOPPY= ${.CURDIR}/../common/list_floppy
+FLOPPYSIZE?= 144
+FLOPPYSECS?= 18
+FLOPPYTYPE?= floppy3
+
+all: ${FS}
+
+${FS}: bsd.rd
+ dd if=/dev/zero of=${REALIMAGE} bs=10k count=${FLOPPYSIZE}
+ vnconfig -v -c ${VND} ${REALIMAGE}
+ disklabel -w -r ${VND} ${FLOPPYTYPE}
+ newfs -m 0 -o space -i 524288 -c 80 ${VND_RDEV}
+ mount ${VND_DEV} ${MOUNT_POINT}
+ TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
+ TARGDIR=${MOUNT_POINT} sh ${TOP}/common/runlist.sh ${LISTFLOPPY}
+ /usr/mdec/installboot -v ${DESTDIR}/usr/mdec/bootblk ${VND_CRDEV}
+ @echo ""
+ @df -i ${MOUNT_POINT}
+ @echo ""
+ umount ${MOUNT_POINT}
+ vnconfig -u ${VND}
+ cp ${REALIMAGE} ${FS}
+ rm ${REALIMAGE}
+
+DISKTYPE?= rdroot
+NBLKS?= 3510
+# minfree, opt, b/i trks, sects, cpg
+NEWFSARGS= -m 0 -o space -c 16 -i 4096
+
+${IMAGE}: ${CBIN} rd_setup do_files rd_teardown
+
+rd_setup: ${CBIN}
+ dd if=/dev/zero of=${REALIMAGE} bs=512 count=${NBLKS}
+ vnconfig -v -c ${VND} ${REALIMAGE}
+ 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}
+ cp ${REALIMAGE} ${IMAGE}
+ rm ${REALIMAGE}
+
+rdsetroot: ${TOP}/../../common/rdsetroot.c
+ ${HOSTCC} -DDEBUG -o rdsetroot ${TOP}/../../common/rdsetroot.c
+
+unconfig:
+ -umount -f ${MOUNT_POINT}
+ -vnconfig -u ${VND}
+ -/bin/rm -f ${IMAGE}
+
+.PRECIOUS: ${IMAGE}
+
+install:
+.ifndef NOBSDRD
+ cp bsd.rd ${DESTDIR}/snapshot/bsd.rd
+.endif
+ cp ${FS} ${DESTDIR}/snapshot/${FS}
+
+${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
+ crunchgen -E -D ${BSDSRCDIR} -L ${DESTDIR}/usr/lib \
+ -c ${CBIN}.c -e ${CBIN} -m ${CBIN}.mk ${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} \
+ REV=${REV} TARGDIR=${MOUNT_POINT} sh ${TOP}/common/runlist.sh ${LISTS}
+
+clean cleandir:
+ /bin/rm -f core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}*.cache \
+ *.o *.lo *.c bsd bsd.rd bsd.gz bsd.strip floppy*.fs rdsetroot
+
+.include <bsd.subdir.mk>
diff --git a/distrib/sparc64/ramdisk/dot.profile b/distrib/sparc64/common/dot.profile
index 88723d3a863..6322fb2ad16 100644
--- a/distrib/sparc64/ramdisk/dot.profile
+++ b/distrib/sparc64/common/dot.profile
@@ -1,4 +1,4 @@
-# $OpenBSD: dot.profile,v 1.2 2001/09/21 20:09:14 jason Exp $
+# $OpenBSD: dot.profile,v 1.1 2001/10/10 04:21:02 deraadt Exp $
#
# Copyright (c) 1994 Christopher G. Demetriou
# All rights reserved.
diff --git a/distrib/sparc64/ramdisk/install.md b/distrib/sparc64/common/install.md
index 04ad07b5689..006991ae8e0 100644
--- a/distrib/sparc64/ramdisk/install.md
+++ b/distrib/sparc64/common/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.4 2001/10/08 22:52:59 miod Exp $
+# $OpenBSD: install.md,v 1.1 2001/10/10 04:21:02 deraadt Exp $
# $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $
#
#
diff --git a/distrib/sparc64/ramdisk/install.sub b/distrib/sparc64/common/install.sub
index afa20d83855..f7ac65d5c1f 100644
--- a/distrib/sparc64/ramdisk/install.sub
+++ b/distrib/sparc64/common/install.sub
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: install.sub,v 1.2 2001/09/21 20:09:14 jason Exp $
+# $OpenBSD: install.sub,v 1.1 2001/10/10 04:21:02 deraadt Exp $
# $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $
#
# Copyright (c) 1997,1998 Todd Miller, Theo de Raadt
diff --git a/distrib/sparc64/common/instbin.conf b/distrib/sparc64/common/instbin.conf
new file mode 100644
index 00000000000..b1cc232ed56
--- /dev/null
+++ b/distrib/sparc64/common/instbin.conf
@@ -0,0 +1,33 @@
+# $OpenBSD: instbin.conf,v 1.1 2001/10/10 04:21:02 deraadt Exp $
+#
+# instbin.conf - unified binary for the inst/upgr floppies
+#
+
+srcdirs distrib/special
+srcdirs gnu/usr.bin usr.bin bin sbin usr.sbin
+
+progs dd mount_cd9660 df dhclient mount sync restore
+progs stty ln disklabel pax ping cat ifconfig dmesg ls
+progs less mount_nfs grep umount rsh fsck
+progs scsi mknod route ftp mount_ffs reboot ed
+progs cp gzip chmod fsck_ffs sort init newfs
+progs tip rm mt mkdir sed ksh sleep
+progs mv expr test hostname
+progs mg
+
+ln mt eject
+ln chmod chgrp
+ln chmod chown
+ln pax tar
+ln pax cpio
+ln less more
+ln grep fgrep
+ln grep egrep
+ln reboot halt
+ln gzip gunzip
+ln gzip gzcat
+ln ksh sh
+ln ksh -sh
+ln test [
+
+libs -ledit -lutil -lcurses -ll -lm -lkvm -lz -lkrb -ldes
diff --git a/distrib/sparc64/common/list b/distrib/sparc64/common/list
new file mode 100644
index 00000000000..a748ed16f6a
--- /dev/null
+++ b/distrib/sparc64/common/list
@@ -0,0 +1,64 @@
+# $OpenBSD: list,v 1.1 2001/10/10 04:21:02 deraadt Exp $
+# $NetBSD: list,v 1.4.4.1 1996/06/20 20:30:26 pk Exp $
+
+SRCDIRS distrib/special
+SRCDIRS gnu/usr.bin usr.bin bin sbin usr.sbin
+SRCDIRS usr.bin/vi
+
+# 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
+LINK instbin bin/stty
+LINK instbin bin/sleep
+LINK instbin bin/sync
+LINK instbin sbin/dmesg
+LINK instbin sbin/fsck_ffs sbin/fsck
+LINK instbin sbin/reboot sbin/halt
+LINK instbin sbin/ifconfig
+LINK instbin sbin/dhclient
+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 sbin/mount_mfs
+LINK instbin sbin/ping
+LINK instbin sbin/route
+LINK instbin sbin/umount
+SYMLINK ../../instbin usr/bin/ftp
+SYMLINK ../../instbin usr/bin/gzip usr/bin/gunzip usr/bin/gzcat
+SYMLINK ../../instbin usr/bin/sed
+
+ARGVLINK ksh -sh
+
+# various files that we need in /etc for the install
+COPY ${DESTDIR}/etc/group etc/group
+COPY ${DESTDIR}/etc/protocols etc/protocols
+COPY ${DESTDIR}/etc/services etc/services
+COPY ${DESTDIR}/etc/spwd.db etc/spwd.db
+
+# and the installation scripts
+COPY ${CURDIR}/../../miniroot/install.sub install.sub
+COPY ${CURDIR}/../../miniroot/install.sh install
+COPY ${CURDIR}/../../miniroot/upgrade.sh upgrade
+SPECIAL sed "/^VERSION=/s/=.*/=${REV}/" < ${CURDIR}/../../miniroot/install.sub > install.sub
+SPECIAL chmod 755 install upgrade
+
+# dhcp things
+COPY ${DESTDIR}/sbin/dhclient-script sbin/dhclient-script
diff --git a/distrib/sparc64/common/mtree.conf b/distrib/sparc64/common/mtree.conf
new file mode 100644
index 00000000000..c619ef1e898
--- /dev/null
+++ b/distrib/sparc64/common/mtree.conf
@@ -0,0 +1,90 @@
+# $OpenBSD: mtree.conf,v 1.1 2001/10/10 04:21:02 deraadt Exp $
+
+/set type=dir uname=root gname=wheel mode=0755
+# .
+.
+
+# ./bin
+bin
+# ./bin
+..
+
+# ./dev
+dev
+# ./dev
+..
+
+# ./etc
+etc
+
+# ./etc
+..
+
+# ./mnt
+mnt
+# ./mnt
+..
+
+# ./mnt2
+mnt2
+# ./mnt2
+..
+
+# ./sbin
+sbin
+# ./sbin
+..
+
+# ./tmp
+tmp mode=01777
+# ./tmp
+..
+
+# ./usr
+usr
+
+# ./usr/bin
+bin
+# ./usr/bin
+..
+
+# ./usr/mdec
+mdec
+# ./usr/mdec
+..
+
+# ./usr/sbin
+sbin
+# ./usr/sbin
+..
+
+# ./usr/share
+share
+
+# ./usr/share/misc
+misc
+# ./usr/share/misc
+..
+
+# ./usr/share
+..
+
+# ./usr
+..
+
+# ./var
+var
+
+# ./var/tmp
+tmp mode=0177
+
+# ./var/tmp
+..
+
+# ./var/db
+db
+# ./var/db
+..
+
+# ./var
+..
diff --git a/distrib/sparc64/runlist.sh b/distrib/sparc64/common/runlist.sh
index 8c5cf4f39a2..356287640de 100644
--- a/distrib/sparc64/runlist.sh
+++ b/distrib/sparc64/common/runlist.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: runlist.sh,v 1.1 2001/09/18 14:27:32 jason Exp $
+# $OpenBSD: runlist.sh,v 1.1 2001/10/10 04:21:02 deraadt Exp $
if [ "X$1" = "X-d" ]; then
SHELLCMD=cat
diff --git a/distrib/sparc64/termcap.vt b/distrib/sparc64/common/termcap.vt
index 6ab68007c79..6ab68007c79 100644
--- a/distrib/sparc64/termcap.vt
+++ b/distrib/sparc64/common/termcap.vt
diff --git a/distrib/sparc64/install.md b/distrib/sparc64/install.md
deleted file mode 100644
index a3a7c9c8b99..00000000000
--- a/distrib/sparc64/install.md
+++ /dev/null
@@ -1,232 +0,0 @@
-# $OpenBSD: install.md,v 1.1 2001/09/18 14:27:32 jason Exp $
-# $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr 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.
-#
-
-# Machine-dependent install sets
-MDSETS="kernel xbin xman xinc xcon"
-ARCH=ARCH
-
-md_set_term() {
- test -n "$TERM" && return
- echo -n "Specify terminal type [sun]: "
- getresp sun
- TERM=$resp
- export TERM
-}
-
-md_get_msgbuf() {
- # Only want to see one boot's worth of info
- dmesg > /tmp/msgbuf
- sed -n -f /dev/stdin /tmp/msgbuf <<- OOF
- /^OpenBSD /h
- /^OpenBSD /!H
- \${
- g
- p
- }
- OOF
-}
-
-md_get_diskdevs() {
- # return available disk devices
- md_get_msgbuf | sed -n -e '/^sd[0-9] /{s/ .*//;p;}' \
- -e '/^wd[0-9] /{s/ .*//;p;}'
-}
-
-md_get_cddevs() {
- # return available CDROM devices
- md_get_msgbuf | sed -n -e '/^cd[0-9] /{s/ .*//;p;}'
-}
-
-md_get_partition_range() {
- # return range of valid partition letters
- echo [a-p]
-}
-
-md_questions() {
- :
-}
-
-md_installboot() {
- local _rawdev _prefix
-
- if [ -z "$1" ]; then
- echo No disk device specified, you must run installboot manually.
- return
- fi
- _rawdev=/dev/r${1}c
-
- # use extracted mdec if it exists (may be newer)
- if [ -e /mnt/usr/mdec/boot ]; then
- _prefix=/mnt/usr/mdec
- elif [ -e /usr/mdec/boot ]; then
- _prefix=/usr/mdec
- else
- echo No boot block prototypes found, you must run installboot manually.
- return
- fi
-
- echo Installing boot block...
- cp ${_prefix}/boot /mnt/boot
- sync; sync; sync
- installboot -v /mnt/boot ${_prefix}/bootxx ${_rawdev}
-}
-
-md_native_fstype() {
- :
-}
-
-md_native_fsopts() {
- :
-}
-
-md_checkfordisklabel() {
- # $1 is the disk to check
- local rval
-
- disklabel $1 > /dev/null 2> /tmp/checkfordisklabel
- if grep "no disk label" /tmp/checkfordisklabel; then
- rval=1
- elif grep "disk label corrupted" /tmp/checkfordisklabel; then
- rval=2
- else
- rval=0
- fi
-
- rm -f /tmp/checkfordisklabel
- return $rval
-}
-
-md_prep_disklabel()
-{
- local _disk=$1
-
- md_checkfordisklabel $_disk
- case $? in
- 0)
- ;;
- 1)
- echo WARNING: Label on disk $_disk has no label. You will be creating a new one.
- echo
- ;;
- 2)
- echo WARNING: Label on disk $_disk is corrupted. You will be repairing.
- echo
- ;;
- esac
-
- # display example
- cat << __EOT
-If you are unsure of how to use multiple partitions properly
-(ie. separating /, /usr, /tmp, /var, /usr/local, and other things)
-just split the space into a root and swap partition for now.
-
-__EOT
- disklabel -W ${_disk}
- disklabel -f /tmp/fstab.${_disk} -E ${_disk}
-}
-
-md_welcome_banner() {
-{
- if [ "$MODE" = install ]; then
- cat << __EOT
-Welcome to the OpenBSD/sparc64 ${VERSION_MAJOR}.${VERSION_MINOR} installation program.
-
-This program is designed to help you put OpenBSD on your disk in a simple and
-rational way.
-
-__EOT
-
- else
- cat << __EOT
-echo Welcome to the OpenBSD/sparc64 ${VERSION} upgrade program.
-
-This program is designed to help you upgrade your OpenBSD system in a
-simple and rational way.
-
-As a reminder, installing the 'etc' binary set is NOT recommended.
-Once the rest of your system has been upgraded, you should manually
-merge any changes to files in the 'etc' set into those files which
-already exist on your system.
-
-__EOT
- fi
-
-cat << __EOT
-
-As with anything which modifies your disk's contents, this program can
-cause SIGNIFICANT data loss, and you are advised to make sure your
-data is backed up before beginning the installation process.
-
-Default answers are displayed in brackets after the questions. You
-can hit Control-C at any time to quit, but if you do so at a prompt,
-you may have to hit return. Also, quitting in the middle of
-installation may leave your system in an inconsistent state.
-
-__EOT
-} | more
-}
-
-md_not_going_to_install() {
- cat << __EOT
-
-OK, then. Enter 'halt' at the prompt to halt the machine. Once the
-machine has halted, power-cycle the system to load new boot code.
-
-__EOT
-}
-
-md_congrats() {
- local what;
- if [ "$MODE" = install ]; then
- what=installed
- else
- what=upgraded
- fi
- cat << __EOT
-
-CONGRATULATIONS! You have successfully $what OpenBSD!
-To boot the installed system, enter halt at the command prompt. Once the
-system has halted, reset the machine and boot from the disk.
-
-__EOT
-}
diff --git a/distrib/sparc64/miniroot/Makefile.inc b/distrib/sparc64/miniroot/Makefile.inc
deleted file mode 100644
index cb610f93897..00000000000
--- a/distrib/sparc64/miniroot/Makefile.inc
+++ /dev/null
@@ -1,4 +0,0 @@
-# $OpenBSD: Makefile.inc,v 1.1 2001/09/18 14:27:32 jason Exp $
-
-RAWLABEL=
-IMAGESIZE?= 12288 # 6MB in 512 byte blocks
diff --git a/distrib/sparc64/miniroot/dot.profile b/distrib/sparc64/miniroot/dot.profile
deleted file mode 100644
index 64e5a962020..00000000000
--- a/distrib/sparc64/miniroot/dot.profile
+++ /dev/null
@@ -1,92 +0,0 @@
-# $OpenBSD: dot.profile,v 1.1 2001/09/18 14:27:32 jason Exp $
-# $NetBSD: dot.profile,v 1.1 1995/12/18 22:54:43 pk Exp $
-#
-# Copyright (c) 1995 Jason R. Thorpe
-# 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.
-#
-
-export PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
-export HISTFILE=/.sh_history
-
-umask 022
-
-set -o emacs # emacs-style command line editing
-
-# XXX
-# the TERM/EDITOR stuff is really well enough parameterized to be moved
-# into install.sub where it could use the routines there and be invoked
-# from the various (semi) MI install and upgrade scripts
-
-# terminals believed to be in termcap, default TERM
-TERMS="sun vt* pcvt* pc3 dumb"
-TERM=sun
-
-if [ "X${DONEPROFILE}" = "X" ]; then
- DONEPROFILE=YES
-
- mount_ffs -o update /dev/rd0a /
-
- # set up some sane defaults
- echo 'erase ^?, werase ^W, kill ^U, intr ^C, status ^T'
- stty newcrt werase ^W intr ^C kill ^U erase ^? status ^T 9600
-
- # get the terminal type
- _forceloop=""
- while [ "X$_forceloop" = X"" ]; do
- echo "Supported terminals are: $TERMS"
- eval `tset -s -m ":?$TERM"`
- if [ "X$TERM" != X"unknown" ]; then
- _forceloop="done"
- fi
- done
- export TERM
-
- # Installing or upgrading?
- _forceloop=""
- while [ "X$_forceloop" = X"" ]; do
- echo -n '(I)nstall, (U)pgrade, or (S)hell? '
- read _forceloop
- case "$_forceloop" in
- i*|I*)
- /install
- ;;
-
- u*|U*)
- /upgrade
- ;;
-
- s*|S*)
- ;;
-
- *)
- _forceloop=""
- ;;
- esac
- done
-fi
diff --git a/distrib/sparc64/miniroot/list b/distrib/sparc64/miniroot/list
deleted file mode 100644
index 7054f5a55cd..00000000000
--- a/distrib/sparc64/miniroot/list
+++ /dev/null
@@ -1,56 +0,0 @@
-# $OpenBSD: list,v 1.2 2001/10/08 22:52:56 miod Exp $
-# $NetBSD: list,v 1.2.4.2 1996/06/26 19:25:00 pk Exp $
-
-# Sparc extra's
-LINK instbin sbin/disklabel
-LINK instbin sbin/dhclient
-
-SYMLINK ../../instbin usr/bin/basename
-SYMLINK ../../instbin usr/bin/cksum usr/bin/sum
-SYMLINK ../../instbin usr/bin/cut
-SYMLINK ../../instbin usr/bin/getopt
-SYMLINK ../../instbin usr/bin/grep usr/bin/egrep usr/bin/fgrep
-SYMLINK ../../instbin usr/bin/netstat
-SYMLINK ../../instbin usr/bin/rsh
-SYMLINK ../../instbin usr/bin/strings
-SYMLINK ../../instbin usr/bin/tset usr/bin/reset
-SYMLINK ../../instbin usr/bin/less usr/bin/more
-SYMLINK ../../instbin usr/sbin/installboot
-SYMLINK ../../instbin usr/sbin/sysctl
-
-SRCDIRS sys/arch/sparc64/stand
-
-# crunchgen source directory specials
-#CRUNCHSPECIAL installboot srcdir sys/arch/sparc64/stand/installboot
-
-# Minimize use of MFS
-SYMLINK /tmp var/tmp
-
-# copy the MAKEDEV script and make some devices
-COPY ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV
-COPY ${DESTDIR}/dev/MAKEDEV.local dev/MAKEDEV.local
-SPECIAL cd dev; sh MAKEDEV all
-#SPECIAL /bin/rm dev/MAKEDEV
-
-# we need the contents of /usr/mdec
-COPYDIR ${DESTDIR}/usr/mdec usr/mdec
-SPECIAL rm -f usr/mdec/binstall usr/mdec/installboot
-
-# and a few useful bits of the termcap file (512K and still growing 8-)
-SPECIAL tic -C ${CURDIR}/../../share/termtypes/termtypes.master | sed -n -e 's,/usr/share/lib/tabset,/usr/share/tabset,g' -e 's,/usr/lib/tabset,/usr/share/tabset,g' -e '/^dumb|/,/:[ ]*$/p' -e '/^unknown|/,/:[ ]*$/p' -e '/^sun.*|/,/:[ ]*$/p' -e '/^vt.*|/,/:[ ]*$/p' -e '/^pc3|/,/:[ ]*$/p' -e '/^pcvt.*|/,/:[ ]*$/p' > usr/share/misc/termcap
-
-# copy the kernel
-COPY bsd bsd
-
-# various files that we need in /etc for the install
-COPY ${DESTDIR}/etc/disktab etc/disktab.shadow
-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
-
-# and the installation tools
-COPY ${ARCHDIR}/dot.profile .profile
-SPECIAL sed -e '/^#[ ].*$/d' -e "s/^ARCH=ARCH$/ARCH=`arch -s`/" < ${ARCHDIR}/../install.md > install.md
-COPY ${DESTDIR}/usr/mdec/boot boot
-SPECIAL sync; ${DESTDIR}/usr/mdec/binstall -v ffs ${TARGDIR}
diff --git a/distrib/sparc64/ramdisk/Makefile b/distrib/sparc64/ramdisk/Makefile
index cd1a636c124..b66df0b214c 100644
--- a/distrib/sparc64/ramdisk/Makefile
+++ b/distrib/sparc64/ramdisk/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.6 2001/09/21 20:09:14 jason Exp $
+# $OpenBSD: Makefile,v 1.7 2001/10/10 04:21:02 deraadt Exp $
TOP= ${.CURDIR}/..
@@ -12,12 +12,32 @@ UTILS?= ${.CURDIR}/../../miniroot
MOUNT_POINT= /mnt
MTREE= ${.CURDIR}/mtree.conf
+FLOPPY= floppy${REV}.fs
+FLOPPYSIZE?= 2880
+FLOPPYTYPE?= floppy
+INSTALLBOOT?= /usr/mdec/installboot
+
VND?= svnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
VND_CRDEV= /dev/r${VND}c
PID!= echo $$$$
+GZIP?= gzip
+GZIPFLAGS?= -9v
+GZIPEXT?= .gz
+
+MOUNT_POINT?= /mnt
+DISKTYPE= rdroot
+PID!= echo $$$$
+REALIMAGE!= echo /tmp/image.${PID}
+IMAGE?= ramdisk${REV}.fs
+IMAGESIZE?= 8192 # 4MB in 512 byte blocks
+NEWFS_WILL_FAIL?=false
+CRUNCHGENOPTS?=
+KERNEL?= RAMDISKU1
+UTILS?= ${.CURDIR}/../miniroot
+STRIP?= strip
DISKTYPE= rdroot
NBLKS= 6144
@@ -31,7 +51,28 @@ all ${IMAGE}:
.else
# mix config is not needed.
-all: ${BSD_RD}
+all: ${FLOPPY} ${BSD_RD}
+
+bsd.gz: bsd.rd
+ ${GZIP} ${GZIPFLAGS} < bsd.rd > bsd.gz
+
+${FLOPPY}: bsd.gz ${BOOT} /usr/
+ dd if=/dev/zero of=${REALIMAGE} count=${FLOPPYSIZE}
+ vnconfig -v -c ${VND} ${REALIMAGE}
+ disklabel -w ${RAWLABEL} ${VND} ${FLOPPYTYPE}
+ newfs ${NEWFSOPTS_FD} ${VND_RDEV}
+ mount ${VND_DEV} ${MOUNT_POINT}
+ cp ${DESTDIR}/usr/mdec/ofwboot ${MOUNT_POINT}$/
+ cp bsd.gz ${MOUNT_POINT}/bsd
+ ${INSTALLBOOT} -v ${DESTDIR}/usr/mdec/bootblk \
+ `echo ${VND_RDEV} | sed -e 's/a$$/c/'`
+ @echo ""
+ @df -i ${MOUNT_POINT}
+ @echo ""
+ umount ${MOUNT_POINT}
+ vnconfig -u ${VND}
+ dd if=${REALIMAGE} of=${FLOPPY} count=${FLOPPYSIZE}
+ rm -f ${REALIMAGE}
${BSD_RD}: ${CBIN} ${IMAGE} bsd elfrdsetroot
cp bsd ${BSD_RD}
@@ -42,10 +83,10 @@ ${IMAGE}: rd_setup do_files rd_teardown
.endif
bsd:
- cd ${TOP}/../../sys/arch/sparc64/conf && config RAMDISK
- cd ${TOP}/../../sys/arch/sparc64/compile/RAMDISK && \
- make clean && make depend && make
- cp ${TOP}/../../sys/arch/sparc64/compile/RAMDISK/bsd bsd
+ cd ${TOP}/../../sys/arch/sparc64/conf && config ${KERNEL}
+ cd ${TOP}/../../sys/arch/sparc64/compile/${KERNEL} && \
+ make clean && make depend && COPTS=-Os make
+ cp ${TOP}/../../sys/arch/sparc64/compile/${KERNEL}/bsd bsd
rd_setup:
dd if=/dev/zero of=${IMAGE} bs=512 count=${NBLKS}
@@ -70,7 +111,7 @@ unconfig:
.PRECIOUS: ${IMAGE}
install:
- cp ${BSD_RD} ${DESTDIR}/snapshot/
+ cp ${FLOPPY} ${DESTDIR}/snapshot/
${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CBIN}.conf
crunchgen -E -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC}
@@ -82,12 +123,11 @@ do_files:
mtree -def ${MTREE} -p ${MOUNT_POINT}/ -u
TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
REV=${REV} ARCHDIR=${.CURDIR}/.. TARGDIR=${MOUNT_POINT} \
- sh ${TOP}/runlist.sh ${LISTS}
+ sh ${TOP}/common/runlist.sh ${LISTS}
clean cleandir:
/bin/rm -f core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache \
- *.o *.lo *.c bsd ${BSD_RD} \
- elfrdsetroot
+ *.o *.lo *.c bsd ${BSD_RD} bsd.gz ${FLOPPY} elfrdsetroot
beforeinstall:
cp ${BSD.RD} ${DESTDIR}/snapshot
diff --git a/distrib/sparc64/ramdisk/Makefile.inc b/distrib/sparc64/ramdisk/Makefile.inc
deleted file mode 100644
index 7b5b0b5b19a..00000000000
--- a/distrib/sparc64/ramdisk/Makefile.inc
+++ /dev/null
@@ -1,11 +0,0 @@
-# $OpenBSD: Makefile.inc,v 1.1 2001/09/18 14:27:32 jason Exp $
-# $OpenBSD: Makefile.inc,v 1.1 2001/09/18 14:27:32 jason Exp $
-
-IMAGESIZE?= 5352
-GZIP?= gzip
-GZIPFLAGS?= -9v
-GZIPEXT?= .gz
-MAKEFLOPPY= 1
-RAWLABEL=
-BOOT= ${DESTDIR}/usr/mdec/boot
-INSTALLBOOT= ${DESTDIR}/usr/mdec/installboot
diff --git a/distrib/sparc64/ramdisk/instbin.conf b/distrib/sparc64/ramdisk/instbin.conf
index c83c54beb15..a51701df3db 100644
--- a/distrib/sparc64/ramdisk/instbin.conf
+++ b/distrib/sparc64/ramdisk/instbin.conf
@@ -1,4 +1,4 @@
-# $OpenBSD: instbin.conf,v 1.3 2001/10/02 01:08:12 deraadt Exp $
+# $OpenBSD: instbin.conf,v 1.4 2001/10/10 04:21:02 deraadt Exp $
#
# instbin.conf - unified binary for the inst/upgr floppies
#
@@ -6,14 +6,13 @@
srcdirs distrib/special
srcdirs gnu/usr.bin usr.bin bin sbin usr.sbin
-progs dd mount_cd9660 df dhclient mount sync restore
+progs dd df mount sync restore
progs stty ln disklabel pax ping cat ifconfig dmesg ls
-progs less mount_nfs grep umount rsh fsck
-progs scsi mknod route ftp mount_ffs reboot ed
-progs cp gzip chmod fsck_ffs sort init newfs
-progs tip rm mt mkdir sed ksh sleep
+progs less grep umount fsck
+progs mknod route ftp mount_ffs reboot ed
+progs cp gzip chmod fsck_ffs init newfs
+progs rm mt mkdir sed ksh sleep
progs mv expr test hostname
-progs mg
ln mt eject
ln chmod chgrp
diff --git a/distrib/sparc64/ramdisk/list b/distrib/sparc64/ramdisk/list
index 92385632d51..a3333b825bc 100644
--- a/distrib/sparc64/ramdisk/list
+++ b/distrib/sparc64/ramdisk/list
@@ -1,8 +1,7 @@
-# $OpenBSD: list,v 1.4 2001/10/02 17:01:31 deraadt Exp $
+# $OpenBSD: list,v 1.5 2001/10/10 04:21:02 deraadt Exp $
SRCDIRS distrib/special
SRCDIRS gnu/usr.bin usr.bin bin sbin usr.sbin
-#SRCDIRS usr.bin/vi
# copy the crunched binary, link to it, and kill it
COPY ${OBJDIR}/instbin instbin
@@ -17,7 +16,7 @@ LINK instbin bin/hostname
LINK instbin bin/ln
LINK instbin bin/ls
LINK instbin bin/mkdir
-LINK instbin bin/mt bin/eject
+#LINK instbin bin/mt bin/eject
LINK instbin bin/mv
LINK instbin bin/pax bin/tar bin/cpio
LINK instbin bin/rm
@@ -28,48 +27,40 @@ LINK instbin bin/stty
LINK instbin bin/sync
LINK instbin bin/test bin/[
LINK instbin sbin/disklabel
-LINK instbin sbin/ancontrol
-LINK instbin sbin/pdisk
-LINK instbin sbin/fdisk
LINK instbin sbin/fsck
LINK instbin sbin/fsck_ffs
LINK instbin sbin/reboot sbin/halt
LINK instbin sbin/ifconfig
LINK instbin sbin/init
-LINK instbin sbin/dhclient
LINK instbin sbin/dmesg
LINK instbin sbin/mknod
LINK instbin sbin/mount
-LINK instbin sbin/mount_cd9660
+#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/restore
LINK instbin sbin/route
-#LINK instbin sbin/slattach
LINK instbin sbin/scsi
LINK instbin sbin/umount
LINK instbin usr/bin/grep usr/bin/fgrep usr/bin/egrep
-LINK instbin usr/bin/mg
+#LINK instbin usr/bin/mg
LINK instbin usr/bin/ftp
LINK instbin usr/bin/gzip usr/bin/gunzip usr/bin/gzcat
LINK instbin usr/bin/less usr/bin/more
-LINK instbin usr/bin/rsh
+#LINK instbin usr/bin/rsh
LINK instbin usr/bin/sed
LINK instbin usr/bin/sort
-LINK instbin usr/bin/tip
-LINK instbin usr/sbin/chat
-#SYMLINK ../../instbin usr/bin/build usr/bin/vi
# copy the MAKEDEV script and make some devices
COPY ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV
-SPECIAL cd dev; sh MAKEDEV ramdisk
+SPECIAL echo "cd dev; sh MAKEDEV ramdisk; rm MAKEDEV"
+SPECIAL cd dev; sh MAKEDEV ramdisk; rm MAKEDEV
# we need the contents of /usr/mdec
-COPY ${DESTDIR}/usr/mdec/installboot usr/mdec/installboot
-COPY ${DESTDIR}/usr/mdec/ofwboot usr/mdec/ofwboot
-COPY ${DESTDIR}/usr/mdec/bootblk usr/mdec/bootblk
+#COPY ${DESTDIR}/usr/mdec/installboot usr/mdec/installboot
+#COPY ${DESTDIR}/usr/mdec/ofwboot usr/mdec/ofwboot
+#COPY ${DESTDIR}/usr/mdec/bootblk usr/mdec/bootblk
# various files that we need in /etc for the install
COPY ${DESTDIR}/etc/group etc/group
@@ -82,18 +73,12 @@ SYMLINK /tmp/fstab.shadow etc/fstab
SYMLINK /tmp/resolv.conf.shadow etc/resolv.conf
SYMLINK /tmp/hosts etc/hosts
-# dhcp things
-COPY ${DESTDIR}/sbin/dhclient-script sbin/dhclient-script
-
# and the common installation tools
-COPY ${TOPDIR}/termcap.vt usr/share/misc/termcap
-#COPY ${DESTDIR}/usr/share/misc/scsi_modes usr/share/misc/scsi_modes
+COPY ${TOPDIR}/common/termcap.vt usr/share/misc/termcap
# and the installation tools
-COPY dot.profile .profile
-SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' -e "s/^ARCH=ARCH$/ARCH=`arch -s`/" < ${CURDIR}/install.md > install.md
-COPY ${CURDIR}/../../miniroot/install.sh install
-COPY ${CURDIR}/../../miniroot/upgrade.sh upgrade
-#SPECIAL sed "/^VERSION=/s/=.*/=${REV}/" < ${CURDIR}/install.sub > install.sub
-SPECIAL sed "/^VERSION=/s/=.*/=${REV}/" < ${CURDIR}/../../miniroot/install.sub > install.sub
-SPECIAL chmod 755 install upgrade
+SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' < ${CURDIR}/../common/dot.profile > .profile
+SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' -e "s/^ARCH=ARCH$/ARCH=`arch -s`/" < ${CURDIR}/../common/install.md > install.md
+SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' < ${CURDIR}/../../miniroot/install.sh > install
+SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' -e "/^VERSION=/s/=.*/=${REV}/" < ${CURDIR}/../../miniroot/install.sub > install.sub
+SPECIAL chmod 755 install
diff --git a/distrib/sparc64/ramdiskB/Makefile b/distrib/sparc64/ramdiskB/Makefile
new file mode 100644
index 00000000000..1f3a6e30ea2
--- /dev/null
+++ b/distrib/sparc64/ramdiskB/Makefile
@@ -0,0 +1,136 @@
+# $OpenBSD: Makefile,v 1.1 2001/10/10 04:21:02 deraadt 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= ${.CURDIR}/mtree.conf
+
+FLOPPY= floppyB${REV}.fs
+FLOPPYSIZE?= 2880
+FLOPPYTYPE?= floppy
+INSTALLBOOT?= /usr/mdec/installboot
+
+VND?= svnd0
+VND_DEV= /dev/${VND}a
+VND_RDEV= /dev/r${VND}a
+VND_CRDEV= /dev/r${VND}c
+PID!= echo $$$$
+
+GZIP?= gzip
+GZIPFLAGS?= -9v
+GZIPEXT?= .gz
+
+MOUNT_POINT?= /mnt
+DISKTYPE= rdroot
+PID!= echo $$$$
+REALIMAGE!= echo /tmp/image.${PID}
+IMAGE?= ramdisk${REV}.fs
+IMAGESIZE?= 8192 # 4MB in 512 byte blocks
+NEWFS_WILL_FAIL?=false
+CRUNCHGENOPTS?=
+KERNEL?= RAMDISKU5
+UTILS?= ${.CURDIR}/../miniroot
+STRIP?= strip
+
+DISKTYPE= rdroot
+NBLKS= 6144
+# minfree, opt, b/i trks, sects, cpg
+NEWFSARGS= -m 0 -o space -c 16 -i 8192
+
+.ifndef DESTDIR
+all ${IMAGE}:
+ @echo setenv DESTDIR before making a ramdisk!
+ @false
+.else
+
+# mix config is not needed.
+all: ${FLOPPY} ${BSD_RD}
+
+bsd.gz: bsd.rd
+ ${GZIP} ${GZIPFLAGS} < bsd.rd > bsd.gz
+
+${FLOPPY}: bsd.gz ${BOOT} /usr/
+ dd if=/dev/zero of=${REALIMAGE} count=${FLOPPYSIZE}
+ vnconfig -v -c ${VND} ${REALIMAGE}
+ disklabel -w ${RAWLABEL} ${VND} ${FLOPPYTYPE}
+ newfs ${NEWFSOPTS_FD} ${VND_RDEV}
+ mount ${VND_DEV} ${MOUNT_POINT}
+ cp ${DESTDIR}/usr/mdec/ofwboot ${MOUNT_POINT}$/
+ cp bsd.gz ${MOUNT_POINT}/bsd
+ ${INSTALLBOOT} -v ${DESTDIR}/usr/mdec/bootblk \
+ `echo ${VND_RDEV} | sed -e 's/a$$/c/'`
+ @echo ""
+ @df -i ${MOUNT_POINT}
+ @echo ""
+ umount ${MOUNT_POINT}
+ vnconfig -u ${VND}
+ dd if=${REALIMAGE} of=${FLOPPY} count=${FLOPPYSIZE}
+ rm -f ${REALIMAGE}
+
+${BSD_RD}: ${CBIN} ${IMAGE} bsd elfrdsetroot
+ cp bsd ${BSD_RD}
+ ${.OBJDIR}/elfrdsetroot ${BSD_RD} < ${IMAGE}
+
+${IMAGE}: rd_setup do_files rd_teardown
+
+.endif
+
+bsd:
+ cd ${TOP}/../../sys/arch/sparc64/conf && config ${KERNEL}
+ cd ${TOP}/../../sys/arch/sparc64/compile/${KERNEL} && \
+ make clean && make depend && COPTS=-Os make
+ cp ${TOP}/../../sys/arch/sparc64/compile/${KERNEL}/bsd bsd
+
+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}
+
+elfrdsetroot: ${TOP}/../common/elfrdsetroot.c
+ ${HOSTCC} -DDEBUG -o elfrdsetroot ${TOP}/../common/elfrdsetroot.c
+
+unconfig:
+ -umount -f ${MOUNT_POINT}
+ -vnconfig -u ${VND}
+
+.PRECIOUS: ${IMAGE}
+
+install:
+ cp ${FLOPPY} ${DESTDIR}/snapshot/
+
+${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CBIN}.conf
+ crunchgen -E -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC}
+
+${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} ARCHDIR=${.CURDIR}/.. TARGDIR=${MOUNT_POINT} \
+ sh ${TOP}/common/runlist.sh ${LISTS}
+
+clean cleandir:
+ /bin/rm -f core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache \
+ *.o *.lo *.c bsd ${BSD_RD} bsd.gz ${FLOPPY} elfrdsetroot
+
+beforeinstall:
+ cp ${BSD.RD} ${DESTDIR}/snapshot
+
+.include <bsd.obj.mk>
+.include <bsd.subdir.mk>
diff --git a/distrib/sparc64/ramdiskB/instbin.conf b/distrib/sparc64/ramdiskB/instbin.conf
new file mode 100644
index 00000000000..52cb5f54b5f
--- /dev/null
+++ b/distrib/sparc64/ramdiskB/instbin.conf
@@ -0,0 +1,32 @@
+# $OpenBSD: instbin.conf,v 1.1 2001/10/10 04:21:02 deraadt Exp $
+#
+# instbin.conf - unified binary for the inst/upgr floppies
+#
+
+srcdirs distrib/special
+srcdirs gnu/usr.bin usr.bin bin sbin usr.sbin
+
+progs dd df mount sync restore
+progs stty ln disklabel pax ping cat ifconfig dmesg ls
+progs less grep umount fsck
+progs mknod route ftp mount_ffs reboot ed
+progs cp gzip chmod fsck_ffs init newfs
+progs rm mt mkdir sed ksh sleep
+progs mv expr test hostname
+
+ln mt eject
+ln chmod chgrp
+ln chmod chown
+ln pax tar
+ln pax cpio
+ln less more
+ln grep fgrep
+ln grep egrep
+ln reboot halt
+ln gzip gunzip
+ln gzip gzcat
+ln ksh sh
+ln ksh -sh
+ln test [
+
+libs -ledit -lutil -lcurses -ll -lm -lkvm -lz -lkrb -ldes
diff --git a/distrib/sparc64/ramdiskB/list b/distrib/sparc64/ramdiskB/list
new file mode 100644
index 00000000000..e32b5f89fae
--- /dev/null
+++ b/distrib/sparc64/ramdiskB/list
@@ -0,0 +1,84 @@
+# $OpenBSD: list,v 1.1 2001/10/10 04:21:02 deraadt 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 bin/eject
+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/sleep
+LINK instbin bin/stty
+LINK instbin bin/sync
+LINK instbin bin/test bin/[
+LINK instbin sbin/disklabel
+LINK instbin sbin/fsck
+LINK instbin sbin/fsck_ffs
+LINK instbin sbin/reboot sbin/halt
+LINK instbin sbin/ifconfig
+LINK instbin sbin/init
+LINK instbin sbin/dmesg
+LINK instbin sbin/mknod
+LINK instbin sbin/mount
+#LINK instbin sbin/mount_cd9660
+LINK instbin sbin/mount_ffs
+LINK instbin sbin/newfs
+LINK instbin sbin/ping
+LINK instbin sbin/restore
+LINK instbin sbin/route
+LINK instbin sbin/scsi
+LINK instbin sbin/umount
+LINK instbin usr/bin/grep usr/bin/fgrep usr/bin/egrep
+#LINK instbin usr/bin/mg
+LINK instbin usr/bin/ftp
+LINK instbin usr/bin/gzip usr/bin/gunzip usr/bin/gzcat
+LINK instbin usr/bin/less usr/bin/more
+#LINK instbin usr/bin/rsh
+LINK instbin usr/bin/sed
+LINK instbin usr/bin/sort
+
+# copy the MAKEDEV script and make some devices
+COPY ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV
+SPECIAL echo "cd dev; sh MAKEDEV ramdisk; rm MAKEDEV"
+SPECIAL cd dev; sh MAKEDEV ramdisk; rm MAKEDEV
+
+# we need the contents of /usr/mdec
+#COPY ${DESTDIR}/usr/mdec/installboot usr/mdec/installboot
+#COPY ${DESTDIR}/usr/mdec/ofwboot usr/mdec/ofwboot
+#COPY ${DESTDIR}/usr/mdec/bootblk usr/mdec/bootblk
+
+# various files that we need in /etc for the install
+COPY ${DESTDIR}/etc/group etc/group
+COPY ${DESTDIR}/etc/protocols etc/protocols
+COPY ${DESTDIR}/etc/services etc/services
+COPY ${DESTDIR}/etc/spwd.db etc/spwd.db
+COPY ${DESTDIR}/etc/disktab etc/disktab
+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
+
+# and the common installation tools
+COPY ${TOPDIR}/common/termcap.vt usr/share/misc/termcap
+
+# and the installation tools
+SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' < ${CURDIR}/../common/dot.profile > .profile
+SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' -e "s/^ARCH=ARCH$/ARCH=`arch -s`/" < ${CURDIR}/../common/install.md > install.md
+SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' < ${CURDIR}/../../miniroot/install.sh > install
+SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' -e "/^VERSION=/s/=.*/=${REV}/" < ${CURDIR}/../../miniroot/install.sub > install.sub
+SPECIAL chmod 755 install
diff --git a/distrib/sparc64/ramdiskB/mtree.conf b/distrib/sparc64/ramdiskB/mtree.conf
new file mode 100644
index 00000000000..c619ef1e898
--- /dev/null
+++ b/distrib/sparc64/ramdiskB/mtree.conf
@@ -0,0 +1,90 @@
+# $OpenBSD: mtree.conf,v 1.1 2001/10/10 04:21:02 deraadt Exp $
+
+/set type=dir uname=root gname=wheel mode=0755
+# .
+.
+
+# ./bin
+bin
+# ./bin
+..
+
+# ./dev
+dev
+# ./dev
+..
+
+# ./etc
+etc
+
+# ./etc
+..
+
+# ./mnt
+mnt
+# ./mnt
+..
+
+# ./mnt2
+mnt2
+# ./mnt2
+..
+
+# ./sbin
+sbin
+# ./sbin
+..
+
+# ./tmp
+tmp mode=01777
+# ./tmp
+..
+
+# ./usr
+usr
+
+# ./usr/bin
+bin
+# ./usr/bin
+..
+
+# ./usr/mdec
+mdec
+# ./usr/mdec
+..
+
+# ./usr/sbin
+sbin
+# ./usr/sbin
+..
+
+# ./usr/share
+share
+
+# ./usr/share/misc
+misc
+# ./usr/share/misc
+..
+
+# ./usr/share
+..
+
+# ./usr
+..
+
+# ./var
+var
+
+# ./var/tmp
+tmp mode=0177
+
+# ./var/tmp
+..
+
+# ./var/db
+db
+# ./var/db
+..
+
+# ./var
+..