summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorshin <shin@NetBSD.org>2000-01-01 02:22:35 +0000
committershin <shin@NetBSD.org>2000-01-01 02:22:35 +0000
commit54fac7be8f16cddf896b798eaa76f1fa1b3addc8 (patch)
tree29246ebc43de12ec44ff9f4a564cdaf18a0d3de0 /sys
parent7626f63930868432a4ac0bf5d142505821a2622a (diff)
add MSDOSFS
delete redundant kernel 'config' lines. add new option '-b={wd0,sd0,nfs}' to change boot device.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/hpcmips/conf/GENERIC5
-rw-r--r--sys/arch/hpcmips/hpcmips/machdep.c25
2 files changed, 24 insertions, 6 deletions
diff --git a/sys/arch/hpcmips/conf/GENERIC b/sys/arch/hpcmips/conf/GENERIC
index 624bf4edc55..4398e871b23 100644
--- a/sys/arch/hpcmips/conf/GENERIC
+++ b/sys/arch/hpcmips/conf/GENERIC
@@ -2,7 +2,7 @@
# Distribution kernel (any model) kernel config file
#
-# $NetBSD: GENERIC,v 1.19 1999/12/28 03:15:16 takemura Exp $
+# $NetBSD: GENERIC,v 1.20 2000/01/01 02:22:35 shin Exp $
#
include "arch/hpcmips/conf/std.hpcmips"
@@ -48,6 +48,7 @@ file-system MFS # memory-based filesystem
file-system NFS # Sun NFS-compatible filesystem (client)
#file-system LFS # Log-based filesystem (still experimental)
#file-system CD9660 # ISO 9660 + Rock Ridge file system
+file-system MSDOSFS # MS-DOS file system
#file-system FDESC # /dev/fd
file-system KERNFS # /kern (kernel informational filesystem)
#file-system NULLFS # loopback file system
@@ -92,8 +93,6 @@ options COMPAT_386BSD_MBRPART # recognize old partition ID
options NFS_BOOT_DHCP
config netbsd root on ? type ?
-config sdnetbsd root on sd0a type ffs
-config nfsnetbsd root on ? type nfs
# WS console uses SUN or VT100 terminal emulation
options WSEMUL_VT100
diff --git a/sys/arch/hpcmips/hpcmips/machdep.c b/sys/arch/hpcmips/hpcmips/machdep.c
index a6c1f527f38..ecd226d9c32 100644
--- a/sys/arch/hpcmips/hpcmips/machdep.c
+++ b/sys/arch/hpcmips/hpcmips/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.12 1999/12/04 21:20:28 ragge Exp $ */
+/* $NetBSD: machdep.c,v 1.13 2000/01/01 02:22:36 shin Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -43,7 +43,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.12 1999/12/04 21:20:28 ragge Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.13 2000/01/01 02:22:36 shin Exp $");
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
#include "opt_vr41x1.h"
@@ -52,6 +52,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.12 1999/12/04 21:20:28 ragge Exp $");
#include "fs_mfs.h"
#include "opt_ddb.h"
#include "opt_rtc_offset.h"
+#include "fs_nfs.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -113,6 +114,11 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.12 1999/12/04 21:20:28 ragge Exp $");
#define DPRINTF(arg)
#endif
+#ifdef NFS
+extern int nfs_mountroot __P((void));
+extern int (*mountroot) __P((void));
+#endif
+
/* the following is used externally (sysctl_hw) */
char machine[] = MACHINE; /* from <machine/param.h> */
char machine_arch[] = MACHINE_ARCH; /* from <machine/param.h> */
@@ -295,7 +301,7 @@ mach_init(argc, argv, bi)
#endif /* RTC_OFFSET */
/* Compute bootdev */
- makebootdev("wd0"); /* XXX Should be passed up from boot lorder */
+ makebootdev("wd0"); /* default boot device */
boothowto = 0;
#ifdef KADB
@@ -323,6 +329,19 @@ mach_init(argc, argv, bi)
case 'h': /* XXX, serial console */
bootinfo->bi_cnuse |= BI_CNUSE_SERIAL;
break;
+
+ case 'b':
+ /* boot device: -b=sd0 etc. */
+#ifdef NFS
+ if (strcmp(cp+2, "nfs") == 0)
+ mountroot = nfs_mountroot;
+ else
+ makebootdev(cp+2);
+#else
+ makebootdev(cp+2);
+#endif
+ cp += strlen(cp);
+ break;
}
}
}