Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/hpcmips add MSDOSFS



details:   https://anonhg.NetBSD.org/src/rev/d431a984afbb
branches:  trunk
changeset: 480065:d431a984afbb
user:      shin <shin%NetBSD.org@localhost>
date:      Sat Jan 01 02:22:35 2000 +0000

description:
add MSDOSFS
delete redundant kernel 'config' lines.
add new option '-b={wd0,sd0,nfs}' to change boot device.

diffstat:

 sys/arch/hpcmips/conf/GENERIC      |   5 ++---
 sys/arch/hpcmips/hpcmips/machdep.c |  25 ++++++++++++++++++++++---
 2 files changed, 24 insertions(+), 6 deletions(-)

diffs (96 lines):

diff -r efa21ca7e42f -r d431a984afbb sys/arch/hpcmips/conf/GENERIC
--- a/sys/arch/hpcmips/conf/GENERIC     Sat Jan 01 02:15:38 2000 +0000
+++ b/sys/arch/hpcmips/conf/GENERIC     Sat Jan 01 02:22:35 2000 +0000
@@ -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    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        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 -r efa21ca7e42f -r d431a984afbb sys/arch/hpcmips/hpcmips/machdep.c
--- a/sys/arch/hpcmips/hpcmips/machdep.c        Sat Jan 01 02:15:38 2000 +0000
+++ b/sys/arch/hpcmips/hpcmips/machdep.c        Sat Jan 01 02:22:35 2000 +0000
@@ -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 @@
 #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 @@
 #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 @@
 #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 @@
                        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;
                        }
                }
        }



Home | Main Index | Thread Index | Old Index