summaryrefslogtreecommitdiff
path: root/util/chromeos
diff options
context:
space:
mode:
authorTristan Corrick <tristan@corrick.kiwi>2018-12-31 20:58:43 +1300
committerPatrick Georgi <pgeorgi@google.com>2019-01-03 16:53:57 +0000
commitf50bd6d82da0e83b9c4339a5537327d7bf41fff1 (patch)
tree8dd7731a82ec7fec6e83d8e5d7ef20dc4fc68c3c /util/chromeos
parentd80607da4d540a27b9f30e665de696a903a9375e (diff)
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 <tristan@corrick.kiwi> Reviewed-on: https://review.coreboot.org/c/30550 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'util/chromeos')
-rwxr-xr-xutil/chromeos/crosfirmware.sh19
1 files 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: | \