summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2015-12-17 12:33:39 -0700
committerMartin Roth <martinroth@google.com>2015-12-20 01:15:36 +0100
commit2e44ea2d947e7ab61cd95c9b96850266c8db7154 (patch)
tree7dae79fc673016a1613cf0f67065082f1a006890
parentd0128df777b761bbf72233d3e3f248cea2f3c484 (diff)
downloadcoreboot-staging-2e44ea2d947e7ab61cd95c9b96850266c8db7154.zip
coreboot-staging-2e44ea2d947e7ab61cd95c9b96850266c8db7154.tar.gz
board_status.sh: Extract payload config & version files
If the payload_config and payload_version files are in coreboot.rom, extract and save them. Change-Id: I36b17ed189f94e2d4e873b0e219e5a9a2abe77a1 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/12758 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
-rwxr-xr-xutil/board_status/board_status.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/util/board_status/board_status.sh b/util/board_status/board_status.sh
index d8bd3a8..fce45fb 100755
--- a/util/board_status/board_status.sh
+++ b/util/board_status/board_status.sh
@@ -232,6 +232,15 @@ 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)
+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
+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
+fi
# Obtain board and revision info to form the directory structure:
# <vendor>/<board>/<revision>/<timestamp>
@@ -250,6 +259,8 @@ echo "Temporarily placing output in ${tmpdir}/${results}"
mkdir -p "${tmpdir}/${results}"
mv "${tmpdir}/config.txt" "${tmpdir}/${results}"
+test -f "${tmpdir}/payload_config.txt" && mv "${tmpdir}/payload_config.txt" "${tmpdir}/${results}"
+test -f "${tmpdir}/payload_version.txt" && mv "${tmpdir}/payload_version.txt" "${tmpdir}/${results}"
mv "${tmpdir}/config.short.txt" "${tmpdir}/${results}"
mv "${tmpdir}/cbfs.txt" "${tmpdir}/${results}"
OpenPOWER on IntegriCloud