Module Name: src
Committed By: tsutsui
Date: Wed Apr 22 12:37:01 UTC 2009
Modified Files:
src/distrib/utils/sysinst/arch/pmax: md.c md.h
Log Message:
Add UFS2 root and boot support.
To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/distrib/utils/sysinst/arch/pmax/md.c
cvs rdiff -u -r1.32 -r1.33 src/distrib/utils/sysinst/arch/pmax/md.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/distrib/utils/sysinst/arch/pmax/md.c
diff -u src/distrib/utils/sysinst/arch/pmax/md.c:1.61 src/distrib/utils/sysinst/arch/pmax/md.c:1.62
--- src/distrib/utils/sysinst/arch/pmax/md.c:1.61 Tue Oct 7 09:58:15 2008
+++ src/distrib/utils/sysinst/arch/pmax/md.c Wed Apr 22 12:37:01 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.61 2008/10/07 09:58:15 abs Exp $ */
+/* $NetBSD: md.c,v 1.62 2009/04/22 12:37:01 tsutsui Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -141,18 +141,29 @@
int
md_post_newfs(void)
{
+ char *bootxx;
+ int error;
+
/* XXX boot blocks ... */
if (target_already_root()) {
- /* /usr is empty and we must already have bootblocks?*/
+ /* /usr is empty and we must already have bootblocks? */
return 0;
}
printf(msg_string(MSG_dobootblks), diskdev);
cp_to_target("/usr/mdec/boot.pmax", "/boot.pmax");
- if (run_program(RUN_DISPLAY | RUN_NO_CLEAR,
- "/usr/sbin/installboot /dev/r%sc /usr/mdec/bootxx_ffs", diskdev))
+ bootxx = bootxx_name();
+ if (bootxx != NULL) {
+ error = run_program(RUN_DISPLAY | RUN_NO_CLEAR,
+ "/usr/sbin/installboot /dev/r%sc %s", diskdev, bootxx);
+ free(bootxx);
+ } else
+ error = -1;
+
+ if (error != 0)
process_menu(MENU_ok,
- deconst("Warning: disk is probably not bootable"));
+ deconst("Warning: disk is probably not bootable"));
+
return 0;
}
Index: src/distrib/utils/sysinst/arch/pmax/md.h
diff -u src/distrib/utils/sysinst/arch/pmax/md.h:1.32 src/distrib/utils/sysinst/arch/pmax/md.h:1.33
--- src/distrib/utils/sysinst/arch/pmax/md.h:1.32 Mon Nov 12 15:07:36 2007
+++ src/distrib/utils/sysinst/arch/pmax/md.h Wed Apr 22 12:37:01 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: md.h,v 1.32 2007/11/12 15:07:36 jmmv Exp $ */
+/* $NetBSD: md.h,v 1.33 2009/04/22 12:37:01 tsutsui Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -55,6 +55,15 @@
#define DEFUSRSIZE 120 /* Default /usr size, if /home */
#define XNEEDMB 100 /* Extra megs for full X installation */
+/* have support for booting from UFS2 */
+#define HAVE_UFS2_BOOT
+
+/* have file system specific primary boot loader */
+#define HAVE_BOOTXX_xFS
+#define BOOTXXDIR "/usr/mdec"
+#define BOOTXX_FFSV1 "bootxx_ffs"
+#define BOOTXX_FFSV2 "bootxx_ffsv2"
+
/*
* Machine-specific command to write a new label to a disk.
* If not defined, we assume the port does not support disklabels and