diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2003-08-07 20:57:07 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2003-08-07 20:57:07 +0000 |
commit | e6e87dd6f6ed6af5fb7684889f1383464ceb3983 (patch) | |
tree | 60b048c280bcc266fa3a0befe5b2866d8ca69d9d /distrib/mvme88k | |
parent | 9c57613c13cda43ccb45adcb06584b82965f0e03 (diff) |
Bits and pieces towards mvme88k installation media, mostly cloned from the
mvme68k code.
Diffstat (limited to 'distrib/mvme88k')
-rw-r--r-- | distrib/mvme88k/Makefile.inc | 5 | ||||
-rw-r--r-- | distrib/mvme88k/miniroot/Makefile.inc | 5 | ||||
-rw-r--r-- | distrib/mvme88k/miniroot/list | 29 | ||||
-rw-r--r-- | distrib/mvme88k/ramdisk/Makefile | 110 | ||||
-rw-r--r-- | distrib/mvme88k/ramdisk/Makefile.inc | 24 | ||||
-rw-r--r-- | distrib/mvme88k/ramdisk/disktab.preinstall | 32 | ||||
-rw-r--r-- | distrib/mvme88k/ramdisk/disktab.shadow | 32 | ||||
-rw-r--r-- | distrib/mvme88k/ramdisk/install.md | 32 | ||||
-rw-r--r-- | distrib/mvme88k/ramdisk/list | 56 |
9 files changed, 107 insertions, 218 deletions
diff --git a/distrib/mvme88k/Makefile.inc b/distrib/mvme88k/Makefile.inc index e455eaa92d5..211b17dbc65 100644 --- a/distrib/mvme88k/Makefile.inc +++ b/distrib/mvme88k/Makefile.inc @@ -1,7 +1,6 @@ -# $OpenBSD: Makefile.inc,v 1.1 1998/12/17 02:16:29 smurph Exp $ +# $OpenBSD: Makefile.inc,v 1.2 2003/08/07 20:57:03 miod Exp $ -# Revision is 1.2 -REV=12 +REV=${OSrev} LDSTATIC=-static diff --git a/distrib/mvme88k/miniroot/Makefile.inc b/distrib/mvme88k/miniroot/Makefile.inc deleted file mode 100644 index 7e52a3ba954..00000000000 --- a/distrib/mvme88k/miniroot/Makefile.inc +++ /dev/null @@ -1,5 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.1 1998/12/17 02:16:31 smurph Exp $ - -IMAGESIZE= 8192 -NEWFSOPTS= -i 2048 -NEWFS_WILL_FAIL= true diff --git a/distrib/mvme88k/miniroot/list b/distrib/mvme88k/miniroot/list deleted file mode 100644 index 0878eae6aa2..00000000000 --- a/distrib/mvme88k/miniroot/list +++ /dev/null @@ -1,29 +0,0 @@ -# $OpenBSD: list,v 1.14 2003/01/30 22:09:56 deraadt Exp $ -# $NetBSD: list,v 1.2.4.2 1996/06/26 19:25:00 pk Exp $ - -# Amiga extra's -LINK instbin sbin/disklabel -LINK instbin sbin/mount_msdos -LINK instbin usr/bin/cksum usr/bin/sum -LINK instbin usr/bin/grep usr/bin/egrep usr/bin/fgrep -LINK instbin usr/bin/less usr/bin/more - -SYMLINK /tmp var/tmp - -# copy the MAKEDEV script and make some devices -SCRIPT ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV -SPECIAL cd dev; sh MAKEDEV all - -# copy the kernel -COPY bsd bsd - -# various files that we need in /etc for the install -SCRIPT ${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 -TERMCAP vt100,vt220,dumb usr/share/misc/termcap - -# and the installation tools -SCRIPT ${ARCHDIR}/../install.md install.md diff --git a/distrib/mvme88k/ramdisk/Makefile b/distrib/mvme88k/ramdisk/Makefile index 1864996d9f3..595a7410529 100644 --- a/distrib/mvme88k/ramdisk/Makefile +++ b/distrib/mvme88k/ramdisk/Makefile @@ -1,80 +1,59 @@ -# $OpenBSDBSD: Makefile,v 1.1 1995/07/18 04:13:06 briggs Exp $ -# $NetBSD: Makefile,v 1.1 1995/07/18 04:13:06 briggs Exp $ +# $OpenBSD: Makefile,v 1.6 2003/08/07 20:57:05 miod Exp $ TOP= ${.CURDIR}/.. .include "${TOP}/Makefile.inc" +BSD_RD= bsd.rd IMAGE= mr.fs -CRUNCHCONF?= ${.CURDIR}/${CBIN}.conf -BASE=mr +CBIN?= instbin +LISTS= ${.CURDIR}/list +UTILS?= ${.CURDIR}/../../miniroot MOUNT_POINT= /mnt +MTREE= ${UTILS}/mtree.conf -#FS= ramdisk.fs VND?= svnd0 VND_DEV= /dev/${VND}a VND_RDEV= /dev/r${VND}a VND_CRDEV= /dev/r${VND}c PID!= echo $$$$ -REALIMAGE!= echo /tmp/image.${PID} -LISTFLOPPY?= ${.CURDIR}/list_ramdisk - -.include "Makefile.inc" - -all: bsd.rd - -#${FS}: bsd.gz -# dd if=/dev/zero of=${REALIMAGE} count=4096 -# vnconfig -v -c ${VND} ${REALIMAGE} -# disklabel -w ${VND} rdroot -# newfs -m 0 -o space -i 8192 -c 80 ${VND_RDEV} -# mount ${VND_DEV} ${MOUNT_POINT} -# TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \ -# TARGDIR=${MOUNT_POINT} UTILS=${UTILS} \ -# sh ${UTILS}/runlist.sh ${LISTFLOPPY} -# /usr/mdec/installboot -v /mnt/boot ${DESTDIR}/usr/mdec/biosboot ${VND_CRDEV} -# @echo "" -# @df -i ${MOUNT_POINT} -# @echo "" -# umount ${MOUNT_POINT} -# vnconfig -u ${VND} -# cp ${REALIMAGE} ${FS} - -DISKTYPE= rdroot -NBLKS= 8192 -# old format, minfree, opt, b/i trks, sects, cpg -#NEWFSARGS= -t ffs -m 0 -o space -u 32 -c 16 -#NEWFSARGS= -m 0 -o space -u 32 -c 16 -NEWFSARGS= -bsd.gz: bsd.rd - gzip -c9 bsd.rd > bsd.gz - -bsd.rd: ${IMAGE} bsd rdsetroot - cp bsd bsd.rd - ${.CURDIR}/${__objdir}/rdsetroot bsd.rd < ${IMAGE} + + +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: -# cd ${.CURDIR}/../../../sys/arch/mvme88k/conf && config RAMDISK -# cd ${.CURDIR}/../../../sys/arch/mvme88k/compile/RAMDISK && \ -# make clean && make +.ifndef(NOBUILD) + cd ${.CURDIR}/../../../sys/arch/mvme88k/conf && config RAMDISK + cd ${.CURDIR}/../../../sys/arch/mvme88k/compile/RAMDISK && \ + make clean && make +.endif cp ${.CURDIR}/../../../sys/arch/mvme88k/compile/RAMDISK/bsd bsd -${IMAGE}: ${CBIN} rd_setup do_files rd_teardown +rd_test: rd_setup rd_teardown -rd_setup: ${CBIN} - dd if=/dev/zero of=${REALIMAGE} bs=512 count=${NBLKS} - vnconfig -v -c ${VND} ${REALIMAGE} - disklabel -w ${VND} ${DISKTYPE} +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 -f -y ${VND_RDEV} > /dev/null + 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 @@ -82,9 +61,32 @@ rdsetroot: ${TOP}/../common/rdsetroot.c unconfig: -umount -f ${MOUNT_POINT} -vnconfig -u ${VND} - -/bin/rm -f ${IMAGE} .PRECIOUS: ${IMAGE} install: - cp bsd.rd ${DESTDIR}/snapshot/bsd.rd + 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/mvme88k/ramdisk/Makefile.inc b/distrib/mvme88k/ramdisk/Makefile.inc index 0b07609f20e..26e1a1b272b 100644 --- a/distrib/mvme88k/ramdisk/Makefile.inc +++ b/distrib/mvme88k/ramdisk/Makefile.inc @@ -1,29 +1,37 @@ # -# $OpenBSD: Makefile.inc,v 1.6 2002/06/09 05:53:54 todd Exp $ +# $OpenBSD: Makefile.inc,v 1.7 2003/08/07 20:57:05 miod Exp $ # # TOP is assumed to be defined by Makefile including this one. CBIN?= instbin -COMMONDIR= ${TOP}/ramdisk -UTILS?= ${TOP}/../miniroot +LISTS= ${.CURDIR}/list +UTILS?= ${.CURDIR}/../../miniroot +COMMONDIR= ${TOP}/ramdisk MOUNT_POINT?= ${TOP}/${BASE}/fs -LISTS= ${.CURDIR}/list CRUNCHCONF?= ${COMMONDIR}/${CBIN}.conf MTREE= ${UTILS}/mtree.conf RAWLABEL= -${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF} - crunchgen -D ${BSDSRCDIR} -L ${DESTDIR}/usr/lib ${CRUNCHCONF} +${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 - @echo mtree done... + mtree -def ${MTREE} -p ${MOUNT_POINT}/ -u TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \ TARGDIR=${MOUNT_POINT} UTILS=${UTILS} \ sh ${UTILS}/runlist.sh ${LISTS} diff --git a/distrib/mvme88k/ramdisk/disktab.preinstall b/distrib/mvme88k/ramdisk/disktab.preinstall deleted file mode 100644 index 73cc9cbb010..00000000000 --- a/distrib/mvme88k/ramdisk/disktab.preinstall +++ /dev/null @@ -1,32 +0,0 @@ -# -# $OpenBSD: disktab.preinstall,v 1.2 2002/06/09 05:53:54 todd 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 --git a/distrib/mvme88k/ramdisk/disktab.shadow b/distrib/mvme88k/ramdisk/disktab.shadow deleted file mode 100644 index 3e954e5f84c..00000000000 --- a/distrib/mvme88k/ramdisk/disktab.shadow +++ /dev/null @@ -1,32 +0,0 @@ -# -# $OpenBSD: disktab.shadow,v 1.2 2002/06/09 05:53:54 todd 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 --git a/distrib/mvme88k/ramdisk/install.md b/distrib/mvme88k/ramdisk/install.md index 58a2f9b857e..171b19fc786 100644 --- a/distrib/mvme88k/ramdisk/install.md +++ b/distrib/mvme88k/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.18 2002/11/07 01:28:52 krw Exp $ +# $OpenBSD: install.md,v 1.19 2003/08/07 20:57:06 miod Exp $ # Copyright (c) 1996 The NetBSD Foundation, Inc. # All rights reserved. # @@ -44,35 +44,11 @@ ARCH=ARCH md_set_term() { } -md_get_ifdevs() { - # return available network devices - dmesg | egrep "(^ie[0-9] )|(^le[0-9] )" | cut -d" " -f1 | sort -u -} - md_installboot() { - local _rawdev - - if [ "X${1}" = X"" ]; then - echo "No disk device specified, you must run installboot manually." - return - fi - _rawdev=/dev/r${1}a - - # use extracted mdec if it exists (may be newer) - if [ -d /mnt/usr/mdec ]; then - cp /mnt/usr/mdec/bootsd /mnt/bootsd - /mnt/usr/mdec/installboot -v /mnt/bootsd /mnt/usr/mdec/bootxx _rawdev - elif [ -d /usr/mdec ]; then - cp /usr/mdec/bootsd /mnt/bootsd - /usr/mdec/installboot -v /mnt/bootsd /usr/mdec/bootxx _rawdev - else - echo "No boot block prototypes found, you must run installboot manually." - fi + echo Installing boot block... + cp /mnt/usr/mdec/bootsd /mnt/bootsd + /mnt/usr/mdec/installboot -v /mnt/bootsd /mnt/usr/mdec/bootxx /dev/r${1}a } -md_labeldisk() { - echo "huh" -} - md_checkfordisklabel() { # $1 is the disk to check diff --git a/distrib/mvme88k/ramdisk/list b/distrib/mvme88k/ramdisk/list index 2780daaef10..2d184cce62b 100644 --- a/distrib/mvme88k/ramdisk/list +++ b/distrib/mvme88k/ramdisk/list @@ -1,34 +1,34 @@ -# $OpenBSD: list,v 1.21 2003/06/11 03:49:36 miod Exp $ +# $OpenBSD: list,v 1.22 2003/08/07 20:57:06 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/df 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/kill -LINK instbin bin/hostname LINK instbin bin/mkdir LINK instbin bin/mt LINK instbin bin/mv -LINK instbin bin/pwd +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/sleep -LINK instbin bin/sync -LINK instbin bin/test -LINK instbin bin/pax bin/tar bin/cpio -LINK instbin bin/[ +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/halt +LINK instbin sbin/reboot sbin/halt LINK instbin sbin/ifconfig LINK instbin sbin/init LINK instbin sbin/mknod @@ -37,42 +37,44 @@ LINK instbin sbin/mount_cd9660 LINK instbin sbin/mount_ffs LINK instbin sbin/mount_nfs LINK instbin sbin/newfs -LINK instbin sbin/reboot +LINK instbin sbin/ping 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/egrep -LINK instbin usr/bin/grep -LINK instbin usr/bin/gzip -LINK instbin usr/bin/more -LINK instbin usr/bin/less +LINK instbin usr/bin/gzip usr/bin/gunzip usr/bin/gzcat LINK instbin usr/bin/sed -LINK instbin usr/bin/tar -LINK instbin usr/bin/pax # copy the MAKEDEV script and make some devices SCRIPT ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV SPECIAL cd dev; sh MAKEDEV ramdisk -# mdec -COPY ${DESTDIR}/usr/mdec/installboot usr/mdec -COPY ${DESTDIR}/usr/mdec/bootxx usr/mdec -COPY ${DESTDIR}/usr/mdec/bootsd usr/mdec +# we need the contents of /usr/mdec +COPY ${DESTDIR}/usr/mdec/netboot usr/mdec/netboot +COPY ${DESTDIR}/usr/mdec/bootxx usr/mdec/bootxx +COPY ${DESTDIR}/usr/mdec/bootsd usr/mdec/bootsd +COPY ${DESTDIR}/usr/mdec/installboot usr/mdec/installboot # 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 -# the disktab explanation file -COPY disktab.preinstall etc +# 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/upgrade.sh upgrade SCRIPT ${CURDIR}/../../miniroot/install.sh install +SCRIPT ${CURDIR}/../../miniroot/upgrade.sh upgrade SCRIPT ${CURDIR}/../../miniroot/install.sub install.sub -SPECIAL chmod 755 install upgrade + +SPECIAL chmod 755 install upgrade sbin/dhclient-script |