diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1997-09-17 10:46:26 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1997-09-17 10:46:26 +0000 |
commit | 6476cf829b28337c9b81bab966bbc4a4abe37982 (patch) | |
tree | 4c6323f69275a5aaa2d1e0a467f4f907e2f47314 /sys | |
parent | 3e5a5259f8fb1b6393dd2cf83fb2c3eeda0ea959 (diff) |
Reorganizaed bootblocks. Builds like hp300 now.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sparc/stand/Makefile | 37 | ||||
-rw-r--r-- | sys/arch/sparc/stand/Makefile.inc | 56 | ||||
-rw-r--r-- | sys/arch/sparc/stand/binstall/Makefile | 9 | ||||
-rw-r--r-- | sys/arch/sparc/stand/binstall/binstall.sh (renamed from sys/arch/sparc/stand/binstall.sh) | 2 | ||||
-rw-r--r-- | sys/arch/sparc/stand/boot/Makefile | 23 | ||||
-rw-r--r-- | sys/arch/sparc/stand/boot/boot.c (renamed from sys/arch/sparc/stand/boot.c) | 18 | ||||
-rw-r--r-- | sys/arch/sparc/stand/bootxx/Makefile | 36 | ||||
-rw-r--r-- | sys/arch/sparc/stand/bootxx/bootxx.c (renamed from sys/arch/sparc/stand/bootxx.c) | 9 | ||||
-rw-r--r-- | sys/arch/sparc/stand/bootxx/closeall.c | 6 | ||||
-rw-r--r-- | sys/arch/sparc/stand/common/conf.c (renamed from sys/arch/sparc/stand/conf.c) | 9 | ||||
-rw-r--r-- | sys/arch/sparc/stand/common/dvma.c (renamed from sys/arch/sparc/stand/dvma.c) | 4 | ||||
-rw-r--r-- | sys/arch/sparc/stand/common/net.c (renamed from sys/arch/sparc/stand/bootnet.c) | 12 | ||||
-rw-r--r-- | sys/arch/sparc/stand/common/netif_sun.c (renamed from sys/arch/sparc/stand/netif_sun.c) | 9 | ||||
-rw-r--r-- | sys/arch/sparc/stand/common/promdev.c (renamed from sys/arch/sparc/stand/promdev.c) | 7 | ||||
-rw-r--r-- | sys/arch/sparc/stand/common/promdev.h (renamed from sys/arch/sparc/stand/promdev.h) | 5 | ||||
-rw-r--r-- | sys/arch/sparc/stand/common/srt0.S (renamed from sys/arch/sparc/stand/srt0.S) | 1 | ||||
-rw-r--r-- | sys/arch/sparc/stand/common/version.c (renamed from sys/arch/sparc/stand/version.c) | 5 | ||||
-rw-r--r-- | sys/arch/sparc/stand/installboot/Makefile | 10 | ||||
-rw-r--r-- | sys/arch/sparc/stand/installboot/installboot.8 (renamed from sys/arch/sparc/stand/installboot.8) | 1 | ||||
-rw-r--r-- | sys/arch/sparc/stand/installboot/installboot.c (renamed from sys/arch/sparc/stand/installboot.c) | 6 | ||||
-rw-r--r-- | sys/arch/sparc/stand/libkern/Makefile | 32 | ||||
-rw-r--r-- | sys/arch/sparc/stand/libsa/Makefile | 36 | ||||
-rw-r--r-- | sys/arch/sparc/stand/libz/Makefile | 19 | ||||
-rw-r--r-- | sys/arch/sparc/stand/zboot/Makefile | 42 |
24 files changed, 236 insertions, 158 deletions
diff --git a/sys/arch/sparc/stand/Makefile b/sys/arch/sparc/stand/Makefile index 5ee9240e891..92f5336714b 100644 --- a/sys/arch/sparc/stand/Makefile +++ b/sys/arch/sparc/stand/Makefile @@ -1,37 +1,6 @@ -# $NetBSD: Makefile,v 1.10 1995/10/09 23:25:54 pk Exp $ +# $OpenBSD: Makefile,v 1.6 1997/09/17 10:46:07 downsj Exp $ +# $NetBSD: Makefile,v 1.15 1997/06/01 03:39:03 mrg Exp $ -SUBDIR= zboot boot bootxx installboot - -### find out what to use for libkern and libsa -SAREL= -KERNREL= -TOPLEVEL=1 -.include "Makefile.inc" -.include "$S/lib/libkern/Makefile.inc" -.include "$S/lib/libsa/Makefile.inc" - -all: ${KERNLIB} ${SALIB} _SUBDIRUSE - -libdep: - @echo ${KERNLIB} ${.OBJDIR}/${SALIB} - -sadep: - @echo ${.OBJDIR}/${SALIB} - -kernlibdir: - @echo ${KERNDST} - -salibdir: - @echo ${.OBJDIR}/${SADST} - -clean:: _SUBDIRUSE - -cleandir: _SUBDIRUSE - -BINDIR=/usr/mdec - -afterinstall: - ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ - ${.CURDIR}/binstall.sh ${DESTDIR}${BINDIR}/binstall +SUBDIR= libsa libkern libz boot bootxx installboot binstall .include <bsd.subdir.mk> diff --git a/sys/arch/sparc/stand/Makefile.inc b/sys/arch/sparc/stand/Makefile.inc index fee77b15daa..291390e4401 100644 --- a/sys/arch/sparc/stand/Makefile.inc +++ b/sys/arch/sparc/stand/Makefile.inc @@ -1,16 +1,7 @@ +# $OpenBSD: Makefile.inc,v 1.7 1997/09/17 10:46:08 downsj Exp $ # $NetBSD: Makefile.inc,v 1.5 1996/02/01 22:33:01 mycroft Exp $ -.if !defined(__stand_makefile_inc) -__stand_makefile_inc=1 - -S= ${.CURDIR}/../../../${R} - -.ifndef TOPLEVEL -.if !make(libdep) && !make(sadep) && !make(salibdir) && !make(kernlibdir) -.BEGIN: - -@([ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine) -.endif -.endif +BINDIR= /usr/mdec RELOC_SUN4= 0x240000 RELOC_SUN4C= 0x340000 @@ -19,14 +10,43 @@ RELOC_SUN4M= 0x440000 # Note: a `RELOC' value of 0x340000 seems to work on most machines RELOC?= ${RELOC_SUN4C} -INCLUDES+= -I. -I${.CURDIR}/.. -I${S}/arch -I${S} -I${S}/lib/libsa -DEFS+= -DSTANDALONE -DRELOC=${RELOC} -DSUN4 -DSUN4C -DSUN_BOOTPARAMS -CFLAGS+= -O2 ${INCLUDES} ${DEFS} +DEFS= -DSTANDALONE -DRELOC=${RELOC} -DSUN4 -DSUN4C -DSUN_BOOTPARAMS + +### Figure out what to use for libkern +LIBKERNDIR= ${.CURDIR}/../libkern + +.if exists(${LIBKERNDIR}/obj.${MACHINE}) +LIBKERNOBJDIR= ${LIBKERNDIR}/obj.${MACHINE} +.elif exists(${LIBKERNDIR}/obj) +LIBKERNOBJDIR= ${LIBKERNDIR}/obj +.else +LIBKERNOBJDIR= ${LIBKERNDIR} +.endif + +LIBKERN= ${LIBKERNOBJDIR}/libkern.a + +### Figure out what to use for libsa +LIBSADIR= ${.CURDIR}/../libsa -srt0.o: srt0.S - ${CC} ${CFLAGS} -D_LOCORE -c ${.IMPSRC} +.if exists(${LIBSADIR}/obj.${MACHINE}) +LIBSAOBJDIR= ${LIBSADIR}/obj.${MACHINE} +.elif exists(${LIBSADIR}/obj) +LIBSAOBJDIR= ${LIBSADIR}/obj +.else +LIBSAOBJDIR= ${LIBSADIR} +.endif + +LIBSA= ${LIBSAOBJDIR}/libsa.a -cleandir: - -@rm -rf lib machine +### Figure out what to use for libz +LIBZDIR= ${.CURDIR}/../libz +.if exists(${LIBZDIR}/obj.${MACHINE}) +LIBZOBJDIR= ${LIBZDIR}/obj.${MACHINE} +.elif exists(${LIBZDIR}/obj) +LIBZOBJDIR= ${LIBZDIR}/obj +.else +LIBZOBJDIR= ${LIBZDIR} .endif + +LIBZ= ${LIBZOBJDIR}/libz.a diff --git a/sys/arch/sparc/stand/binstall/Makefile b/sys/arch/sparc/stand/binstall/Makefile new file mode 100644 index 00000000000..e38d19858cd --- /dev/null +++ b/sys/arch/sparc/stand/binstall/Makefile @@ -0,0 +1,9 @@ +# $OpenBSD: Makefile,v 1.1 1997/09/17 10:46:13 downsj Exp $ + +NOMAN= noman + +beforeinstall: + ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + ${.CURDIR}/binstall.sh ${DESTDIR}${BINDIR}/binstall + +.include <bsd.prog.mk> diff --git a/sys/arch/sparc/stand/binstall.sh b/sys/arch/sparc/stand/binstall/binstall.sh index c05bf24db6b..51a333c6599 100644 --- a/sys/arch/sparc/stand/binstall.sh +++ b/sys/arch/sparc/stand/binstall/binstall.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: binstall.sh,v 1.5 1996/12/12 08:42:44 deraadt Exp $ +# $OpenBSD: binstall.sh,v 1.1 1997/09/17 10:46:14 downsj Exp $ # $NetBSD: binstall.sh,v 1.3 1996/04/07 20:00:12 thorpej Exp $ # diff --git a/sys/arch/sparc/stand/boot/Makefile b/sys/arch/sparc/stand/boot/Makefile index 1012b8881d6..f452cad0342 100644 --- a/sys/arch/sparc/stand/boot/Makefile +++ b/sys/arch/sparc/stand/boot/Makefile @@ -1,19 +1,26 @@ +# $OpenBSD: Makefile,v 1.7 1997/09/17 10:46:15 downsj Exp $ # $NetBSD: Makefile,v 1.2 1995/09/30 21:43:38 pk Exp $ -R= .. -.PATH: ${.CURDIR}/${R} +.PATH: ${.CURDIR}/../common + PROG= boot -SRCS= srt0.S boot.c promdev.c dvma.c bootnet.c netif_sun.c conf.c version.c + +NOMAN= noman INSTALL_STRIP= -NOMAN= 1 -BINDIR= /usr/mdec -LIBS!= cd ${.CURDIR}/${R}; ${MAKE} libdep -${PROG}:${OBJS} ${LIBS} - ${LD} -N -T ${RELOC} -e start ${OBJS} ${LIBS} +SRCS= srt0.S boot.c conf.c dvma.c net.c netif_sun.c promdev.c version.c + +CFLAGS= -O2 -I${.CURDIR}/../common -I${.CURDIR}/../../../../arch \ + -I${.CURDIR}/../../../.. -I${.CURDIR}/../../../../lib/libsa ${DEFS} + +${PROG}: ${OBJS} ${LIBS} + ${LD} -N -T ${RELOC} -e start ${OBJS} ${LIBSA} ${LIBKERN} ${LIBZ} # convert to Sun magic @size a.out (echo -n 01 | tr 01 '\01\03'; tail +3c a.out) > ${.TARGET} @rm a.out +srt0.o: srt0.S + ${CC} ${CFLAGS} -D_LOCORE -c ${.IMPSRC} + .include <bsd.prog.mk> diff --git a/sys/arch/sparc/stand/boot.c b/sys/arch/sparc/stand/boot/boot.c index 44ac550b037..68fb03a3b42 100644 --- a/sys/arch/sparc/stand/boot.c +++ b/sys/arch/sparc/stand/boot/boot.c @@ -1,5 +1,5 @@ -/* $OpenBSD: boot.c,v 1.5 1996/08/11 09:13:22 downsj Exp $ */ -/* $NetBSD: boot.c,v 1.13 1995/09/17 00:50:54 pk Exp $ */ +/* $OpenBSD: boot.c,v 1.1 1997/09/17 10:46:15 downsj Exp $ */ +/* $NetBSD: boot.c,v 1.2 1997/09/14 19:27:21 pk Exp $ */ /*- * Copyright (c) 1982, 1986, 1990, 1993 @@ -39,10 +39,9 @@ #include <sys/param.h> #include <sys/reboot.h> #include <a.out.h> -#include <paths.h> -#include <stand.h> +#include <lib/libsa/stand.h> -#include "promdev.h" +#include <sparc/stand/common/promdev.h> static void copyunix __P((int, char *)); static void promsyms __P((int, struct exec *)); @@ -52,6 +51,7 @@ int netif_debug; /* * Boot device is derived from ROM provided information. */ +#define DEFAULT_KERNEL "bsd" extern char *version; unsigned long esym; @@ -70,11 +70,11 @@ main() prom_init(); - printf(">> OpenBSD BOOT [%s]\n", version); + printf(">> OpenBSD BOOT %s\n", version); file = prom_bootfile; if (file == 0 || *file == 0) - file = _PATH_UNIX; + file = DEFAULT_KERNEL; for (;;) { if (prom_boothow & RB_ASKNAME) { @@ -152,7 +152,7 @@ loadfile(io, addr) addr += i; } printf("+%d]", i); - esym = KERNBASE + + esym = ((u_int)x.a_entry - (u_int)LOADADDR) + (((int)addr + sizeof(int) - 1) & ~(sizeof(int) - 1)); #if 0 /* @@ -168,7 +168,7 @@ loadfile(io, addr) /* Note: args 2-4 not used due to conflicts with SunOS loaders */ (*entry)(cputyp == CPU_SUN4 ? LOADADDR : (caddr_t)promvec, - 0, 0, 0, esym, DDB_MAGIC); + 0, 0, 0, esym, DDB_MAGIC1); return; shread: diff --git a/sys/arch/sparc/stand/bootxx/Makefile b/sys/arch/sparc/stand/bootxx/Makefile index 512405c14c6..3b07e62213c 100644 --- a/sys/arch/sparc/stand/bootxx/Makefile +++ b/sys/arch/sparc/stand/bootxx/Makefile @@ -1,24 +1,34 @@ -# $NetBSD: Makefile,v 1.5 1995/10/10 20:07:54 pk Exp $ +# $OpenBSD: Makefile,v 1.5 1997/09/17 10:46:16 downsj Exp $ +# $NetBSD: Makefile,v 1.2 1995/09/30 21:43:38 pk Exp $ + +.PATH: ${.CURDIR}/../common -R= .. -.PATH: ${.CURDIR}/${R} PROG= bootxx -SRCS= srt0.S bootxx.c promdev.c dvma.c -KOBJS= __main.o bzero.o urem.o udiv.o -NOMAN= 1 + +NOMAN= noman INSTALL_STRIP= -BINDIR= /usr/mdec -CFLAGS= -DBOOTXX -LIBS!= cd ${.CURDIR}/${R}; ${MAKE} sadep -KOBJDIR!= cd ${.CURDIR}/${R}; ${MAKE} kernlibdir -_KOBJS=${KOBJS:S,^,${KOBJDIR}/,g} +SRCS= srt0.S bootxx.c closeall.c dvma.c promdev.c -${PROG}:${OBJS} ${_KOBJS} ${LIBS} - ${LD} -N -T ${RELOC} -e start ${OBJS} ${_KOBJS} ${LIBS} +# pre-built bits of libkern +KOBJS= __main.o bzero.o urem.o udiv.o +_KOBJS=${KOBJS:S,^,${LIBKERNOBJDIR}/,g} +# pre-built bits of libsa +SOBJS= alloc.o exit.o printf.o memcpy.o memset.o +_SOBJS=${SOBJS:S,^,${LIBSAOBJDIR}/,g} + +CFLAGS= -O2 -I${.CURDIR}/../common -I${.CURDIR}/../../../../arch \ + -I${.CURDIR}/../../../.. -I${.CURDIR}/../../../../lib/libsa -DBOOTXX \ + ${DEFS} + +${PROG}: ${OBJS} + ${LD} -N -T ${RELOC} -e start ${OBJS} ${_SOBJS} ${_KOBJS} # convert to Sun magic @size a.out (echo -n 01 | tr 01 '\01\03'; tail +3c a.out) > ${.TARGET} @rm a.out +srt0.o: srt0.S + ${CC} ${CFLAGS} -D_LOCORE -c ${.IMPSRC} + .include <bsd.prog.mk> diff --git a/sys/arch/sparc/stand/bootxx.c b/sys/arch/sparc/stand/bootxx/bootxx.c index 4ad862e991e..bf7a4bfaaa2 100644 --- a/sys/arch/sparc/stand/bootxx.c +++ b/sys/arch/sparc/stand/bootxx/bootxx.c @@ -1,4 +1,5 @@ -/* $NetBSD: bootxx.c,v 1.7 1995/09/27 09:03:13 pk Exp $ */ +/* $OpenBSD: bootxx.c,v 1.1 1997/09/17 10:46:16 downsj Exp $ */ +/* $NetBSD: bootxx.c,v 1.2 1997/09/14 19:28:17 pk Exp $ */ /* * Copyright (c) 1994 Paul Kranenburg @@ -34,8 +35,9 @@ #include <sys/time.h> #include <a.out.h> -#include <stand.h> -#include "promdev.h" +#include <lib/libsa/stand.h> + +#include <sparc/stand/common/promdev.h> int debug; int netif_debug; @@ -74,6 +76,7 @@ main() } (void)loadboot(&io, LOADADDR); + (io.f_dev->dv_close)(&io); (*entry)(cputyp == CPU_SUN4 ? LOADADDR : (caddr_t)promvec); _rtt(); } diff --git a/sys/arch/sparc/stand/bootxx/closeall.c b/sys/arch/sparc/stand/bootxx/closeall.c new file mode 100644 index 00000000000..1d84dc0be92 --- /dev/null +++ b/sys/arch/sparc/stand/bootxx/closeall.c @@ -0,0 +1,6 @@ +/* $OpenBSD: closeall.c,v 1.1 1997/09/17 10:46:16 downsj Exp $ */ + +void +closeall() +{ +} diff --git a/sys/arch/sparc/stand/conf.c b/sys/arch/sparc/stand/common/conf.c index 4ff1e21696b..265a005f850 100644 --- a/sys/arch/sparc/stand/conf.c +++ b/sys/arch/sparc/stand/common/conf.c @@ -1,3 +1,4 @@ +/* $OpenBSD: conf.c,v 1.1 1997/09/17 10:46:17 downsj Exp $ */ /* $NetBSD: conf.c,v 1.2 1995/09/18 21:31:45 pk Exp $ */ /* @@ -31,11 +32,11 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <stand.h> -#include <ufs.h> +#include <lib/libsa/stand.h> +#include <lib/libsa/ufs.h> #include <netinet/in.h> -#include <cd9660.h> -#include <nfs.h> +#include <lib/libsa/cd9660.h> +#include <lib/libsa/nfs.h> struct fs_ops file_system_ufs[] = { { ufs_open, ufs_close, ufs_read, ufs_write, ufs_seek, ufs_stat }, diff --git a/sys/arch/sparc/stand/dvma.c b/sys/arch/sparc/stand/common/dvma.c index ffa50eef23f..7e6351baf88 100644 --- a/sys/arch/sparc/stand/dvma.c +++ b/sys/arch/sparc/stand/common/dvma.c @@ -1,3 +1,4 @@ +/* $OpenBSD: dvma.c,v 1.1 1997/09/17 10:46:18 downsj Exp $ */ /* $NetBSD: dvma.c,v 1.2 1995/09/17 00:50:56 pk Exp $ */ /* * Copyright (c) 1995 Gordon W. Ross @@ -40,7 +41,8 @@ #include <sys/param.h> #include <machine/pte.h> #include <machine/ctlreg.h> -#include "promdev.h" + +#include <sparc/stand/common/promdev.h> #define DVMA_BASE 0xFFF00000 #define DVMA_MAPLEN 0xE0000 /* 1 MB - 128K (save MONSHORTSEG) */ diff --git a/sys/arch/sparc/stand/bootnet.c b/sys/arch/sparc/stand/common/net.c index e67b22ac6f4..0c42a5cd596 100644 --- a/sys/arch/sparc/stand/bootnet.c +++ b/sys/arch/sparc/stand/common/net.c @@ -1,4 +1,5 @@ -/* $NetBSD: net.c,v 1.3 1996/05/04 19:36:01 pk Exp $ */ +/* $OpenBSD: net.c,v 1.1 1997/09/17 10:46:18 downsj Exp $ */ +/* $NetBSD: net.c,v 1.2 1997/07/22 17:41:07 drochner Exp $ */ /* * Copyright (c) 1995 Gordon W. Ross @@ -52,13 +53,12 @@ #include <sys/socket.h> #include <net/if.h> #include <netinet/in.h> -#include <netinet/if_ether.h> #include <netinet/in_systm.h> -#include "stand.h" -#include "net.h" -#include "netif.h" -#include "bootparam.h" +#include <lib/libsa/stand.h> +#include <lib/libsa/net.h> +#include <lib/libsa/netif.h> +#include <lib/libsa/bootparam.h> char rootpath[FNAME_SIZE]; diff --git a/sys/arch/sparc/stand/netif_sun.c b/sys/arch/sparc/stand/common/netif_sun.c index 930d5d9659b..07efcdceea1 100644 --- a/sys/arch/sparc/stand/netif_sun.c +++ b/sys/arch/sparc/stand/common/netif_sun.c @@ -1,3 +1,4 @@ +/* $OpenBSD: netif_sun.c,v 1.1 1997/09/17 10:46:18 downsj Exp $ */ /* $NetBSD: netif_sun.c,v 1.2 1995/09/18 21:31:48 pk Exp $ */ /* @@ -47,11 +48,11 @@ #include <netinet/if_ether.h> #include <netinet/in_systm.h> -#include "stand.h" -#include "net.h" -#include "netif.h" +#include <lib/libsa/stand.h> +#include <lib/libsa/net.h> +#include <lib/libsa/netif.h> -#include "promdev.h" +#include <sparc/stand/common/promdev.h> static struct netif netif_prom; diff --git a/sys/arch/sparc/stand/promdev.c b/sys/arch/sparc/stand/common/promdev.c index 1d244b82682..25057863046 100644 --- a/sys/arch/sparc/stand/promdev.c +++ b/sys/arch/sparc/stand/common/promdev.c @@ -1,3 +1,4 @@ +/* $OpenBSD: promdev.c,v 1.1 1997/09/17 10:46:19 downsj Exp $ */ /* $NetBSD: promdev.c,v 1.16 1995/11/14 15:04:01 pk Exp $ */ /* @@ -41,11 +42,11 @@ #include <machine/oldmon.h> #include <machine/ctlreg.h> -#include <stand.h> +#include <lib/libsa/stand.h> -#include "promdev.h" +#include <sparc/stand/common/promdev.h> -u_long _randseed = 1; +/* u_long _randseed = 1; */ int obp_close __P((struct open_file *)); diff --git a/sys/arch/sparc/stand/promdev.h b/sys/arch/sparc/stand/common/promdev.h index a3bede11f2c..8413cde7d18 100644 --- a/sys/arch/sparc/stand/promdev.h +++ b/sys/arch/sparc/stand/common/promdev.h @@ -1,3 +1,4 @@ +/* $OpenBSD: promdev.h,v 1.1 1997/09/17 10:46:19 downsj Exp $ */ /* $NetBSD: promdev.h,v 1.3 1995/09/18 21:31:50 pk Exp $ */ /* @@ -45,7 +46,9 @@ struct promdata { }; #define LOADADDR ((caddr_t)0x4000) -#define DDB_MAGIC ( ('D'<<24) | ('D'<<16) | ('B'<<8) | ('0') ) +#define DDB_MAGIC0 ( ('D'<<24) | ('D'<<16) | ('B'<<8) | ('0') ) +#define DDB_MAGIC1 ( ('D'<<24) | ('D'<<16) | ('B'<<8) | ('1') ) +#define DDB_MAGIC DDB_MAGIC0 extern struct promvec *promvec; extern char *prom_bootdevice; diff --git a/sys/arch/sparc/stand/srt0.S b/sys/arch/sparc/stand/common/srt0.S index 36a04cd33d9..bd0a039efe1 100644 --- a/sys/arch/sparc/stand/srt0.S +++ b/sys/arch/sparc/stand/common/srt0.S @@ -1,3 +1,4 @@ +/* $OpenBSD: srt0.S,v 1.1 1997/09/17 10:46:20 downsj Exp $ */ /* $NetBSD: srt0.S,v 1.5.4.2 1996/07/17 01:51:46 jtc Exp $ */ /* diff --git a/sys/arch/sparc/stand/version.c b/sys/arch/sparc/stand/common/version.c index d34678809b4..b5942268cd5 100644 --- a/sys/arch/sparc/stand/version.c +++ b/sys/arch/sparc/stand/common/version.c @@ -1,3 +1,4 @@ +/* $OpenBSD: version.c,v 1.1 1997/09/17 10:46:20 downsj Exp $ */ /* $NetBSD: version.c,v 1.4 1995/09/16 23:20:39 pk Exp $ */ /* @@ -37,6 +38,8 @@ * 1.2 get it to work with V0 bootproms. * 1.3 add oldmon support and network support. * 1.4 add cd9660 support + * + * 2.0 OpenBSD reorganization. */ -char *version = "$Revision: 1.4 $"; +char *version = "2.0"; diff --git a/sys/arch/sparc/stand/installboot/Makefile b/sys/arch/sparc/stand/installboot/Makefile index 226022830f4..1d10bd31af3 100644 --- a/sys/arch/sparc/stand/installboot/Makefile +++ b/sys/arch/sparc/stand/installboot/Makefile @@ -1,12 +1,8 @@ -# $NetBSD: Makefile,v 1.3 1995/09/30 21:43:41 pk Exp $ +# $OpenBSD: Makefile,v 1.3 1997/09/17 10:46:21 downsj Exp $ + +BINDIR= /usr/sbin -.PATH: ${.CURDIR}/.. PROG= installboot MAN= installboot.8 -MLINKS= installboot.8 binstall.8 -BINDIR=/usr/sbin - -# XXX - prevent sa clutter -__stand_makefile_inc=1 .include <bsd.prog.mk> diff --git a/sys/arch/sparc/stand/installboot.8 b/sys/arch/sparc/stand/installboot/installboot.8 index 3f5b83cb54e..14b0d65845d 100644 --- a/sys/arch/sparc/stand/installboot.8 +++ b/sys/arch/sparc/stand/installboot/installboot.8 @@ -1,3 +1,4 @@ +.\" $OpenBSD: installboot.8,v 1.1 1997/09/17 10:46:21 downsj Exp $ .\" $NetBSD: installboot.8,v 1.1 1995/09/30 21:32:14 pk Exp $ .\" .\" Copyright (c) 1995 Paul Kranenburg diff --git a/sys/arch/sparc/stand/installboot.c b/sys/arch/sparc/stand/installboot/installboot.c index 3c5cb36e993..ea3ca3ef8ad 100644 --- a/sys/arch/sparc/stand/installboot.c +++ b/sys/arch/sparc/stand/installboot/installboot.c @@ -1,4 +1,5 @@ -/* $NetBSD: installboot.c,v 1.11 1995/11/08 09:09:20 pk Exp $ */ +/* $OpenBSD: installboot.c,v 1.1 1997/09/17 10:46:21 downsj Exp $ */ +/* $NetBSD: installboot.c,v 1.1 1997/06/01 03:39:45 mrg Exp $ */ /* * Copyright (c) 1994 Paul Kranenburg @@ -81,8 +82,7 @@ static void usage() { fprintf(stderr, - "usage: installboot [-n] [-v] [-h] [-s isofsblk -e isofseblk]" - "[-a <karch>] <boot> <proto> <device>\n"); + "usage: installboot [-n] [-v] [-h] [-s isofsblk -e isofseblk] [-a <karch>] <boot> <proto> <device>\n"); exit(1); } diff --git a/sys/arch/sparc/stand/libkern/Makefile b/sys/arch/sparc/stand/libkern/Makefile new file mode 100644 index 00000000000..2e3e2692123 --- /dev/null +++ b/sys/arch/sparc/stand/libkern/Makefile @@ -0,0 +1,32 @@ +# $OpenBSD: Makefile,v 1.1 1997/09/17 10:46:22 downsj Exp $ + +LIB= kern + +.PATH: ${.CURDIR}/../../../../lib/libkern +.PATH: ${.CURDIR}/../../../../lib/libkern/arch/sparc + +.include "${.CURDIR}/../../../../lib/libkern/arch/sparc/Makefile.inc" + +CFLAGS= -O2 -I${.CURDIR}/../include -I${.CURDIR}/../../../.. \ + -I${.CURDIR}/../../../../lib/libkern \ + -I${.CURDIR}/../../../../lib/libkern/arch/sparc + +AFLAGS= -x assembler-with-cpp -traditional-cpp -I${.CURDIR}/../include \ + -I${.CURDIR}/../../../.. -I${.CURDIR}/../../../../lib/libkern \ + -I${.CURDIR}/../../../../lib/libkern/arch/sparc + +# kern routines +SRCS= __main.c ashrdi3.c bzero.S divdi3.c qdivrem.c strlen.S strcat.c \ + strcmp.c strcpy.c strncmp.c umoddi3.c + +SRCS+= umul.S mul.S rem.S sdiv.S udiv.S umul.S urem.S +SRCS+= mul.S saveregs.S umul.S + +${OBJS}: ${.CURDIR}/../Makefile.inc + +NOPROFILE= +NOPIC= + +install: + +.include <bsd.lib.mk> diff --git a/sys/arch/sparc/stand/libsa/Makefile b/sys/arch/sparc/stand/libsa/Makefile new file mode 100644 index 00000000000..68e3495cf31 --- /dev/null +++ b/sys/arch/sparc/stand/libsa/Makefile @@ -0,0 +1,36 @@ +# $OpenBSD: Makefile,v 1.1 1997/09/17 10:46:23 downsj Exp $ + +LIB= sa + +.PATH: ${.CURDIR}/../../../../lib/libsa + +CFLAGS= -O2 -D__INTERNAL_LIBSA_CREAD \ + -I${.CURDIR} -I${.CURDIR}/../include -I${.CURDIR}/../.. \ + -I${.CURDIR}/../../.. -I${.CURDIR}/../../../.. \ + -I${.CURDIR}/../../../../lib/libsa + +# stand routines +SRCS= alloc.c exit.c exec.c getfile.c gets.c globals.c \ + memcmp.c memcpy.c memset.c printf.c strerror.c strncpy.c + +# io routines +SRCS+= close.c closeall.c dev.c disklabel.c dkcksum.c fstat.c ioctl.c lseek.c \ + open.c read.c stat.c write.c cread.c + +# network routines +SRCS+= arp.c ether.c in_cksum.c net.c netif.c rpc.c + +# network info services +SRCS+= bootp.c bootparam.c rarp.c + +# boot filesystems +SRCS+= ufs.c nfs.c cd9660.c + +${OBJS}: ${.CURDIR}/../Makefile.inc + +NOPROFILE= +NOPIC= + +install: + +.include <bsd.lib.mk> diff --git a/sys/arch/sparc/stand/libz/Makefile b/sys/arch/sparc/stand/libz/Makefile new file mode 100644 index 00000000000..ee5281bfc06 --- /dev/null +++ b/sys/arch/sparc/stand/libz/Makefile @@ -0,0 +1,19 @@ +# $OpenBSD: Makefile,v 1.1 1997/09/17 10:46:24 downsj Exp $ + +LIB= z + +.PATH: ${.CURDIR}/../../../../lib/libz + +CFLAGS= -O2 -D_ZLIB_PRIVATE -I${.CURDIR}/../../../../lib/libz + +SRCS= adler32.c crc32.c infblock.c infcodes.c inffast.c \ + inflate.c inftrees.c infutil.c + +${OBJS}: ${.CURDIR}/../Makefile.inc + +install: + +NOPIC= +NOPROFILE= + +.include <bsd.lib.mk> diff --git a/sys/arch/sparc/stand/zboot/Makefile b/sys/arch/sparc/stand/zboot/Makefile deleted file mode 100644 index eebc1b956cc..00000000000 --- a/sys/arch/sparc/stand/zboot/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# $OpenBSD: Makefile,v 1.1 1997/05/29 08:22:07 grr Exp $ - -S= ${.CURDIR}/../../../.. -R= .. -.PATH: ${.CURDIR}/${R} -PROG= zboot -SRCS= srt0.S boot.c promdev.c dvma.c bootnet.c netif_sun.c conf.c version.c -INSTALL_STRIP= -NOMAN= 1 -BINDIR= /usr/mdec - -# include "library" defines and make rules -KERN_AS= library -KERNDST= ${.CURDIR}/${__objdir} -.include "${S}/lib/libkern/Makefile.inc" -LIBKERN= ${KERNLIB} - -Z_AS= library -ZDST= ${.CURDIR}/${__objdir} -.include "${S}/lib/libz/Makefile.inc" -LIBZ= ${ZLIB} - -SA_AS= library -SADST= ${.CURDIR}/${__objdir} -SAREL= -SA_ZLIB= yes -.include "${S}/lib/libsa/Makefile.inc" -LIBSA= ${SALIB} - -LIBS= ${LIBSA} ${LIBKERN} ${LIBZ} - -# ${PROG} overloads the normal rule in bsd.prog.mk - -${PROG}: ${OBJS} ${LIBS} - ${LD} -N -T ${RELOC} -e start ${OBJS} \ - -nostdlib -L ${.CURDIR}/${__objdir} -lsa -lkern -lz - # convert to Sun magic - @size a.out - (echo -n 01 | tr 01 '\01\03'; tail +3c a.out) > ${.TARGET} - @rm a.out - -.include <bsd.prog.mk> |