summaryrefslogtreecommitdiff
path: root/sys/arch/i386/stand/libsa
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1998-05-25 19:20:58 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1998-05-25 19:20:58 +0000
commite36ac8f344dc31e3480af70bdd20643561c9fa44 (patch)
treec80fb47bac0088617073873dd8237f48494db4c7 /sys/arch/i386/stand/libsa
parentafbd2fd9b7d385cda50f7b241a5ce94cbb2c3255 (diff)
put support for test /boot environment back; some CLEANFILES and spaces
Diffstat (limited to 'sys/arch/i386/stand/libsa')
-rw-r--r--sys/arch/i386/stand/libsa/Makefile25
-rw-r--r--sys/arch/i386/stand/libsa/cmd_i386.c8
-rw-r--r--sys/arch/i386/stand/libsa/dev_i386.c4
-rw-r--r--sys/arch/i386/stand/libsa/exec_i386.c4
-rw-r--r--sys/arch/i386/stand/libsa/libsa.h4
-rw-r--r--sys/arch/i386/stand/libsa/machdep.c4
6 files changed, 34 insertions, 15 deletions
diff --git a/sys/arch/i386/stand/libsa/Makefile b/sys/arch/i386/stand/libsa/Makefile
index 67be2420a55..a12565b7cef 100644
--- a/sys/arch/i386/stand/libsa/Makefile
+++ b/sys/arch/i386/stand/libsa/Makefile
@@ -1,5 +1,6 @@
-# $OpenBSD: Makefile,v 1.30 1998/02/24 22:06:42 weingart Exp $
+# $OpenBSD: Makefile,v 1.31 1998/05/25 19:20:50 mickey Exp $
+.include "${.CURDIR}/../Makefile.inc"
LIB= sa
@@ -7,17 +8,24 @@ S=${.CURDIR}/../../../..
SADIR=${.CURDIR}/..
DIR_SA= $S/lib/libsa
DIR_KERN=$S/lib/libkern
-
-#AS=cat ;
-#AS+= -R
-#AS+= -a
+CLEANFILES=i386 machine
# i386 stuff (so, it will possibly load in the same 64k)
-SRCS= gidt.S debug_i386.S alloca.S \
- machdep.c dev_i386.c exec_i386.c cmd_i386.c \
+SRCS+= machdep.c dev_i386.c exec_i386.c cmd_i386.c
+
+.if defined(DEBUGFLAGS) && !empty(DEBUGFLAGS:M-D_TEST)
+SRCS+= unixdev.c unixsys.S nullfs.c
+CLEANFILES+= gidt.o debug_i386.o alloca.o \
+ biosdev.o bioscons.o gateA20.o apmprobe.o \
+ memprobe.o diskprobe.o pciprobe.o smpprobe.o \
+ time.o
+.else
+SRCS+= gidt.S debug_i386.S alloca.S \
biosdev.c bioscons.c gateA20.c apmprobe.c \
memprobe.c diskprobe.c pciprobe.c smpprobe.c \
time.c
+CLEANFILES+= unixdev.o unixsys.o nullfs.o
+.endif
# stand routines
SRCS+= alloc.c exit.c exec.c getfile.c gets.c globals.c strcmp.c strlen.c \
@@ -62,3 +70,6 @@ install:
CPPFLAGS+=-DLINKADDR=${LINKADDR} -DHEAP_LIMIT=${HEAP_LIMIT} ${DEBUGFLAGS}
CPPFLAGS+=-I${S}/stand/boot
CFLAGS+=${SACFLAGS} -D__INTERNAL_LIBSA_CREAD
+#AS=cat ;
+#AS+= -R
+#AS+= -a
diff --git a/sys/arch/i386/stand/libsa/cmd_i386.c b/sys/arch/i386/stand/libsa/cmd_i386.c
index c294da1be5f..ecf23fba8d9 100644
--- a/sys/arch/i386/stand/libsa/cmd_i386.c
+++ b/sys/arch/i386/stand/libsa/cmd_i386.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd_i386.c,v 1.20 1998/02/24 22:06:47 weingart Exp $ */
+/* $OpenBSD: cmd_i386.c,v 1.21 1998/05/25 19:20:51 mickey Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff, Tobias Weingartner
@@ -32,6 +32,7 @@
*
*/
+#ifndef _TEST
#include <sys/param.h>
#include <sys/reboot.h>
#include <machine/biosvar.h>
@@ -60,8 +61,8 @@ const struct cmd_table cmd_machine[] = {
{ "diskinfo", CMDT_CMD, Xdiskinfo },
{ "memory", CMDT_CMD, Xmemory },
{ "regs", CMDT_CMD, Xregs },
- {"cnvmem", CMDT_CMD, Xcnvmem},
- {"extmem", CMDT_CMD, Xextmem},
+ { "cnvmem", CMDT_CMD, Xcnvmem},
+ { "extmem", CMDT_CMD, Xextmem},
{ NULL, 0 }
};
@@ -182,3 +183,4 @@ Xmemory()
return 0;
}
+#endif
diff --git a/sys/arch/i386/stand/libsa/dev_i386.c b/sys/arch/i386/stand/libsa/dev_i386.c
index 50abdad5277..5f1868a80fa 100644
--- a/sys/arch/i386/stand/libsa/dev_i386.c
+++ b/sys/arch/i386/stand/libsa/dev_i386.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dev_i386.c,v 1.20 1998/04/18 07:39:49 deraadt Exp $ */
+/* $OpenBSD: dev_i386.c,v 1.21 1998/05/25 19:20:53 mickey Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
@@ -47,7 +47,7 @@ const char bdevs[][4] = {
const int nbdevs = NENTS(bdevs);
const char cdevs[][4] = {
- "", "", "", "", "", "", "", "",
+ "cn", "", "", "", "", "", "", "",
"com", "", "", "", "pc"
};
const int ncdevs = NENTS(cdevs);
diff --git a/sys/arch/i386/stand/libsa/exec_i386.c b/sys/arch/i386/stand/libsa/exec_i386.c
index 3f651f6a0f2..75c0b02bffb 100644
--- a/sys/arch/i386/stand/libsa/exec_i386.c
+++ b/sys/arch/i386/stand/libsa/exec_i386.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_i386.c,v 1.21 1998/05/18 22:07:29 mickey Exp $ */
+/* $OpenBSD: exec_i386.c,v 1.22 1998/05/25 19:20:54 mickey Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
@@ -54,6 +54,7 @@ machdep_start(startaddr, howto, loadaddr, ssym, esym)
char *startaddr, *loadaddr, *ssym, *esym;
int howto;
{
+#ifndef _TEST
dev_t bootdev = bootdev_dip->bootdev;
size_t ac = BOOTARG_LEN;
caddr_t av = (caddr_t)BOOTARG_OFF;
@@ -82,4 +83,5 @@ machdep_start(startaddr, howto, loadaddr, ssym, esym)
(*(startfuncp)startaddr)(howto, bootdev, BOOTARG_APIVER,
round_to_size(esym), extmem, cnvmem, ac, (int)av);
/* not reached */
+#endif
}
diff --git a/sys/arch/i386/stand/libsa/libsa.h b/sys/arch/i386/stand/libsa/libsa.h
index d9148e98684..1d1a633acde 100644
--- a/sys/arch/i386/stand/libsa/libsa.h
+++ b/sys/arch/i386/stand/libsa/libsa.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: libsa.h,v 1.24 1998/02/24 22:06:54 weingart Exp $ */
+/* $OpenBSD: libsa.h,v 1.25 1998/05/25 19:20:56 mickey Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
@@ -59,4 +59,6 @@ extern u_int32_t bios_cksumlen;
/* memprobe.c */
extern bios_memmap_t *memory_map;
+#ifndef _TEST
#define MACHINE_CMD cmd_machine /* we have i386 specific sommands */
+#endif
diff --git a/sys/arch/i386/stand/libsa/machdep.c b/sys/arch/i386/stand/libsa/machdep.c
index 446d7749d38..99bacc0eee7 100644
--- a/sys/arch/i386/stand/libsa/machdep.c
+++ b/sys/arch/i386/stand/libsa/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.26 1998/05/16 07:32:19 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.27 1998/05/25 19:20:57 mickey Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
@@ -51,8 +51,10 @@ void
machdep()
{
/* here */ CKPT('0');
+#ifndef _TEST
gateA20(1); CKPT('1');
debug_init(); CKPT('2');
+#endif
/* call console init before doing any io */
printf("devices: ");
cninit(); CKPT('3');