diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/mvme68k/stand/bootst/Makefile | 17 | ||||
-rw-r--r-- | sys/arch/mvme68k/stand/bootst/bootst.c | 54 |
2 files changed, 11 insertions, 60 deletions
diff --git a/sys/arch/mvme68k/stand/bootst/Makefile b/sys/arch/mvme68k/stand/bootst/Makefile index ee88405e7e5..c440772ddc9 100644 --- a/sys/arch/mvme68k/stand/bootst/Makefile +++ b/sys/arch/mvme68k/stand/bootst/Makefile @@ -1,16 +1,14 @@ # from: @(#)Makefile 8.1 (Berkeley) 6/10/93 -# $OpenBSD: Makefile,v 1.5 1996/05/10 20:03:47 deraadt Exp $ +# $OpenBSD: Makefile,v 1.6 1996/05/16 02:49:07 chuck Exp $ RELOC=0x3F0000 S= ${.CURDIR}/../../../.. -DEFS= -DSTANDALONE -DCOMPAT_NOLABEL # -DROMPRF -INCPATH=-I${.CURDIR} -I${S} -I${.OBJDIR} -I${S}/lib/libsa +DEFS= +INCPATH=-I${.CURDIR} -I${.CURDIR}/../libsa -I${.CURDIR}/../libbug \ + -I${.CURDIR}/../../include -I${S} -I${S}/lib/libsa CFLAGS= -O2 ${INCPATH} ${DEFS} ${COPTS} -CLEANFILES+=stboot bootst bootst.bug machine - -#.PATH: ${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} -#.PATH: ${S}/lib/libsa +CLEANFILES+=stboot bootst bootst.bug .include "${S}/arch/${MACHINE}/stand/libsa/Makefile.inc" .include "${S}/arch/${MACHINE}/stand/libbug/Makefile.inc" @@ -26,7 +24,7 @@ OBJS= ${SRCS:N*.h:R:S/$/.o/g} BOOTS= bootst stboot ALL= ${BOOTS} -all: machine ${ALL} +all: ${ALL} bootst.bug: ${OBJS} ${BUGCRT} ${LIBS} ${LD} -s -N -T ${RELOC} ${BUGCRT} ${OBJS} ${LIBS} -o $@ @@ -38,7 +36,4 @@ bootst stboot: bootst.bug ${WRTVID} install: install -c -m 555 -g bin -o bin ${BOOTS} ${DESTDIR}${MDEC_DIR} -machine: - rm -f machine; ln -s ${.CURDIR}/../../include machine - .include <bsd.prog.mk> diff --git a/sys/arch/mvme68k/stand/bootst/bootst.c b/sys/arch/mvme68k/stand/bootst/bootst.c index bc221143550..a37854d9413 100644 --- a/sys/arch/mvme68k/stand/bootst/bootst.c +++ b/sys/arch/mvme68k/stand/bootst/bootst.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bootst.c,v 1.4 1996/04/28 10:48:24 deraadt Exp $ */ +/* $OpenBSD: bootst.c,v 1.5 1996/05/16 02:49:07 chuck Exp $ */ #include <sys/types.h> #include <sys/param.h> @@ -6,9 +6,9 @@ #include <sys/exec.h> #include <machine/prom.h> -#define RB_NOSYM 0x400 +#include "stand.h" +#include "libsa.h" -void parse_args __P((struct mvmeprom_args *pbugargs)); int load_kern(); int read_tape_block __P((short ctrl, short dev, short *status, void *addr, int *cnt, int blk_num, u_char *flags, int verbose)); @@ -27,7 +27,6 @@ struct kernel { typedef(*kernel_entry) __P((struct mvmeprom_args *, struct kernel *)); -extern struct mvmeprom_args bugargs; int main() { @@ -41,7 +40,7 @@ main() print_brdid(); print_memory(); */ - parse_args(pbugargs); + parse_args(&kernel.kname, &kernel.bflags); if (load_kern(pbugargs) == 1) { printf("unsuccessful in loading kernel\n"); } else { @@ -70,7 +69,7 @@ main() printf("kernel.end_loaded %x\n", kernel.end_loaded); #endif if (kernel.bflags & RB_HALT) - mvmeprom_return(); + _rtt(); if (((u_long)addr &0xf) == 0x2) { (addr)(pbugargs, &kernel); } else { @@ -314,46 +313,3 @@ loadmini(addr, pbugargs) kernel.end_loaded = (u_int) kernel.emini; return (0); } - -void -parse_args(pargs) - struct mvmeprom_args *pargs; -{ - char *ptr = pargs->arg_start; - char c, *name = NULL; - int howto = 0; - - if (pargs->arg_start != pargs->arg_end) { - while (c = *ptr) { - while (c == ' ') - c = *++ptr; - if (!c) - return; - if (c != '-') { - name = ptr; - while ((c = *++ptr) && c != ' '); - if (c) - *ptr++ = 0; - continue; - } - while ((c = *++ptr) && c != ' ') { - if (c == 'a') - howto |= RB_ASKNAME; - else if (c == 'b') - howto |= RB_HALT; - else if (c == 'y') - howto |= RB_NOSYM; - else if (c == 'd') - howto |= RB_KDB; - else if (c == 'm') - howto |= RB_MINIROOT; - else if (c == 'r') - howto |= RB_DFLTROOT; - else if (c == 's') - howto |= RB_SINGLE; - } - } - } - kernel.bflags = howto; - kernel.kname = name; -} |