CVS commit: src/usr.sbin/sysinst/arch/evbarm

2021-05-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun May  9 10:39:01 UTC 2021

Modified Files:
src/usr.sbin/sysinst/arch/evbarm: md.c

Log Message:
Keep MSDOS partition size and subtype consistent - some u-boot are picky.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/sysinst/arch/evbarm/md.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/sysinst/arch/evbarm/md.c
diff -u src/usr.sbin/sysinst/arch/evbarm/md.c:1.20 src/usr.sbin/sysinst/arch/evbarm/md.c:1.21
--- src/usr.sbin/sysinst/arch/evbarm/md.c:1.20	Sat Nov 28 13:05:58 2020
+++ src/usr.sbin/sysinst/arch/evbarm/md.c	Sun May  9 10:39:00 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.20 2020/11/28 13:05:58 jmcneill Exp $ */
+/*	$NetBSD: md.c,v 1.21 2021/05/09 10:39:00 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -333,10 +333,12 @@ bool
 md_parts_use_wholedisk(struct disk_partitions *parts)
 {
 	struct disk_part_info boot_part = {
-		.size = boardtype == BOARD_TYPE_NORMAL ? 
+		.size = boardtype == BOARD_TYPE_NORMAL ?
 		PART_BOOT_LARGE/parts->bytes_per_sector :
 		PART_BOOT/parts->bytes_per_sector,
-		.fs_type = PART_BOOT_TYPE, .fs_sub_type = MBR_PTYPE_FAT16L,
+		.fs_type = PART_BOOT_TYPE,
+		.fs_sub_type = boardtype == BOARD_TYPE_NORMAL ?
+		MBR_PTYPE_FAT32L : MBR_PTYPE_FAT16L,
 	};
 
 	return parts_use_wholedisk(parts, 1, _part);
@@ -368,15 +370,15 @@ evbarm_part_defaults(struct pm_devs *my_
 {
 	size_t i;
 
-	if (boardtype != BOARD_TYPE_NORMAL)
-		return;
-
 	for (i = 0; i < num_usage_infos; i++) {
 		if (infos[i].fs_type == PART_BOOT_TYPE &&
 		infos[i].mount[0] != 0 &&
 		strcmp(infos[i].mount, PART_BOOT_MOUNT) == 0) {
-			infos[i].size = PART_BOOT_LARGE /
-			my_pm->parts->bytes_per_sector;
+			infos[i].size = boardtype == BOARD_TYPE_NORMAL ?
+			PART_BOOT_LARGE/my_pm->parts->bytes_per_sector :
+			PART_BOOT/my_pm->parts->bytes_per_sector;
+			infos[i].fs_version = boardtype == BOARD_TYPE_NORMAL ?
+			MBR_PTYPE_FAT32L : MBR_PTYPE_FAT16L; 
 			return;
 		}
 	}



CVS commit: src/usr.sbin/sysinst/arch/evbarm

2020-11-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Nov 28 13:05:58 UTC 2020

Modified Files:
src/usr.sbin/sysinst/arch/evbarm: md.c

Log Message:
Make sure the kernel set is selected, even if extracting parts of it
manually.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/usr.sbin/sysinst/arch/evbarm/md.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/sysinst/arch/evbarm/md.c
diff -u src/usr.sbin/sysinst/arch/evbarm/md.c:1.19 src/usr.sbin/sysinst/arch/evbarm/md.c:1.20
--- src/usr.sbin/sysinst/arch/evbarm/md.c:1.19	Wed Oct 14 15:09:10 2020
+++ src/usr.sbin/sysinst/arch/evbarm/md.c	Sat Nov 28 13:05:58 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.19 2020/10/14 15:09:10 martin Exp $ */
+/*	$NetBSD: md.c,v 1.20 2020/11/28 13:05:58 jmcneill Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -86,6 +86,7 @@ md_init_set_status(int flags)
 	 * we will extract kernel variants piecewise manually
 	 * later, just fetch the kernel set, do not unpack it.
 	 */
+	set_kernel_set(SET_KERNEL_1);
 	set_noextract_set(SET_KERNEL_1);
 }
 



CVS commit: src/usr.sbin/sysinst/arch/evbarm

2020-10-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Oct 14 15:09:10 UTC 2020

Modified Files:
src/usr.sbin/sysinst/arch/evbarm: md.c

Log Message:
Properly convert partition default sizes in MB to number of sectors


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/sysinst/arch/evbarm/md.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/sysinst/arch/evbarm/md.c
diff -u src/usr.sbin/sysinst/arch/evbarm/md.c:1.18 src/usr.sbin/sysinst/arch/evbarm/md.c:1.19
--- src/usr.sbin/sysinst/arch/evbarm/md.c:1.18	Wed Oct 14 14:37:59 2020
+++ src/usr.sbin/sysinst/arch/evbarm/md.c	Wed Oct 14 15:09:10 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.18 2020/10/14 14:37:59 martin Exp $ */
+/*	$NetBSD: md.c,v 1.19 2020/10/14 15:09:10 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -333,7 +333,8 @@ md_parts_use_wholedisk(struct disk_parti
 {
 	struct disk_part_info boot_part = {
 		.size = boardtype == BOARD_TYPE_NORMAL ? 
-		PART_BOOT_LARGE/512 : PART_BOOT/512,
+		PART_BOOT_LARGE/parts->bytes_per_sector :
+		PART_BOOT/parts->bytes_per_sector,
 		.fs_type = PART_BOOT_TYPE, .fs_sub_type = MBR_PTYPE_FAT16L,
 	};
 
@@ -373,7 +374,8 @@ evbarm_part_defaults(struct pm_devs *my_
 		if (infos[i].fs_type == PART_BOOT_TYPE &&
 		infos[i].mount[0] != 0 &&
 		strcmp(infos[i].mount, PART_BOOT_MOUNT) == 0) {
-			infos[i].size = PART_BOOT_LARGE;
+			infos[i].size = PART_BOOT_LARGE /
+			my_pm->parts->bytes_per_sector;
 			return;
 		}
 	}



CVS commit: src/usr.sbin/sysinst/arch/evbarm

2020-10-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Oct 14 14:37:59 UTC 2020

Modified Files:
src/usr.sbin/sysinst/arch/evbarm: md.c

Log Message:
Move MBR writing (if any) post disklabel writing, otherwise strange
interactions happen.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/sysinst/arch/evbarm/md.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/sysinst/arch/evbarm/md.c
diff -u src/usr.sbin/sysinst/arch/evbarm/md.c:1.17 src/usr.sbin/sysinst/arch/evbarm/md.c:1.18
--- src/usr.sbin/sysinst/arch/evbarm/md.c:1.17	Mon Oct 12 16:14:33 2020
+++ src/usr.sbin/sysinst/arch/evbarm/md.c	Wed Oct 14 14:37:59 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.17 2020/10/12 16:14:33 martin Exp $ */
+/*	$NetBSD: md.c,v 1.18 2020/10/14 14:37:59 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -117,6 +117,13 @@ again:
 			pm->dlsize = ps->size_limit;
 	}
 
+	/*
+	 * If the selected scheme does not need two-stage partitioning
+	 * (like GPT), do not bother to edit the outer partitions.
+	 */
+	if (pm->parts->pscheme->secondary_partitions == NULL ||
+	pm->parts->pscheme->secondary_scheme == NULL)
+		return true;
 
 	res = edit_outer_parts(pm->parts);
 	if (res == 0)
@@ -164,6 +171,21 @@ md_pre_disklabel(struct install_partitio
 struct disk_partitions *parts)
 {
 
+	/*
+	 * RAW_PART is 2 on evbarm and bad things happen if we
+	 * write the MBR first and then the disklabel - so postpone
+	 * the MBR to md_post_disklabel(), unlike other architecturs.
+	 */
+	return true;
+}
+
+/*
+ * hook called after writing disklabel to new target disk.
+ */
+bool
+md_post_disklabel(struct install_partition_desc *install,
+struct disk_partitions *parts)
+{
 	if (parts->parent == NULL)
 		return true;	/* no outer partitions */
 
@@ -183,16 +205,6 @@ md_pre_disklabel(struct install_partitio
 }
 
 /*
- * hook called after writing disklabel to new target disk.
- */
-bool
-md_post_disklabel(struct install_partition_desc *install,
-struct disk_partitions *parts)
-{
-	return true;
-}
-
-/*
  * hook called after upgrade() or install() has finished setting
  * up the target disk but immediately before the user is given the
  * ``disks are now set up'' message.



CVS commit: src/usr.sbin/sysinst/arch/evbarm

2020-05-29 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri May 29 10:25:06 UTC 2020

Modified Files:
src/usr.sbin/sysinst/arch/evbarm: md.c

Log Message:
DTB are no longer part of kernel set


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/sysinst/arch/evbarm/md.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/sysinst/arch/evbarm/md.c
diff -u src/usr.sbin/sysinst/arch/evbarm/md.c:1.15 src/usr.sbin/sysinst/arch/evbarm/md.c:1.16
--- src/usr.sbin/sysinst/arch/evbarm/md.c:1.15	Wed Jan 29 19:04:40 2020
+++ src/usr.sbin/sysinst/arch/evbarm/md.c	Fri May 29 10:25:06 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.15 2020/01/29 19:04:40 martin Exp $ */
+/*	$NetBSD: md.c,v 1.16 2020/05/29 10:25:06 jmcneill Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -83,9 +83,8 @@ md_init_set_status(int flags)
 {
 
 	/*
-	 * we will extract kernel variants and DTB files piecwise
-	 * manually later, just fetch the kernel set, do not
-	 * unpack it.
+	 * we will extract kernel variants piecewise manually
+	 * later, just fetch the kernel set, do not unpack it.
 	 */
 	set_noextract_set(SET_KERNEL_1);
 }
@@ -221,15 +220,12 @@ evbarm_extract_finalize(int update)
 		return 0;
 	}
 	if (boardtype == BOARD_TYPE_NORMAL) {
-		make_target_dir("/boot/dtb");
-		extract_file_to(dist, false, "/boot/dtb", "*.dt*", false);
 		extract_file_to(dist, false, "/boot", "./netbsd.ub", false);
 		fetch_fn = saved_fetch_fn;
 		return 0;
 	}
 	if (boardtype == BOARD_TYPE_RPI) {
 		extract_file_to(dist, false, "/boot", "./netbsd.img", false);
-		extract_file_to(dist, false, "/boot", "./bcm*.dtb", false);
 		fetch_fn = saved_fetch_fn;
 		snprintf(kernelbin, 100, "%s/netbsd.img", targetroot_mnt);
 		if (file_exists_p(kernelbin)) {



CVS commit: src/usr.sbin/sysinst/arch/evbarm

2020-05-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu May 28 19:03:09 UTC 2020

Modified Files:
src/usr.sbin/sysinst/arch/evbarm: Makefile

Log Message:
Set HAVE_INSTALL_IMAGE for evbarm


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/arch/evbarm/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/sysinst/arch/evbarm/Makefile
diff -u src/usr.sbin/sysinst/arch/evbarm/Makefile:1.2 src/usr.sbin/sysinst/arch/evbarm/Makefile:1.3
--- src/usr.sbin/sysinst/arch/evbarm/Makefile:1.2	Wed Jun 12 06:20:19 2019
+++ src/usr.sbin/sysinst/arch/evbarm/Makefile	Thu May 28 19:03:09 2020
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile,v 1.2 2019/06/12 06:20:19 martin Exp $
+#	$NetBSD: Makefile,v 1.3 2020/05/28 19:03:09 jmcneill Exp $
 #
 # Makefile for evbarm
 #
 
 MENUS_MD= menus.md.${SYSINSTLANG}
 MSG_MD= msg.md.${SYSINSTLANG} msg.mbr.${SYSINSTLANG}
-MD_OPTIONS=	AOUT2ELF
+MD_OPTIONS=	AOUT2ELF HAVE_INSTALL_IMAGE
 NO_MBR=no
 
 .include "../../Makefile.inc"



CVS commit: src/usr.sbin/sysinst/arch/evbarm

2020-05-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu May 28 19:00:52 UTC 2020

Modified Files:
src/usr.sbin/sysinst/arch/evbarm: msg.md.en

Log Message:
Remove "If you booted from a floppy" message


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/evbarm/msg.md.en

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/sysinst/arch/evbarm/msg.md.en
diff -u src/usr.sbin/sysinst/arch/evbarm/msg.md.en:1.1 src/usr.sbin/sysinst/arch/evbarm/msg.md.en:1.2
--- src/usr.sbin/sysinst/arch/evbarm/msg.md.en:1.1	Sat Jul 26 19:30:45 2014
+++ src/usr.sbin/sysinst/arch/evbarm/msg.md.en	Thu May 28 19:00:52 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.md.en,v 1.1 2014/07/26 19:30:45 dholland Exp $	*/
+/*	$NetBSD: msg.md.en,v 1.2 2020/05/28 19:00:52 jmcneill Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -41,7 +41,7 @@ message md_hello
 }
 
 message md_may_remove_boot_medium
-{If you booted from a floppy, you may now remove the disk.
+{
 }
 
 message badreadbb



CVS commit: src/usr.sbin/sysinst/arch/evbarm

2020-05-04 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon May  4 18:19:34 UTC 2020

Modified Files:
src/usr.sbin/sysinst/arch/evbarm: md.h

Log Message:
boardype should not be common.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/sysinst/arch/evbarm/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/usr.sbin/sysinst/arch/evbarm/md.h
diff -u src/usr.sbin/sysinst/arch/evbarm/md.h:1.5 src/usr.sbin/sysinst/arch/evbarm/md.h:1.6
--- src/usr.sbin/sysinst/arch/evbarm/md.h:1.5	Mon Jan 20 21:26:35 2020
+++ src/usr.sbin/sysinst/arch/evbarm/md.h	Mon May  4 18:19:34 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.h,v 1.5 2020/01/20 21:26:35 martin Exp $	*/
+/*	$NetBSD: md.h,v 1.6 2020/05/04 18:19:34 joerg Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -96,7 +96,7 @@
 #define BOARD_TYPE_NORMAL	0	/* assume u-boot */
 #define BOARD_TYPE_RPI		1	/* RPi firmware booted us */
 #define	BOARD_TYPE_ACPI		2	/* generic SBSA machine */
-int boardtype;
+extern int boardtype;
 
 /*
  * Size limit for the initial GPT part, in bytes. This allows us to



CVS commit: src/usr.sbin/sysinst/arch/evbarm

2020-01-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jan 29 19:04:41 UTC 2020

Modified Files:
src/usr.sbin/sysinst/arch/evbarm: md.c

Log Message:
Do not compare a char array to NULL, test for empty string instead.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/sysinst/arch/evbarm/md.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/sysinst/arch/evbarm/md.c
diff -u src/usr.sbin/sysinst/arch/evbarm/md.c:1.14 src/usr.sbin/sysinst/arch/evbarm/md.c:1.15
--- src/usr.sbin/sysinst/arch/evbarm/md.c:1.14	Mon Jan 27 21:21:22 2020
+++ src/usr.sbin/sysinst/arch/evbarm/md.c	Wed Jan 29 19:04:40 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.14 2020/01/27 21:21:22 martin Exp $ */
+/*	$NetBSD: md.c,v 1.15 2020/01/29 19:04:40 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -352,7 +352,7 @@ evbarm_part_defaults(struct pm_devs *my_
 
 	for (i = 0; i < num_usage_infos; i++) {
 		if (infos[i].fs_type == PART_BOOT_TYPE &&
-		infos[i].mount != NULL &&
+		infos[i].mount[0] != 0 &&
 		strcmp(infos[i].mount, PART_BOOT_MOUNT) == 0) {
 			infos[i].size = PART_BOOT_LARGE;
 			return;



CVS commit: src/usr.sbin/sysinst/arch/evbarm

2020-01-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jan  9 17:06:46 UTC 2020

Modified Files:
src/usr.sbin/sysinst/arch/evbarm: md.c md.h

Log Message:
Instead of a (bogus) attempt to query the model via ofctl, use the (now
fixed) sysctl hw.model instead.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/sysinst/arch/evbarm/md.c
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/evbarm/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/usr.sbin/sysinst/arch/evbarm/md.c
diff -u src/usr.sbin/sysinst/arch/evbarm/md.c:1.11 src/usr.sbin/sysinst/arch/evbarm/md.c:1.12
--- src/usr.sbin/sysinst/arch/evbarm/md.c:1.11	Thu Jan  9 13:22:31 2020
+++ src/usr.sbin/sysinst/arch/evbarm/md.c	Thu Jan  9 17:06:46 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.11 2020/01/09 13:22:31 martin Exp $ */
+/*	$NetBSD: md.c,v 1.12 2020/01/09 17:06:46 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -42,6 +42,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "defs.h"
 #include "md.h"
@@ -50,18 +51,31 @@
 
 int boardtype = BOARD_TYPE_NORMAL;
 
+#define	SBSA_MODEL_STR	"netbsd,generic-acpi"
+#define	RPI_MODEL_STR	"raspberrypi,"
+
 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;
+	static const int mib[2] = {CTL_HW, HW_MODEL};
+	size_t len;
+	char *cpu_model;
+
+	sysctl(mib, 2, NULL, , NULL, 0);
+	cpu_model = malloc(len);
+	sysctl(mib, 2, cpu_model, , NULL, 0);
+
+	if (strstr(cpu_model, RPI_MODEL_STR) != NULL)
+		/* this is some kind of Raspberry Pi */
+		boardtype = BOARD_TYPE_RPI;
+	else if (strstr(cpu_model, SBSA_MODEL_STR) != NULL)
+		/* some SBSA compatible machine */
+		boardtype = BOARD_TYPE_ACPI;
+	else
+		/* unknown, assume u-boot + dtb */
+		boardtype = BOARD_TYPE_NORMAL;
 
-	/* this is some kind of Raspberry Pi */
-	boardtype = BOARD_TYPE_RPI;
+	free(cpu_model);
 }
 
 void

Index: src/usr.sbin/sysinst/arch/evbarm/md.h
diff -u src/usr.sbin/sysinst/arch/evbarm/md.h:1.3 src/usr.sbin/sysinst/arch/evbarm/md.h:1.4
--- src/usr.sbin/sysinst/arch/evbarm/md.h:1.3	Wed Oct  2 11:16:02 2019
+++ src/usr.sbin/sysinst/arch/evbarm/md.h	Thu Jan  9 17:06:46 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.h,v 1.3 2019/10/02 11:16:02 maya Exp $	*/
+/*	$NetBSD: md.h,v 1.4 2020/01/09 17:06:46 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -76,8 +76,9 @@
 #define DISKLABEL_CMD "disklabel -w -r"
 
 /* Special board type routines need a switch */
-#define BOARD_TYPE_NORMAL	0
-#define BOARD_TYPE_RPI		1
+#define BOARD_TYPE_NORMAL	0	/* assume u-boot */
+#define BOARD_TYPE_RPI		1	/* RPi firmware booted us */
+#define	BOARD_TYPE_ACPI		2	/* generic SBSA machine */
 int boardtype;
 
 /*



CVS commit: src/usr.sbin/sysinst/arch/evbarm

2017-12-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Dec 14 14:12:39 UTC 2017

Modified Files:
src/usr.sbin/sysinst/arch/evbarm: md.c

Log Message:
Fix RPI kernel file after FDTisation.

>From Harold Gutch


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/arch/evbarm/md.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/sysinst/arch/evbarm/md.c
diff -u src/usr.sbin/sysinst/arch/evbarm/md.c:1.4 src/usr.sbin/sysinst/arch/evbarm/md.c:1.5
--- src/usr.sbin/sysinst/arch/evbarm/md.c:1.4	Sun May 10 10:14:02 2015
+++ src/usr.sbin/sysinst/arch/evbarm/md.c	Thu Dec 14 14:12:39 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.4 2015/05/10 10:14:02 martin Exp $ */
+/*	$NetBSD: md.c,v 1.5 2017/12/14 14:12:39 skrll Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -209,7 +209,7 @@ md_post_extract(void)
 	if (boardtype == BOARD_TYPE_NORMAL)
 		return 0;
 	if (boardtype == BOARD_TYPE_RPI) {
-		snprintf(kernelbin, 100, "%s/netbsd.bin", targetroot_mnt);
+		snprintf(kernelbin, 100, "%s/netbsd.img", targetroot_mnt);
 		if (file_exists_p(kernelbin)) {
 			run_program(RUN_DISPLAY,
 			"/bin/cp %s /targetroot/boot/kernel.img", kernelbin);



CVS commit: src/usr.sbin/sysinst/arch/evbarm

2015-03-12 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Mar 12 11:32:16 UTC 2015

Modified Files:
src/usr.sbin/sysinst/arch/evbarm: md.c

Log Message:
Boot partition as FAT32 doesn't really make sense, so don't force
the MBR to lie and allow FAT16 too.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/arch/evbarm/md.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/sysinst/arch/evbarm/md.c
diff -u src/usr.sbin/sysinst/arch/evbarm/md.c:1.2 src/usr.sbin/sysinst/arch/evbarm/md.c:1.3
--- src/usr.sbin/sysinst/arch/evbarm/md.c:1.2	Sun Aug  3 16:09:39 2014
+++ src/usr.sbin/sysinst/arch/evbarm/md.c	Thu Mar 12 11:32:16 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.2 2014/08/03 16:09:39 martin Exp $ */
+/*	$NetBSD: md.c,v 1.3 2015/03/12 11:32:16 joerg Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -266,7 +266,8 @@ md_check_mbr(mbr_info_t *mbri)
 		for (ext = mbri; ext; ext = ext-extended) {
 			part = ext-mbr.mbr_parts;
 			for (i=0, hasboot=0; i  MBR_PART_COUNT; part++, i++) {
-if (part-mbrp_type != MBR_PTYPE_FAT32L)
+if (part-mbrp_type != MBR_PTYPE_FAT16L 
+part-mbrp_type != MBR_PTYPE_FAT32L)
 	continue;
 hasboot = 1;
 break;
@@ -300,7 +301,8 @@ md_mbr_use_wholedisk(mbr_info_t *mbri)
 	/* raspi code */
 	if (boardtype == BOARD_TYPE_RPI) {
 		part = mbrs-mbr_parts[0];
-		if (part[0].mbrp_type != MBR_PTYPE_FAT32L) {
+		if (part[0].mbrp_type != MBR_PTYPE_FAT16L 
+		part[0].mbrp_type != MBR_PTYPE_FAT32L) {
 			/* It's hopelessly corrupt, punt for now */
 			msg_display(MSG_nomsdospart);
 			process_menu(MENU_ok, NULL);