Source-Changes-HG archive

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

[src/trunk]: src/distrib/utils/embedded - explanations for single letter flags



details:   https://anonhg.NetBSD.org/src/rev/8d96a79dab70
branches:  trunk
changeset: 786914:8d96a79dab70
user:      christos <christos%NetBSD.org@localhost>
date:      Mon May 20 19:27:17 2013 +0000

description:
- explanations for single letter flags
- flag to add debug sets
- flag to minimize writes to sd's

diffstat:

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

diffs (65 lines):

diff -r af5915db0d90 -r 8d96a79dab70 distrib/utils/embedded/mkimage
--- a/distrib/utils/embedded/mkimage    Mon May 20 18:36:14 2013 +0000
+++ b/distrib/utils/embedded/mkimage    Mon May 20 19:27:17 2013 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: mkimage,v 1.38 2013/04/03 19:37:43 htodd Exp $
+# $NetBSD: mkimage,v 1.39 2013/05/20 19:27:17 christos Exp $
 #
 # Copyright (c) 2013 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -68,13 +68,18 @@
 
 usage() {
        cat << EOF 1>&2
-Usage: $PROG -h <host-arch> [-b] [-K <kerneldir>] [-S <srcdir>] [-D <destdir>] [-c <custom-files-dir>] [-s <Mb size>] [<image>]
+Usage: $PROG -h <host-arch> [-bmx] [-K <kerneldir>] [-S <srcdir>] [-D <destdir>] [-c <custom-files-dir>] [-s <Mb size>] [<image>]
+
+-b     Boot only, no sets loaded
+-d     Add the debug sets
+-m     Mimimize disk writes for sd cards
+-x     Load the x sets too, not just the base ones
 EOF
        exit 1
 }
 
 # First pass for options to get the host and src directories
-OPTS="K:D:S:bc:h:s:x"
+OPTS="K:D:S:bc:dh:ms:x"
 while getopts "$OPTS" f
 do
        case $f in
@@ -98,6 +103,9 @@
 . "${DIR}/conf/${h}.conf"
 
 selected_sets="$sets"
+dsets=false
+xsets=false
+minwrites=false
 
 OPTIND=1
 while getopts "$OPTS" f
@@ -107,10 +115,22 @@
        K)      kernel="$OPTARG";;
        S)      ;;
        b)      bootonly="true";;
+       d)      dsets=true
+               selected_sets="$selected_sets debug"
+               if $xsets; then
+                       selected_sets="$selected_sets xdebug"
+               fi
+               ;;
        c)      custom="$OPTARG";;
        h)      ;;
+       m)      minwrites=true;;
        s)      size="$OPTARG";;
-       x)      selected_sets="$sets $xsets";;
+       x)      xsets=true
+               selected_sets="$selected_sets $xsets"
+               if $dsets; then
+                   selected_sets="$selected_sets xdebug"
+               fi
+               ;;
        *)      usage;;
        esac
 done



Home | Main Index | Thread Index | Old Index