Source-Changes-HG archive

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

[src/netbsd-9]: src/usr.sbin/sysinst Pull up following revision(s) (requested...



details:   https://anonhg.NetBSD.org/src/rev/d07b88b1523d
branches:  netbsd-9
changeset: 843682:d07b88b1523d
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Tue Dec 17 09:44:50 2019 +0000

description:
Pull up following revision(s) (requested by martin in ticket #560):
        usr.sbin/sysinst/partitions.h: revision 1.11
        usr.sbin/sysinst/defs.h: revision 1.49
        usr.sbin/sysinst/mbr.c: revision 1.23
        usr.sbin/sysinst/msg.mi.en: revision 1.26
        usr.sbin/sysinst/disks.c: revision 1.58
        usr.sbin/sysinst/arch/evbarm/menus.md.pl: revision 1.2
        usr.sbin/sysinst/msg.mi.es: revision 1.20
        usr.sbin/sysinst/arch/mvme68k/md.c: revision 1.9
        usr.sbin/sysinst/gpt.c: revision 1.13
        usr.sbin/sysinst/arch/evbarm/md.c: revision 1.10
        usr.sbin/sysinst/arch/arc/md.c: revision 1.10
        usr.sbin/sysinst/disklabel.c: revision 1.18
        usr.sbin/sysinst/bsddisklabel.c: revision 1.33
        usr.sbin/sysinst/disklabel.c: revision 1.19
        usr.sbin/sysinst/main.c: revision 1.19
        usr.sbin/sysinst/partman.c: revision 1.45
        usr.sbin/sysinst/arch/alpha/md.c: revision 1.7
        usr.sbin/sysinst/msg.mi.de: revision 1.19
        usr.sbin/sysinst/arch/evbarm/menus.md.en: revision 1.2
        usr.sbin/sysinst/arch/x68k/md.h: revision 1.4
        usr.sbin/sysinst/arch/x68k/md.c: revision 1.9
        usr.sbin/sysinst/arch/evbarm/menus.md.es: revision 1.2
        usr.sbin/sysinst/wskbd.c: revision 1.4
        usr.sbin/sysinst/label.c: revision 1.15
        usr.sbin/sysinst/arch/amiga/md.h: revision 1.5
        usr.sbin/sysinst/label.c: revision 1.16
        usr.sbin/sysinst/arch/hp300/md.c: revision 1.9
        usr.sbin/sysinst/arch/emips/md.c: revision 1.8
        usr.sbin/sysinst/label.c: revision 1.17
        usr.sbin/sysinst/arch/pmax/md.c: revision 1.7
        usr.sbin/sysinst/partitions.c: revision 1.6
        usr.sbin/sysinst/arch/prep/md.c: revision 1.10
        usr.sbin/sysinst/arch/mipsco/md.c: revision 1.7
        usr.sbin/sysinst/partitions.c: revision 1.7
        usr.sbin/sysinst/partitions.c: revision 1.8
        usr.sbin/sysinst/arch/ews4800mips/md.c: revision 1.5
        usr.sbin/sysinst/disklabel.c: revision 1.20
        usr.sbin/sysinst/arch/evbarm/menus.md.fr: revision 1.2
        usr.sbin/sysinst/msg.mi.fr: revision 1.24
        usr.sbin/sysinst/disklabel.c: revision 1.21
        usr.sbin/sysinst/partitions.h: revision 1.9
        usr.sbin/sysinst/msg.mi.pl: revision 1.27
        usr.sbin/sysinst/disklabel.c: revision 1.22
        usr.sbin/sysinst/disklabel.c: revision 1.23
        usr.sbin/sysinst/arch/i386/md.c: revision 1.27
        usr.sbin/sysinst/disklabel.c: revision 1.24
        usr.sbin/sysinst/disklabel.c: revision 1.25
        usr.sbin/sysinst/arch/cobalt/md.h: revision 1.5
        usr.sbin/sysinst/disklabel.c: revision 1.26
        usr.sbin/sysinst/disklabel.c: revision 1.27
        usr.sbin/sysinst/partitions.h: revision 1.10
        usr.sbin/sysinst/arch/cobalt/md.c: revision 1.10
PR install/54582: allow MD code to disable on-disk presence verification
of "real" disklabels. Auto-enable this (at run time) when there is no other
partitioning scheme but disklabel configured.
Hard-coded enable this for x68k to allow using kernel based translations
for native Human68k partitions.
Get rid of the evbarm preliminary menu: do not bother to ask the user
whether this is a RPi - query the FDT instead.
PR 54065: add optional "old compat" variant of ext2fs in file system
type selection and use that as default for the cobalt boot file system.
For now rely on the kernel mapping native RDB partitions.
Fix detection of existing disklabels in the case when we only have
the disklabel partitioning scheme available.
Fix DISKLABEL_NO_ONDISK_VERIFY (accidently disabled in previous)
Fix inverted comparison
Do not try to change the keyboard layout if we are not running on the
console.
When trying to tell a fictious but empty label from a real one, skip
partition a if it has the same start and size as the raw partition.
Remove bogus assert.
When finding (paritioning scheme native) partition types for file systems
from our install description, pass the partition type (not only the file
system type). Sometimes (e.g. EFI boot partition on GPT) the filesystem
type (MSDOS) is not a unique selector.
Adapt MD parts to changes in get_fs_part_type (pass partition type).
If a fictious label has no RAW_PART assume there is no valid disk label.
Pass proper track size when initializing the default alignment - this is
important with sunlabels.
Fix overlapping partitions display
Reject (what we consider) empty/invalid fake disklabels no matter whether
we have other partitioning schemes available or not.
Do not show disklabel command invocation by default (only if there are
errors).
After installing boot blocks with RUN_NO_CLEAR (and handling the
potential errors) make sure to clear the stdscreen.

diffstat:

 usr.sbin/sysinst/arch/alpha/md.c         |   7 ++-
 usr.sbin/sysinst/arch/amiga/md.h         |   9 +++-
 usr.sbin/sysinst/arch/arc/md.c           |   4 +-
 usr.sbin/sysinst/arch/cobalt/md.c        |   4 +-
 usr.sbin/sysinst/arch/cobalt/md.h        |   3 +-
 usr.sbin/sysinst/arch/emips/md.c         |   7 ++-
 usr.sbin/sysinst/arch/evbarm/md.c        |  20 +++++----
 usr.sbin/sysinst/arch/evbarm/menus.md.en |   6 +--
 usr.sbin/sysinst/arch/evbarm/menus.md.es |   6 +--
 usr.sbin/sysinst/arch/evbarm/menus.md.fr |   6 +--
 usr.sbin/sysinst/arch/evbarm/menus.md.pl |   6 +--
 usr.sbin/sysinst/arch/ews4800mips/md.c   |   4 +-
 usr.sbin/sysinst/arch/hp300/md.c         |   8 +++-
 usr.sbin/sysinst/arch/i386/md.c          |   4 +-
 usr.sbin/sysinst/arch/mipsco/md.c        |   8 +++-
 usr.sbin/sysinst/arch/mvme68k/md.c       |   8 +++-
 usr.sbin/sysinst/arch/pmax/md.c          |   7 ++-
 usr.sbin/sysinst/arch/prep/md.c          |   4 +-
 usr.sbin/sysinst/arch/x68k/md.c          |   8 +++-
 usr.sbin/sysinst/arch/x68k/md.h          |   9 +++-
 usr.sbin/sysinst/bsddisklabel.c          |   8 +-
 usr.sbin/sysinst/defs.h                  |   3 +-
 usr.sbin/sysinst/disklabel.c             |  54 +++++++++++++++++++++--
 usr.sbin/sysinst/disks.c                 |   9 +++-
 usr.sbin/sysinst/gpt.c                   |  11 ++++-
 usr.sbin/sysinst/label.c                 |  70 +++++++++++++++++++------------
 usr.sbin/sysinst/main.c                  |  11 +----
 usr.sbin/sysinst/mbr.c                   |   4 +-
 usr.sbin/sysinst/msg.mi.de               |   3 +-
 usr.sbin/sysinst/msg.mi.en               |   3 +-
 usr.sbin/sysinst/msg.mi.es               |   3 +-
 usr.sbin/sysinst/msg.mi.fr               |   3 +-
 usr.sbin/sysinst/msg.mi.pl               |   3 +-
 usr.sbin/sysinst/partitions.c            |   6 +-
 usr.sbin/sysinst/partitions.h            |   6 +-
 usr.sbin/sysinst/partman.c               |   5 +-
 usr.sbin/sysinst/wskbd.c                 |  11 ++++-
 37 files changed, 232 insertions(+), 119 deletions(-)

diffs (truncated from 1039 to 300 lines):

diff -r 95c604ab7680 -r d07b88b1523d usr.sbin/sysinst/arch/alpha/md.c
--- a/usr.sbin/sysinst/arch/alpha/md.c  Tue Dec 17 09:38:07 2019 +0000
+++ b/usr.sbin/sysinst/arch/alpha/md.c  Tue Dec 17 09:44:50 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.6 2019/07/13 17:13:36 martin Exp $ */
+/*     $NetBSD: md.c,v 1.6.2.1 2019/12/17 09:44:50 msaitoh Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -166,6 +166,11 @@
                process_menu(MENU_ok,
                    __UNCONST("Warning: disk is probably not bootable"));
 
+       wclear(stdscr);
+       touchwin(stdscr);
+       clearok(stdscr, 1);
+       refresh();
+
        return 0;
 }
 
diff -r 95c604ab7680 -r d07b88b1523d usr.sbin/sysinst/arch/amiga/md.h
--- a/usr.sbin/sysinst/arch/amiga/md.h  Tue Dec 17 09:38:07 2019 +0000
+++ b/usr.sbin/sysinst/arch/amiga/md.h  Tue Dec 17 09:44:50 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.h,v 1.3.2.1 2019/11/17 07:04:36 martin Exp $        */
+/*     $NetBSD: md.h,v 1.3.2.2 2019/12/17 09:44:51 msaitoh Exp $       */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -71,6 +71,13 @@
 
 
 /*
+ * We rely on kernel support to translate native RDB partitions
+ * to in-core disklabels, so we can not check for existance of "real"
+ * disklabels on-disk before offering disklabel partitions.
+ */
+#define        DISKLABEL_NO_ONDISK_VERIFY      1
+
+/*
  *  prototypes for MD code.
  */
 
diff -r 95c604ab7680 -r d07b88b1523d usr.sbin/sysinst/arch/arc/md.c
--- a/usr.sbin/sysinst/arch/arc/md.c    Tue Dec 17 09:38:07 2019 +0000
+++ b/usr.sbin/sysinst/arch/arc/md.c    Tue Dec 17 09:44:50 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.8.2.1 2019/08/18 13:19:51 msaitoh Exp $ */
+/*     $NetBSD: md.c,v 1.8.2.2 2019/12/17 09:44:50 msaitoh Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -271,7 +271,7 @@
        };
 
        boot_part.nat_type = parts->pscheme->get_fs_part_type(
-           boot_part.fs_type, boot_part.fs_sub_type);
+           PT_root, boot_part.fs_type, boot_part.fs_sub_type);
 
        return parts_use_wholedisk(parts, 1, &boot_part);
 }
diff -r 95c604ab7680 -r d07b88b1523d usr.sbin/sysinst/arch/cobalt/md.c
--- a/usr.sbin/sysinst/arch/cobalt/md.c Tue Dec 17 09:38:07 2019 +0000
+++ b/usr.sbin/sysinst/arch/cobalt/md.c Tue Dec 17 09:44:50 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.8.2.1 2019/08/18 13:19:53 msaitoh Exp $ */
+/*     $NetBSD: md.c,v 1.8.2.2 2019/12/17 09:44:51 msaitoh Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -286,7 +286,7 @@
        };
 
        boot_part.nat_type = parts->pscheme->get_fs_part_type(
-           boot_part.fs_type, boot_part.fs_sub_type);
+           PT_root, boot_part.fs_type, boot_part.fs_sub_type);
 
        return parts_use_wholedisk(parts, 1, &boot_part);
 }
diff -r 95c604ab7680 -r d07b88b1523d usr.sbin/sysinst/arch/cobalt/md.h
--- a/usr.sbin/sysinst/arch/cobalt/md.h Tue Dec 17 09:38:07 2019 +0000
+++ b/usr.sbin/sysinst/arch/cobalt/md.h Tue Dec 17 09:44:50 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.h,v 1.3.2.1 2019/11/17 07:04:38 martin Exp $        */
+/*     $NetBSD: md.h,v 1.3.2.2 2019/12/17 09:44:51 msaitoh Exp $       */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -48,6 +48,7 @@
 #define PART_BOOT              (5 * 1024 * 1024)       /* 5MB boot partition */
 #define PART_BOOT_MIN          (1 * 1024 * 1024)       /* 1MB minimum */
 #define        PART_BOOT_TYPE          FS_EX2FS
+#define        PART_BOOT_SUBT          1                       /* use "old" ext2 */
 #define        PART_BOOT_MOUNT         "/stand"
 
 /* default partition size */
diff -r 95c604ab7680 -r d07b88b1523d usr.sbin/sysinst/arch/emips/md.c
--- a/usr.sbin/sysinst/arch/emips/md.c  Tue Dec 17 09:38:07 2019 +0000
+++ b/usr.sbin/sysinst/arch/emips/md.c  Tue Dec 17 09:44:50 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.7 2019/07/13 17:13:37 martin Exp $    */
+/*     $NetBSD: md.c,v 1.7.2.1 2019/12/17 09:44:51 msaitoh Exp $       */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -175,6 +175,11 @@
                    "/bin/dd if=%s of=/dev/reflash0c bs=512", ldr_path))
                        process_menu(MENU_ok, __UNCONST("Warning: the system "
                            "is probably not bootable"));
+
+               wclear(stdscr);
+               touchwin(stdscr);
+               clearok(stdscr, 1);
+               refresh();
        }
 
        return 0;
diff -r 95c604ab7680 -r d07b88b1523d usr.sbin/sysinst/arch/evbarm/md.c
--- a/usr.sbin/sysinst/arch/evbarm/md.c Tue Dec 17 09:38:07 2019 +0000
+++ b/usr.sbin/sysinst/arch/evbarm/md.c Tue Dec 17 09:44:50 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.8.2.1 2019/08/18 13:19:52 msaitoh Exp $ */
+/*     $NetBSD: md.c,v 1.8.2.2 2019/12/17 09:44:50 msaitoh Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -48,18 +48,20 @@
 #include "msg_defs.h"
 #include "menu_defs.h"
 
-int boardtype = 0;
-
-void
-md_prelim_menu(void)
-{
-       /* get the boardtype from the user */
-       process_menu(MENU_prelim, NULL);
-}
+int boardtype = BOARD_TYPE_NORMAL;
 
 void
 md_init(void)
 {
+       int rv;
+
+       rv =run_program(RUN_SILENT|RUN_ERROR_OK, "sh -c 'ofctl -p / model | "
+           "fgrep \"Raspberry Pi\"'");
+       if (rv != 0)
+               return;
+
+       /* this is some kind of Raspberry Pi */
+       boardtype = BOARD_TYPE_RPI;
 }
 
 void
diff -r 95c604ab7680 -r d07b88b1523d usr.sbin/sysinst/arch/evbarm/menus.md.en
--- a/usr.sbin/sysinst/arch/evbarm/menus.md.en  Tue Dec 17 09:38:07 2019 +0000
+++ b/usr.sbin/sysinst/arch/evbarm/menus.md.en  Tue Dec 17 09:44:50 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: menus.md.en,v 1.1 2014/07/26 19:30:45 dholland Exp $   */
+/*     $NetBSD: menus.md.en,v 1.1.30.1 2019/12/17 09:44:50 msaitoh Exp $       */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -35,7 +35,3 @@
 
 /* evbarm machine dependent menus, english */
 
-menu prelim, title "What kind of system do you have?", y=-10;
-       option "Raspberry PI", exit, action { boardtype = 1; };
-       option "Other", exit, action { boardtype = 0; };
-
diff -r 95c604ab7680 -r d07b88b1523d usr.sbin/sysinst/arch/evbarm/menus.md.es
--- a/usr.sbin/sysinst/arch/evbarm/menus.md.es  Tue Dec 17 09:38:07 2019 +0000
+++ b/usr.sbin/sysinst/arch/evbarm/menus.md.es  Tue Dec 17 09:44:50 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: menus.md.es,v 1.1 2014/07/26 19:30:45 dholland Exp $   */
+/*     $NetBSD: menus.md.es,v 1.1.30.1 2019/12/17 09:44:50 msaitoh Exp $       */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -35,7 +35,3 @@
 
 /* evbarm machine dependent menus, spanish */
 
-menu prelim, title "What kind of system do you have?", y=-10;
-       option "Raspberry PI", exit, action { boardtype = 1; };
-       option "Other", exit, action { boardtype = 0; };
-
diff -r 95c604ab7680 -r d07b88b1523d usr.sbin/sysinst/arch/evbarm/menus.md.fr
--- a/usr.sbin/sysinst/arch/evbarm/menus.md.fr  Tue Dec 17 09:38:07 2019 +0000
+++ b/usr.sbin/sysinst/arch/evbarm/menus.md.fr  Tue Dec 17 09:44:50 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: menus.md.fr,v 1.1 2014/07/26 19:30:45 dholland Exp $   */
+/*     $NetBSD: menus.md.fr,v 1.1.30.1 2019/12/17 09:44:50 msaitoh Exp $       */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -35,7 +35,3 @@
 
 /* evbarm machine dependent menus, french */
 
-menu prelim, title "What kind of system do you have?", y=-10;
-       option "Raspberry PI", exit, action { boardtype = 1; };
-       option "Other", exit, action { boardtype = 0; };
-
diff -r 95c604ab7680 -r d07b88b1523d usr.sbin/sysinst/arch/evbarm/menus.md.pl
--- a/usr.sbin/sysinst/arch/evbarm/menus.md.pl  Tue Dec 17 09:38:07 2019 +0000
+++ b/usr.sbin/sysinst/arch/evbarm/menus.md.pl  Tue Dec 17 09:44:50 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: menus.md.pl,v 1.1 2014/07/26 19:30:45 dholland Exp $   */
+/*     $NetBSD: menus.md.pl,v 1.1.30.1 2019/12/17 09:44:50 msaitoh Exp $       */
 /* Based on english version: */
 /*     NetBSD: menus.md.en,v 1.2 2002/03/31 02:14:06 thorpej Exp */
 
@@ -37,7 +37,3 @@
 
 /* evbarm machine dependent menus, Polish */
 
-menu prelim, title "What kind of system do you have?", y=-10;
-       option "Raspberry PI", exit, action { boardtype = 1; };
-       option "Other", exit, action { boardtype = 0; };
-
diff -r 95c604ab7680 -r d07b88b1523d usr.sbin/sysinst/arch/ews4800mips/md.c
--- a/usr.sbin/sysinst/arch/ews4800mips/md.c    Tue Dec 17 09:38:07 2019 +0000
+++ b/usr.sbin/sysinst/arch/ews4800mips/md.c    Tue Dec 17 09:44:50 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.4 2019/07/13 17:13:37 martin Exp $    */
+/*     $NetBSD: md.c,v 1.4.2.1 2019/12/17 09:44:51 msaitoh Exp $       */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -259,7 +259,7 @@
        };
 
        boot_part.nat_type = parts->pscheme->get_fs_part_type(
-           boot_part.fs_type, boot_part.fs_sub_type);
+           PT_root, boot_part.fs_type, boot_part.fs_sub_type);
 
        return parts_use_wholedisk(parts, 1, &boot_part);
 }
diff -r 95c604ab7680 -r d07b88b1523d usr.sbin/sysinst/arch/hp300/md.c
--- a/usr.sbin/sysinst/arch/hp300/md.c  Tue Dec 17 09:38:07 2019 +0000
+++ b/usr.sbin/sysinst/arch/hp300/md.c  Tue Dec 17 09:44:50 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.8 2019/07/13 17:13:37 martin Exp $ */
+/*     $NetBSD: md.c,v 1.8.2.1 2019/12/17 09:44:51 msaitoh Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -187,6 +187,12 @@
            "/usr/sbin/installboot /dev/r%sc /usr/mdec/uboot.lif", pm->diskdev))
                process_menu(MENU_ok,
                    __UNCONST("Warning: disk is probably not bootable"));
+
+       wclear(stdscr);
+       touchwin(stdscr);
+       clearok(stdscr, 1);
+       refresh();
+
        return 0;
 }
 
diff -r 95c604ab7680 -r d07b88b1523d usr.sbin/sysinst/arch/i386/md.c
--- a/usr.sbin/sysinst/arch/i386/md.c   Tue Dec 17 09:38:07 2019 +0000
+++ b/usr.sbin/sysinst/arch/i386/md.c   Tue Dec 17 09:44:50 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.20.2.3 2019/11/19 06:19:04 msaitoh Exp $ */
+/*     $NetBSD: md.c,v 1.20.2.4 2019/12/17 09:44:51 msaitoh Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -837,8 +837,6 @@
 {
        struct disk_part_info info;
 
-       assert(efi_id == NO_PART);      /* XXX EFI support still missing */
-
        if (root_id != NO_PART) {
                /* we always update the gpt boot record for now */
                if (!parts->pscheme->get_part_info(parts, root_id, &info))
diff -r 95c604ab7680 -r d07b88b1523d usr.sbin/sysinst/arch/mipsco/md.c
--- a/usr.sbin/sysinst/arch/mipsco/md.c Tue Dec 17 09:38:07 2019 +0000
+++ b/usr.sbin/sysinst/arch/mipsco/md.c Tue Dec 17 09:44:50 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.6 2019/07/13 17:13:39 martin Exp $    */
+/*     $NetBSD: md.c,v 1.6.2.1 2019/12/17 09:44:51 msaitoh Exp $       */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -168,6 +168,12 @@
            "/usr/mdec/installboot /dev/r%sc /usr/mdec/bootxx_ffs", pm->diskdev))
                process_menu(MENU_ok,
                        __UNCONST("Warning: disk is probably not bootable"));
+
+       wclear(stdscr);
+       touchwin(stdscr);
+       clearok(stdscr, 1);
+       refresh();



Home | Main Index | Thread Index | Old Index