From f50bd6d82da0e83b9c4339a5537327d7bf41fff1 Mon Sep 17 00:00:00 2001 From: Tristan Corrick Date: Mon, 31 Dec 2018 20:58:43 +1300 Subject: util/chromeos/crosfirmware.sh: Print more messages The existing code has several messages that are only printed when the DEBUG variable is set. These messages are not verbose, and are quite useful to see how the script is progressing. So, print them unconditionally. Change-Id: I8f78e4563f0b4a42f831194a6e526284c2fbcd92 Signed-off-by: Tristan Corrick Reviewed-on: https://review.coreboot.org/c/30550 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- util/chromeos/crosfirmware.sh | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/util/chromeos/crosfirmware.sh b/util/chromeos/crosfirmware.sh index 16ab24774c..9d2ca84aa9 100755 --- a/util/chromeos/crosfirmware.sh +++ b/util/chromeos/crosfirmware.sh @@ -14,16 +14,9 @@ # GNU General Public License for more details. # -#DEBUG=1 - # On some systems, `parted` and `debugfs` are located in /sbin. export PATH="$PATH:/sbin" -debug() -{ - test "$DEBUG" == "1" && echo "$*" -} - exit_if_uninstalled() { local cmd_name="$1" local deb_pkg_name="$2" @@ -51,7 +44,7 @@ get_inventory() _conf=$1 _url=https://dl.google.com/dl/edgedl/chromeos/recovery/recovery.conf - debug "Downloading recovery image inventory..." + echo "Downloading recovery image inventory..." curl -s "$_url" > $_conf } @@ -61,9 +54,9 @@ download_image() _url=$1 _file=$2 - debug "Downloading recovery image" + echo "Downloading recovery image" curl "$_url" > "$_file.zip" - debug "Decompressing recovery image" + echo "Decompressing recovery image" unzip -q "$_file.zip" rm "$_file.zip" } @@ -75,7 +68,7 @@ extract_partition() ROOTFS=$3 _bs=1024 - debug "Extracting ROOT-A partition" + echo "Extracting ROOT-A partition" ROOTP=$( printf "unit\nB\nprint\nquit\n" | \ parted $FILE 2>/dev/null | grep $NAME ) @@ -91,7 +84,7 @@ extract_shellball() ROOTFS=$1 SHELLBALL=$2 - debug "Extracting chromeos-firmwareupdate" + echo "Extracting chromeos-firmwareupdate" printf "cd /usr/sbin\ndump chromeos-firmwareupdate $SHELLBALL\nquit" | \ debugfs $ROOTFS > /dev/null 2>&1 } @@ -101,7 +94,7 @@ extract_coreboot() _shellball=$1 _unpacked=$( mktemp -d ) - debug "Extracting coreboot image" + echo "Extracting coreboot image" sh $_shellball --sb_extract $_unpacked > /dev/null _version=$( cat $_unpacked/VERSION | grep BIOS\ version: | \ -- cgit v1.2.3