From 43fd8ab5aa21c575d3d670f118c40906fb36e447 Mon Sep 17 00:00:00 2001 From: rnordier Date: Tue, 20 Oct 1998 20:20:48 +0000 Subject: [PATCH] Make serial port, data format, and bps configurable. --- sys/boot/i386/boot2/Makefile | 10 ++++++++-- sys/boot/i386/boot2/sio.S | 8 ++++---- sys/boot/i386/boot2/sio.s | 8 ++++---- sys/boot/i386/gptboot/Makefile | 10 ++++++++-- 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/sys/boot/i386/boot2/Makefile b/sys/boot/i386/boot2/Makefile index e36df60f2a9b..d0d5fefae2a8 100644 --- a/sys/boot/i386/boot2/Makefile +++ b/sys/boot/i386/boot2/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.6 1998/10/15 20:04:21 rnordier Exp $ +# $Id: Makefile,v 1.7 1998/10/15 22:08:13 rnordier Exp $ PROG= boot2 NOMAN= @@ -11,6 +11,10 @@ CLEANFILES+= boot1 boot1.out boot1.o \ M4?= m4 +B2SIOPRT?= 0x3f8 +B2SIOFMT?= 0x3 +B2SIODIV?= 0xc + .if exists(${.OBJDIR}/../btx) BTX= ${.OBJDIR}/../btx .else @@ -58,7 +62,9 @@ boot2.out: boot2.o sio.o ${BTX}/lib/crt0.o boot2.o sio.o sio.o: sio.s - ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} + (cd ${.CURDIR}; ${M4} -DSIOPRT=${B2SIOPRT} \ + -DSIOFMT=${B2SIOFMT} -DSIODIV=${B2SIODIV} sio.s) | \ + ${AS} ${AFLAGS} -o ${.TARGET} install: ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ diff --git a/sys/boot/i386/boot2/sio.S b/sys/boot/i386/boot2/sio.S index 985ac04ef469..bc68bf5a469b 100644 --- a/sys/boot/i386/boot2/sio.S +++ b/sys/boot/i386/boot2/sio.S @@ -13,11 +13,11 @@ # purpose. # -# $Id:$ +# $Id: sio.s,v 1.1 1998/10/15 20:04:21 rnordier Exp $ - .set SIO_PRT,0x3f8 # Base port - .set SIO_FMT,0x3 # 8N1 - .set SIO_DIV,0xc # 115200 / 9600 + .set SIO_PRT,SIOPRT # Base port + .set SIO_FMT,SIOFMT # 8N1 + .set SIO_DIV,SIODIV # 115200 / BPS .globl sio_init .globl sio_flush diff --git a/sys/boot/i386/boot2/sio.s b/sys/boot/i386/boot2/sio.s index 985ac04ef469..bc68bf5a469b 100644 --- a/sys/boot/i386/boot2/sio.s +++ b/sys/boot/i386/boot2/sio.s @@ -13,11 +13,11 @@ # purpose. # -# $Id:$ +# $Id: sio.s,v 1.1 1998/10/15 20:04:21 rnordier Exp $ - .set SIO_PRT,0x3f8 # Base port - .set SIO_FMT,0x3 # 8N1 - .set SIO_DIV,0xc # 115200 / 9600 + .set SIO_PRT,SIOPRT # Base port + .set SIO_FMT,SIOFMT # 8N1 + .set SIO_DIV,SIODIV # 115200 / BPS .globl sio_init .globl sio_flush diff --git a/sys/boot/i386/gptboot/Makefile b/sys/boot/i386/gptboot/Makefile index e36df60f2a9b..d0d5fefae2a8 100644 --- a/sys/boot/i386/gptboot/Makefile +++ b/sys/boot/i386/gptboot/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.6 1998/10/15 20:04:21 rnordier Exp $ +# $Id: Makefile,v 1.7 1998/10/15 22:08:13 rnordier Exp $ PROG= boot2 NOMAN= @@ -11,6 +11,10 @@ CLEANFILES+= boot1 boot1.out boot1.o \ M4?= m4 +B2SIOPRT?= 0x3f8 +B2SIOFMT?= 0x3 +B2SIODIV?= 0xc + .if exists(${.OBJDIR}/../btx) BTX= ${.OBJDIR}/../btx .else @@ -58,7 +62,9 @@ boot2.out: boot2.o sio.o ${BTX}/lib/crt0.o boot2.o sio.o sio.o: sio.s - ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} + (cd ${.CURDIR}; ${M4} -DSIOPRT=${B2SIOPRT} \ + -DSIOFMT=${B2SIOFMT} -DSIODIV=${B2SIODIV} sio.s) | \ + ${AS} ${AFLAGS} -o ${.TARGET} install: ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \