diff options
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/i386/boot.dos/Makefile | 39 | ||||
-rw-r--r-- | sys/arch/i386/boot.dos/dossys.c | 9 |
2 files changed, 25 insertions, 23 deletions
diff --git a/sys/arch/i386/boot.dos/Makefile b/sys/arch/i386/boot.dos/Makefile index b6f2244e38b..8dcb7bb0732 100644 --- a/sys/arch/i386/boot.dos/Makefile +++ b/sys/arch/i386/boot.dos/Makefile @@ -1,4 +1,5 @@ -# $NetBSD: Makefile,v 1.18 1995/03/23 19:46:45 jtc Exp $ +# $OpenBSD: Makefile,v 1.2 1996/12/26 10:50:47 mickey Exp $ +# $NetBSD: Makefile,v 1.18 1995/03/23 19:46:45 jtc Exp $ # # Ported to boot 386BSD by Julian Elischer (julian@tfs.com) # September 1992 @@ -24,19 +25,14 @@ # the rights to redistribute these changes. # -S= ${.CURDIR}/../../.. +PROG= boot.com +NOMAN= noman -machine-links: - -rm -f machine && ln -s ${.CURDIR}/../include machine - -rm -f ${MACHINE_ARCH} && ln -s ${.CURDIR}/../include ${MACHINE_ARCH} - -all: machine-links boot.com +S= ${.CURDIR}/../../.. -NOPROG= noprog -NOMAN= noman - -CFLAGS= -O6 -DKERNEL -D_KERNEL -DI386_CPU -DI486_CPU -DI586_CPU -CFLAGS+=-DDO_BAD144 -I. -I${.CURDIR} -I$S -I${.CURDIR}/../.. -I${.CURDIR}/../boot +CFLAGS+=-O2 -D_KERNEL -I${.CURDIR}/../stand/libsa -I${S}/lib/libsa +CFLAGS+=-DDO_BAD144 -I. -I$S -I${.CURDIR}/../.. -I${.CURDIR}/../boot +LDFLAGS=-Bstatic -e start -Wl,-N,-T100 # Uncomment this to make the boot block talk to a serial port. #CPPFLAGS+=-DSERIAL @@ -44,8 +40,17 @@ CFLAGS+=-DDO_BAD144 -I. -I${.CURDIR} -I$S -I${.CURDIR}/../.. -I${.CURDIR}/../boo CPPFLAGS+= -DDOSREAD -DDEBUG # start.o should be first -OBJS= start.o table.o boot.o asm.o bios.o dossys.o io.o disk.o sys.o version.o -VPATH= ${.CURDIR}/../boot +SRCS+= start.S table.c boot.c disk.c io.c serial.S sys.c bios.S asm.S +SRCS+= dossys.c version.c +BINDIR= ${DESTDIR}/usr/mdec + +.PATH: ${.CURDIR}/../boot + +all: machine-links + +machine-links: + -rm -f machine && ln -s ${.CURDIR}/../include machine + -rm -f ${MACHINE_ARCH} && ln -s ${.CURDIR}/../include ${MACHINE_ARCH} boot.com: ${OBJS} ${LD} -Bstatic -e start -N -T 0x100 -o dosboot ${OBJS} @@ -55,10 +60,6 @@ boot.com: ${OBJS} @mv -f dosboot.tmp boot.com @ls -l boot.com -install: boot.com - cp boot.com ${DESTDIR}/usr/mdec/boot.com - - -CLEANFILES+=boot.com dosboot dosboot.sym machine ${MACHINE_ARCH} +CLEANFILES+=dosboot dosboot.sym machine ${MACHINE_ARCH} .include <bsd.prog.mk> diff --git a/sys/arch/i386/boot.dos/dossys.c b/sys/arch/i386/boot.dos/dossys.c index c32f31af1b0..d62157826fc 100644 --- a/sys/arch/i386/boot.dos/dossys.c +++ b/sys/arch/i386/boot.dos/dossys.c @@ -1,13 +1,14 @@ #ifdef DOSREAD -#include "boot.h" +#include <sys/param.h> + short doserrno; short doshandle = -1; void bcopy(), pcpy(); void _read(); -char iobuf[MAXBSIZE]; +char iobuf[DEV_BSIZE]; char *doserrors[] ={ /* 00 */ "no error", @@ -120,8 +121,8 @@ void __dosread(buffer, count, copy) while (count) { size=count; - if (size>MAXBSIZE) - size=MAXBSIZE; + if (size>DEV_BSIZE) + size=DEV_BSIZE; size=dosread(doshandle,iobuf,size); twiddle(); |