Module Name:    src
Committed By:   jmcneill
Date:           Tue Apr 11 21:06:30 UTC 2017

Modified Files:
        src/distrib/utils/embedded: mkimage

Log Message:
Now that FAT+FFS images include the BSD partition in the MBR partition
table, install the disklabel after setting up MBR partitions. This moves
the disklabel to the BSD partition from the start of the disk, avoiding
a conflict with the ODROID-C1 bootloader.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/distrib/utils/embedded/mkimage

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/embedded/mkimage
diff -u src/distrib/utils/embedded/mkimage:1.63 src/distrib/utils/embedded/mkimage:1.64
--- src/distrib/utils/embedded/mkimage:1.63	Tue Apr 11 18:04:08 2017
+++ src/distrib/utils/embedded/mkimage	Tue Apr 11 21:06:30 2017
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: mkimage,v 1.63 2017/04/11 18:04:08 jmcneill Exp $
+# $NetBSD: mkimage,v 1.64 2017/04/11 21:06:30 jmcneill Exp $
 #
 # Copyright (c) 2013, 2014 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -235,9 +235,6 @@ do    
 	compare="$((${newsize} * 2 * 1024))"
 done                      
 
-echo ${bar} Adding label ${bar}
-make_label > ${tmp}/label
-${DISKLABEL} -R -F ${image} ${tmp}/label
 if [ -n "${msdosid}" ]; then
 	echo ${bar} Running fdisk ${bar}
 	initsecs=$((${init} * 1024))
@@ -251,7 +248,15 @@ if [ -n "${msdosid}" ]; then
 		ffssize="$(expr ${imagesecs} - ${ffsstart})"
 		${FDISK} -f -u -1 -s 169/${ffsstart}/${ffssize} -F ${image}
 	fi
+
+	echo ${bar} Adding label ${bar}
+	make_label > ${tmp}/label
+	${DISKLABEL} -R -F ${image} ${tmp}/label
 elif [ -n "${netbsdid}" ]; then
+	echo ${bar} Adding label ${bar}
+	make_label > ${tmp}/label
+	${DISKLABEL} -R -F ${image} ${tmp}/label
+
 	echo ${bar} Running fdisk ${bar}
 	${FDISK} -f -i ${image}
 	${FDISK} -f -a -u -0 -s 169/${init} ${image}

Reply via email to