summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1997-09-14 07:02:06 +0000
committerJason Downs <downsj@cvs.openbsd.org>1997-09-14 07:02:06 +0000
commite3464869a70cf46fb7531183e88b59c4935b4dcc (patch)
treed6ac95b78856f4664ba5d81a59dcf61555f4289d
parente3d492b3f7f5c906c1ab2842bbf4088bfef35b8b (diff)
Add cd9660 support. OpenBSD/hp300 boots from SCSI CD-ROM now.
-rw-r--r--sys/arch/hp300/stand/common/version.c6
-rw-r--r--sys/arch/hp300/stand/include/samachdep.h3
-rw-r--r--sys/arch/hp300/stand/libsa/Makefile4
-rw-r--r--sys/arch/hp300/stand/libsa/devopen.c14
-rw-r--r--sys/arch/hp300/stand/uboot/conf.c12
5 files changed, 30 insertions, 9 deletions
diff --git a/sys/arch/hp300/stand/common/version.c b/sys/arch/hp300/stand/common/version.c
index 932fb1c95fc..3cd86c63e3b 100644
--- a/sys/arch/hp300/stand/common/version.c
+++ b/sys/arch/hp300/stand/common/version.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: version.c,v 1.1 1997/07/14 08:14:30 downsj Exp $ */
+/* $OpenBSD: version.c,v 1.2 1997/09/14 07:02:02 downsj Exp $ */
/*
* Record major changes in the boot code here, and increment the version
@@ -12,6 +12,8 @@
*
* 2.2 Grand reorganization.
*
+ * 2.3 Added CD9660 boot support.
+ *
*/
-const char version[] = "2.2";
+const char version[] = "2.3";
diff --git a/sys/arch/hp300/stand/include/samachdep.h b/sys/arch/hp300/stand/include/samachdep.h
index 19522c79d1c..2baca599694 100644
--- a/sys/arch/hp300/stand/include/samachdep.h
+++ b/sys/arch/hp300/stand/include/samachdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: samachdep.h,v 1.1 1997/07/14 08:14:38 downsj Exp $ */
+/* $OpenBSD: samachdep.h,v 1.2 1997/09/14 07:02:03 downsj Exp $ */
/* $NetBSD: samachdep.h,v 1.3 1997/05/12 07:54:45 thorpej Exp $ */
/*
@@ -96,3 +96,4 @@ extern int ndevs_general;
extern struct fs_ops file_system_rawfs[];
extern struct fs_ops file_system_ufs[];
extern struct fs_ops file_system_nfs[];
+extern struct fs_ops file_system_cd9660[];
diff --git a/sys/arch/hp300/stand/libsa/Makefile b/sys/arch/hp300/stand/libsa/Makefile
index 191d11fd68d..dfbbb802338 100644
--- a/sys/arch/hp300/stand/libsa/Makefile
+++ b/sys/arch/hp300/stand/libsa/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.10 1997/07/14 08:14:46 downsj Exp $
+# $OpenBSD: Makefile,v 1.11 1997/09/14 07:02:04 downsj Exp $
LIB= sa
@@ -24,7 +24,7 @@ SRCS+= arp.c ether.c in_cksum.c net.c netif.c rpc.c
SRCS+= bootp.c bootparam.c rarp.c
# boot filesystems
-SRCS+= ufs.c nfs.c rawfs.c
+SRCS+= ufs.c nfs.c rawfs.c cd9660.c
${OBJS}: ${.CURDIR}/../Makefile.inc
diff --git a/sys/arch/hp300/stand/libsa/devopen.c b/sys/arch/hp300/stand/libsa/devopen.c
index 80453c8d1a6..44d6aefefe3 100644
--- a/sys/arch/hp300/stand/libsa/devopen.c
+++ b/sys/arch/hp300/stand/libsa/devopen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: devopen.c,v 1.1 1997/07/14 08:14:48 downsj Exp $ */
+/* $OpenBSD: devopen.c,v 1.2 1997/09/14 07:02:05 downsj Exp $ */
/* $NetBSD: devopen.c,v 1.7 1996/10/14 07:31:47 thorpej Exp $ */
/*-
@@ -76,8 +76,14 @@ devlookup(d, len)
break;
case 2: /* hd */
+ bcopy(file_system_ufs, file_system, sizeof(struct fs_ops));
+ break;
+
case 4: /* sd */
bcopy(file_system_ufs, file_system, sizeof(struct fs_ops));
+ bcopy(file_system_cd9660, &file_system[1],
+ sizeof(struct fs_ops));
+ nfsys = 2;
break;
case 6: /* le */
@@ -228,8 +234,14 @@ devopen(f, fname, file)
break;
case 2: /* hd */
+ bcopy(file_system_ufs, file_system, sizeof(struct fs_ops));
+ break;
+
case 4: /* sd */
bcopy(file_system_ufs, file_system, sizeof(struct fs_ops));
+ bcopy(file_system_cd9660, &file_system[1],
+ sizeof(struct fs_ops));
+ nfsys = 2;
break;
case 6: /* le */
diff --git a/sys/arch/hp300/stand/uboot/conf.c b/sys/arch/hp300/stand/uboot/conf.c
index 6ceb71fe0a3..7a5b04b020d 100644
--- a/sys/arch/hp300/stand/uboot/conf.c
+++ b/sys/arch/hp300/stand/uboot/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.1 1997/07/14 08:14:56 downsj Exp $ */
+/* $OpenBSD: conf.c,v 1.2 1997/09/14 07:02:05 downsj Exp $ */
/* $NetBSD: conf.c,v 1.12 1996/10/14 07:29:15 thorpej Exp $ */
/*
@@ -49,6 +49,7 @@
#include <netinet/in_systm.h>
#include <lib/libsa/nfs.h>
+#include <lib/libsa/cd9660.h>
#include <lib/libsa/ufs.h>
#include "rawfs.h"
@@ -150,8 +151,13 @@ struct fs_ops file_system_nfs[] = {
{ nfs_open, nfs_close, nfs_read, nfs_write, nfs_seek, nfs_stat },
};
-struct fs_ops file_system[1];
-int nfsys = 1; /* we always know which one we want */
+struct fs_ops file_system_cd9660[] = {
+ { cd9660_open, cd9660_close, cd9660_read, cd9660_write, cd9660_seek,
+ cd9660_stat },
+};
+
+struct fs_ops file_system[2];
+int nfsys = 1; /* default; changed per device type. */
/*