From c7872753b425d65403cf3426a5b72ab8e5f3e10a Mon Sep 17 00:00:00 2001 From: deraadt Date: Sun, 19 Nov 1995 13:53:08 +0000 Subject: [PATCH] from netbsd; just cleanup --- sys/arch/sun3/stand/Makefile.inc | 18 +++++++++++++----- sys/arch/sun3/stand/README | 7 +++++-- sys/arch/sun3/stand/bootxx/Makefile | 6 +++--- sys/arch/sun3/stand/installboot/installboot.8 | 7 ++++--- sys/arch/sun3/stand/installboot/installboot.c | 6 +++++- sys/arch/sun3/stand/libsa/Makefile | 6 ++++-- sys/arch/sun3/stand/netboot/Makefile | 8 ++------ sys/arch/sun3/stand/tapeboot/Makefile | 8 +------- sys/arch/sun3/stand/ufsboot/Makefile | 6 +----- 9 files changed, 38 insertions(+), 34 deletions(-) diff --git a/sys/arch/sun3/stand/Makefile.inc b/sys/arch/sun3/stand/Makefile.inc index bd2cb1e16b8..f454d6ea438 100644 --- a/sys/arch/sun3/stand/Makefile.inc +++ b/sys/arch/sun3/stand/Makefile.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.5 1995/10/13 21:44:11 gwr Exp $ +# $NetBSD: Makefile.inc,v 1.5.2.1 1995/11/18 06:47:31 gwr Exp $ .if defined(SA_PROG) @@ -9,11 +9,12 @@ S= ${.CURDIR}/../../../.. RELOC?= 240000 DEFS?= -DSTANDALONE INCL?= -I${.CURDIR} -I${.CURDIR}/../libsa -I${S}/lib/libsa -I${S} -COPTS?= -msoft-float ${DEFS} ${INCL} +COPTS?= -msoft-float ${DEFS} ${DBG} ${INCL} LIBSA?= ../libsa SRTOBJ?= ${LIBSA}/SRT0.o ${LIBSA}/SRT1.o -LIBS?= ${LIBSA}/libsa.a +SRTLIB?= ${LIBSA}/libsa.a + MDEC_DIR?=/usr/mdec SRCS?= ${SA_PROG}.c @@ -29,8 +30,9 @@ ${SA_PROG}.bin : ${SA_PROG} dd if=a.out ibs=32 skip=1 of=$@ obs=1k conv=osync -rm -f a.out -${SA_PROG} : ${SRTOBJ} ${OBJS} ${LIBS} - ${LD} -N -T ${RELOC} -e start -o $@ ${SRTOBJ} ${OBJS} ${LIBS} +${SA_PROG} : ${OBJS} ${DPADD} + ${LD} -N -T ${RELOC} -e start -o $@ \ + ${SRTOBJ} ${OBJS} ${LDADD} ${SRTLIB} @size $@ .if !target(clean) @@ -39,4 +41,10 @@ clean: -rm -f ${CLEANFILES} *.o .endif +.if !target(install) +install: ${SA_PROG}.bin + install ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + ${SA_PROG}.bin ${DESTDIR}${MDEC_DIR}/${SA_PROG} +.endif + .endif diff --git a/sys/arch/sun3/stand/README b/sys/arch/sun3/stand/README index 2997060575b..9f8e098c0b5 100644 --- a/sys/arch/sun3/stand/README +++ b/sys/arch/sun3/stand/README @@ -1,4 +1,4 @@ -/* $NetBSD: README,v 1.2 1995/08/12 18:38:30 gwr Exp $ */ +/* $NetBSD: README,v 1.2.2.1 1995/11/18 06:47:34 gwr Exp $ */ The sun bootblocks are split into two parts: a small 1st-level program that gets written right after the superblock in a partition (and is hence limited @@ -19,7 +19,10 @@ root filesystem (on `sd0a') using the file `/boot' as the second level boot program: mount /dev/sd0a /mnt - installboot /mnt/ufsboot bootxx /dev/rsd0a + cd /usr/mdec + cp -p ufsboot /mnt/ufsboot + sync ; sleep 1 ; sync + ./installboot -v /mnt/ufsboot bootxx /dev/rsd0a The above only works with securelevel <= 0 (see init.8 manual). diff --git a/sys/arch/sun3/stand/bootxx/Makefile b/sys/arch/sun3/stand/bootxx/Makefile index c1f0c5e8cd0..10fe650671c 100644 --- a/sys/arch/sun3/stand/bootxx/Makefile +++ b/sys/arch/sun3/stand/bootxx/Makefile @@ -1,14 +1,14 @@ -# $NetBSD: Makefile,v 1.2 1995/06/09 22:17:19 gwr Exp $ +# $NetBSD: Makefile,v 1.2.2.1 1995/11/18 06:47:36 gwr Exp $ SA_PROG= bootxx SRCS= bootxx.c conf.c all: ${SA_PROG} -.include - # Do not strip or remove a.out header for this one. install: ${SA_PROG} install ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${SA_PROG} ${DESTDIR}${MDEC_DIR}/${SA_PROG} +.include + diff --git a/sys/arch/sun3/stand/installboot/installboot.8 b/sys/arch/sun3/stand/installboot/installboot.8 index f0346141743..e5495d80c93 100644 --- a/sys/arch/sun3/stand/installboot/installboot.8 +++ b/sys/arch/sun3/stand/installboot/installboot.8 @@ -1,4 +1,4 @@ -.\" $Id: installboot.8,v 1.1.1.1 1995/10/18 08:51:57 deraadt Exp $ +.\" $Id: installboot.8,v 1.2 1995/11/19 13:53:12 deraadt Exp $ .\" .Dd 31 May 1995 .Dt INSTALLBOOT 8 @@ -51,7 +51,8 @@ the raw device, but that is not allowed with the kernel .Nm securelevel variable set to a value greater than zero (the default), so .Nm installboot -only works in single-user mode (or insecure mode - see init.8). +only works in single-user mode (or insecure mode - see +.Xr init 8 ). .Sh "SEE ALSO" -.Xr disklabel 8 +.Xr disklabel 8 , .Xr init 8 diff --git a/sys/arch/sun3/stand/installboot/installboot.c b/sys/arch/sun3/stand/installboot/installboot.c index b79070bbc2f..3592da16b1b 100644 --- a/sys/arch/sun3/stand/installboot/installboot.c +++ b/sys/arch/sun3/stand/installboot/installboot.c @@ -1,4 +1,4 @@ -/* $NetBSD: installboot.c,v 1.4 1995/11/07 23:01:40 gwr Exp $ */ +/* $NetBSD: installboot.c,v 1.3.2.2 1995/11/18 06:47:40 gwr Exp $ */ /* * Copyright (c) 1994 Paul Kranenburg @@ -292,6 +292,10 @@ int devfd; * Open 2nd-level boot program and record the block numbers * it occupies on the filesystem represented by `devfd'. */ + + /* Make sure the (probably new) boot file is on disk. */ + sync(); sleep(1); + if ((fd = open(boot, O_RDONLY)) < 0) err(1, "open: %s", boot); diff --git a/sys/arch/sun3/stand/libsa/Makefile b/sys/arch/sun3/stand/libsa/Makefile index cee38fb82ca..2838d9a70d6 100644 --- a/sys/arch/sun3/stand/libsa/Makefile +++ b/sys/arch/sun3/stand/libsa/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 1995/09/23 03:42:34 gwr Exp $ +# $NetBSD: Makefile,v 1.8.2.1 1995/11/18 06:47:43 gwr Exp $ LIB=sa @@ -26,10 +26,12 @@ SRC_here= clock.c dev_disk.c devopen.c dvma.c \ SRCS= ${SRC_net} ${SRC_sa} ${SRC_kern} ${SRC_sun3} ${SRC_here} +CLEANFILES+= SRT0.o SRT1.o + # DBG= -DDEBUG -DNETIF_DEBUG -DNFS_DEBUG -DRPC_DEBUG \ # -DNET_DEBUG -DRARP_DEBUG -DETHER_DEBUG -DEFS= -DCOMPAT_UFS +DEFS= -DSTANDALONE -DCOMPAT_UFS INCL= -I${.CURDIR} -I${S}/lib/libsa -I${S} COPTS= -msoft-float CFLAGS= -O ${COPTS} ${DEFS} ${DBG} ${INCL} diff --git a/sys/arch/sun3/stand/netboot/Makefile b/sys/arch/sun3/stand/netboot/Makefile index 0d62c7c4a5a..41c398cc3f6 100644 --- a/sys/arch/sun3/stand/netboot/Makefile +++ b/sys/arch/sun3/stand/netboot/Makefile @@ -1,15 +1,11 @@ -# $NetBSD: Makefile,v 1.3 1995/09/23 03:42:47 gwr Exp $ +# $NetBSD: Makefile,v 1.3.2.1 1995/11/18 06:47:45 gwr Exp $ SA_PROG= netboot SRCS= boot.c conf.c version.c dev_net.c -DEFS= -DSUN_BOOTPARAMS +DEFS= -DSTANDALONE -DSUN_BOOTPARAMS all: ${SA_PROG}.bin .include -install: ${SA_PROG}.bin - install ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - ${SA_PROG}.bin ${DESTDIR}${MDEC_DIR}/${SA_PROG} - diff --git a/sys/arch/sun3/stand/tapeboot/Makefile b/sys/arch/sun3/stand/tapeboot/Makefile index af9e34e5b82..3665e85b6b7 100644 --- a/sys/arch/sun3/stand/tapeboot/Makefile +++ b/sys/arch/sun3/stand/tapeboot/Makefile @@ -1,15 +1,9 @@ -# $NetBSD: Makefile,v 1.2 1995/10/17 22:58:10 gwr Exp $ +# $NetBSD: Makefile,v 1.2.2.1 1995/11/18 06:47:47 gwr Exp $ SA_PROG= tapeboot SRCS= boot.c conf.c rawfs.c dev_tape.c version.c -# DEFS= -DDEBUG - all: ${SA_PROG}.bin .include -install: ${SA_PROG}.bin - install ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - ${SA_PROG}.bin ${DESTDIR}${MDEC_DIR}/${SA_PROG} - diff --git a/sys/arch/sun3/stand/ufsboot/Makefile b/sys/arch/sun3/stand/ufsboot/Makefile index c4e192128cd..72c46884a6d 100644 --- a/sys/arch/sun3/stand/ufsboot/Makefile +++ b/sys/arch/sun3/stand/ufsboot/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 1995/06/09 22:24:06 gwr Exp $ +# $NetBSD: Makefile,v 1.2.2.1 1995/11/18 06:47:49 gwr Exp $ SA_PROG= ufsboot SRCS= boot.c conf.c version.c @@ -7,7 +7,3 @@ all: ${SA_PROG}.bin .include -install: ${SA_PROG}.bin - install ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - ${SA_PROG}.bin ${DESTDIR}${MDEC_DIR}/${SA_PROG} - -- 2.20.1