[coreboot-gerrit] Patch set updated for coreboot: board_status.sh: Allow user to override coreboot image path

Martin Roth (martinroth@google.com) gerrit at coreboot.org
Thu Feb 18 04:47:00 CET 2016


Martin Roth (martinroth at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12489

-gerrit

commit c1f956372c289bedcb6742fb2a47b4213311bbb2
Author: David Hendricks <dhendrix at chromium.org>
Date:   Thu Nov 19 13:04:27 2015 -0800

    board_status.sh: Allow user to override coreboot image path
    
    Some users may wish to run this script using a coreboot image
    that does get built in the usual build/ directory, for example
    if abuild is used to generate the image.
    
    Change-Id: I7e98780f8b7b57ebbf3babd6a289f0e4fd4103d8
    Signed-off-by: David Hendricks <dhendrix at chromium.org>
---
 util/board_status/board_status.sh | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)

diff --git a/util/board_status/board_status.sh b/util/board_status/board_status.sh
index 95bc536..058a3d9 100755
--- a/util/board_status/board_status.sh
+++ b/util/board_status/board_status.sh
@@ -10,6 +10,7 @@ EXIT_SUCCESS=0
 EXIT_FAILURE=1
 
 # Stuff from command-line switches
+COREBOOT_IMAGE="build/coreboot.rom"
 REMOTE_HOST=""
 CLOBBER_OUTPUT=0
 UPLOAD_RESULTS=0
@@ -174,6 +175,8 @@ Options
         Show this message.
     -C
         Clobber temporary output when finished. Useful for debugging.
+    -i  <image>
+        Path to coreboot image (Default is $COREBOOT_IMAGE).
     -r  <host>
         Obtain machine information from remote host (using ssh).
     -s  </dev/xxx>
@@ -185,7 +188,7 @@ Options
 "
 }
 
-while getopts "Chr:s:S:u" opt; do
+while getopts "Chi:r:s:S:u" opt; do
 	case "$opt" in
 		h)
 			show_help
@@ -194,6 +197,9 @@ while getopts "Chr:s:S:u" opt; do
 		C)
 			CLOBBER_OUTPUT=1
 			;;
+		i)
+			COREBOOT_IMAGE="$OPTARG"
+			;;
 		r)
 			REMOTE_HOST="$OPTARG"
 			;;
@@ -239,24 +245,24 @@ fi
 test_cmd $LOCAL "$cbfstool_cmd"
 
 tmpcfg=$(mktemp coreboot_config.XXXXXX)
-echo "Extracting config.txt from build/coreboot.rom"
-$cbfstool_cmd build/coreboot.rom extract -n config -f "${tmpdir}/config.txt" >/dev/null 2>&1
+echo "Extracting config.txt from $COREBOOT_IMAGE"
+$cbfstool_cmd "$COREBOOT_IMAGE" extract -n config -f "${tmpdir}/config.txt" >/dev/null 2>&1
 mv "${tmpdir}/config.txt" "${tmpdir}/config.short.txt"
 cp "${tmpdir}/config.short.txt" "${tmpcfg}"
 yes "" | make "DOTCONFIG=${tmpcfg}" oldconfig 2>/dev/null >/dev/null
 mv "${tmpcfg}" "${tmpdir}/config.txt"
 rm -f "${tmpcfg}.old"
-$cbfstool_cmd build/coreboot.rom print > "${tmpdir}/cbfs.txt"
-rom_contents=$($cbfstool_cmd build/coreboot.rom print 2>&1)
+$cbfstool_cmd "$COREBOOT_IMAGE" print > "${tmpdir}/cbfs.txt"
+rom_contents=$($cbfstool_cmd "$COREBOOT_IMAGE" print 2>&1)
 if [ -n "$(echo $rom_contents | grep payload_config)" ]; then
-	echo "Extracting payload_config from build/coreboot.rom"
-	$cbfstool_cmd build/coreboot.rom extract -n payload_config -f "${tmpdir}/payload_config.txt" >/dev/null 2>&1
+	echo "Extracting payload_config from $COREBOOT_IMAGE"
+	$cbfstool_cmd "$COREBOOT_IMAGE" extract -n payload_config -f "${tmpdir}/payload_config.txt" >/dev/null 2>&1
 fi
 if [ -n "$(echo $rom_contents | grep payload_version)" ]; then
-	echo "Extracting payload_version from build/coreboot.rom"
-	$cbfstool_cmd build/coreboot.rom extract -n payload_version -f "${tmpdir}/payload_version.txt" >/dev/null 2>&1
+	echo "Extracting payload_version from $COREBOOT_IMAGE"
+	$cbfstool_cmd "$COREBOOT_IMAGE" extract -n payload_version -f "${tmpdir}/payload_version.txt" >/dev/null 2>&1
 fi
-md5sum -b build/coreboot.rom > "${tmpdir}/rom_checksum.txt"
+md5sum -b "$COREBOOT_IMAGE" > "${tmpdir}/rom_checksum.txt"
 
 if test $do_clean_cbfstool -eq 1; then
 	make -C util/cbfstool clean



More information about the coreboot-gerrit mailing list