summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1997-02-16 17:54:41 +0000
committerJason Downs <downsj@cvs.openbsd.org>1997-02-16 17:54:41 +0000
commitd157596840550d9b7c742e2dca876636991e1a5f (patch)
tree91d543d5bf102b1b1d9ad54aa15f159f287156f1 /sys/arch
parent67d99117baa0ad2e57d23f1d761b23a91c0814e9 (diff)
Fix autoconfiguration code, so that it can actually boot from pdevs.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/hp300/conf/MINIROOT4
-rw-r--r--sys/arch/hp300/dev/rd_root.c4
-rw-r--r--sys/arch/hp300/hp300/autoconf.c20
3 files changed, 14 insertions, 14 deletions
diff --git a/sys/arch/hp300/conf/MINIROOT b/sys/arch/hp300/conf/MINIROOT
index 514aaac21c2..fd5208a6742 100644
--- a/sys/arch/hp300/conf/MINIROOT
+++ b/sys/arch/hp300/conf/MINIROOT
@@ -1,4 +1,4 @@
-# $OpenBSD: MINIROOT,v 1.2 1997/02/16 14:37:08 downsj Exp $
+# $OpenBSD: MINIROOT,v 1.3 1997/02/16 17:54:38 downsj Exp $
#
# Ram disk kernel for the miniroot.
#
@@ -45,7 +45,7 @@ option SE_KEYBOARD # include Swedish HIL keymap
# (Warning: this compiles in a large string table)
option DIOVERBOSE # recognize "unknown" DIO devices
-config bsd root rd0 swap sd0 and sd1 and hd0 and hd1
+config bsd root rd0 swap rd0
mainbus0 at root # root "bus"
diff --git a/sys/arch/hp300/dev/rd_root.c b/sys/arch/hp300/dev/rd_root.c
index 036f1f262bc..2e12b5886a6 100644
--- a/sys/arch/hp300/dev/rd_root.c
+++ b/sys/arch/hp300/dev/rd_root.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rd_root.c,v 1.1 1997/02/16 10:42:20 downsj Exp $ */
+/* $OpenBSD: rd_root.c,v 1.2 1997/02/16 17:54:39 downsj Exp $ */
/* $NetBSD: rd_root.c,v 1.1 1996/05/20 01:17:31 chuck Exp $ */
/*
@@ -61,7 +61,7 @@ rd_attach_hook(unit, rd)
rd->rd_addr = (caddr_t) rd_root_image;
rd->rd_size = (size_t) rd_root_size;
rd->rd_type = RD_KMEM_FIXED;
- printf(" fixed, %d blocks", MINIROOTSIZE);
+ printf("rd%d: fixed, %d blocks\n", unit, MINIROOTSIZE);
}
}
diff --git a/sys/arch/hp300/hp300/autoconf.c b/sys/arch/hp300/hp300/autoconf.c
index 718a4962d36..f582740c59c 100644
--- a/sys/arch/hp300/hp300/autoconf.c
+++ b/sys/arch/hp300/hp300/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.12 1997/02/16 14:37:10 downsj Exp $ */
+/* $OpenBSD: autoconf.c,v 1.13 1997/02/16 17:54:40 downsj Exp $ */
/* $NetBSD: autoconf.c,v 1.31 1997/01/31 01:49:41 thorpej Exp $ */
/*
@@ -705,8 +705,8 @@ setroot()
#endif
rootdevname = findblkname(major(rootdev));
if (rootdevname == NULL) {
- printf("unknown root device major 0x%x\n", rootdev);
- panic("setroot");
+ root_device = NULL; /* no device */
+ return;
}
bzero(buf, sizeof(buf));
sprintf(buf, "%s%d", rootdevname, DISKUNIT(rootdev));
@@ -718,17 +718,11 @@ setroot()
break;
}
}
- if (dv == NULL) {
- printf("device %s (0x%x) not configured\n",
- buf, rootdev);
- panic("setroot");
- }
-
+ root_device = dv; /* NULL is fine. */
return;
}
root_device = rootdv;
-
switch (rootdv->dv_class) {
#ifdef NFSCLIENT
case DV_IFNET:
@@ -993,6 +987,12 @@ setbootdev()
*/
bootdev = 0;
+ /*
+ * If we don't have a saveable root_device, just punt.
+ */
+ if (root_device == NULL)
+ goto out;
+
dd = dev_data_lookup(root_device);
/*