Source-Changes-HG archive

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

[src/trunk]: src/distrib/utils/embedded Now that FAT+FFS images include the B...



details:   https://anonhg.NetBSD.org/src/rev/cdc29d10a0ec
branches:  trunk
changeset: 352832:cdc29d10a0ec
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Tue Apr 11 21:06:30 2017 +0000

description:
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.

diffstat:

 distrib/utils/embedded/mkimage |  13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 03612f2392eb -r cdc29d10a0ec distrib/utils/embedded/mkimage
--- a/distrib/utils/embedded/mkimage    Tue Apr 11 18:20:03 2017 +0000
+++ b/distrib/utils/embedded/mkimage    Tue Apr 11 21:06:30 2017 +0000
@@ -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 @@
        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 @@
                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}



Home | Main Index | Thread Index | Old Index