Vladimir Serbinenko (phcoder@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6749
-gerrit
commit 22eb4b0ce0e5212f011143dce44c233984a8f785 Author: Vladimir Serbinenko phcoder@gmail.com Date: Sat Aug 23 01:11:56 2014 +0200
board_status: Use info exported by coreboot itself.
It is more robust.
board_status still uses rom from build/coreboot.rom.
Change-Id: Ia2e2a3cdfa6ee2c404a9bd9c1a119755852c802f Signed-off-by: Vladimir Serbinenko phcoder@gmail.com --- util/board_status/board_status.sh | 46 +++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 24 deletions(-)
diff --git a/util/board_status/board_status.sh b/util/board_status/board_status.sh index 0659d24..bff6627 100755 --- a/util/board_status/board_status.sh +++ b/util/board_status/board_status.sh @@ -213,43 +213,41 @@ fi # If the user does not wish to upload, results will remain in /tmp. tmpdir=$(mktemp -d --tmpdir coreboot_board_status.XXXXXXXX)
+if [ -n "$SERIAL_DEVICE" ]; then + get_serial_bootlog "$SERIAL_DEVICE" "$SERIAL_PORT_SPEED" "${tmpdir}/serial_console.txt" +fi + # Obtain board and revision info to form the directory structure: # <vendor>/<board>/<revision>/<timestamp> -cbfstool_cmd="build/cbfstool" -if test ! -x build/cbfstool; then - make -C util/cbfstool/ && cp util/cbfstool/cbfstool build/cbfstool -fi -test_cmd $LOCAL "$cbfstool_cmd" -$cbfstool_cmd build/coreboot.rom extract -n config -f ${tmpdir}/config.txt -$cbfstool_cmd build/coreboot.rom print > ${tmpdir}/cbfs.txt -mainboard_dir="$(grep CONFIG_MAINBOARD_DIR ${tmpdir}/config.txt | awk -F '"' '{ print $2 }')" -vendor=$(echo "$mainboard_dir" | awk -F '/' '{ print $1 }') +test_cmd $REMOTE "lbtdump" +cmd $REMOTE "lbtdump -m" "${tmpdir}/mainboard_id.txt" +mainboard_dir="$(cat "${tmpdir}/mainboard_id.txt")" +vendor="$(echo "$mainboard_dir" | awk -F '/' '{ print $1 }')" mainboard=$(echo "$mainboard_dir" | awk -F '/' '{ print $2 }') - -getrevision="util/board_status/getrevision.sh" -test_cmd $LOCAL $getrevision -tagged_version=$($getrevision -T) -timestamp=$($getrevision -t) - +cmd $REMOTE "lbtdump -w" "${tmpdir}/tagged_version.txt" +tagged_version="$(cat "${tmpdir}/tagged_version.txt")" +cmd $REMOTE "lbtdump -t" "${tmpdir}/timestamp.txt" +timestamp="$(cat "${tmpdir}/timestamp.txt")" results="${vendor}/${mainboard}/${tagged_version}/${timestamp}"
echo "Temporarily placing output in ${tmpdir}/${results}" mkdir -p "${tmpdir}/${results}"
-mv "${tmpdir}/config.txt" "${tmpdir}/${results}" -mv "${tmpdir}/cbfs.txt" "${tmpdir}/${results}" +cbfstool_cmd="build/cbfstool" +if test ! -x build/cbfstool; then + make -C util/cbfstool/ && cp util/cbfstool/cbfstool build/cbfstool +fi +test_cmd $LOCAL "$cbfstool_cmd" +$cbfstool_cmd build/coreboot.rom extract -n config -f "${tmpdir}/${results}"/config.txt +$cbfstool_cmd build/coreboot.rom print > "${tmpdir}/${results}"/cbfs.txt +$cbfstool_cmd build/coreboot.rom extract -n revision -f "${tmpdir}/${results}"/revision.txt
-touch ${tmpdir}/${results}/revision.txt -printf "Local revision: %s\n" "$($getrevision -l)" >> ${tmpdir}/${results}/revision.txt -printf "Tagged revision: %s\n" "${tagged_version}" >> ${tmpdir}/${results}/revision.txt -printf "Upstream revision: %s\n" $($getrevision -u) >> ${tmpdir}/${results}/revision.txt -printf "Upstream URL: %s\n" $($getrevision -U)>> ${tmpdir}/${results}/revision.txt -printf "Timestamp: %s\n" "$timestamp" >> ${tmpdir}/${results}/revision.txt
if [ -n "$SERIAL_DEVICE" ]; then - get_serial_bootlog "$SERIAL_DEVICE" "$SERIAL_PORT_SPEED" "${tmpdir}/${results}/serial_console.txt" + mv "${tmpdir}/serial_console.txt" "${tmpdir}/${results}" fi
+ test_cmd $REMOTE "cbmem" cmd $REMOTE "cbmem -c" "${tmpdir}/${results}/coreboot_console.txt" cmd_nonfatal $REMOTE "cbmem -t" "${tmpdir}/${results}/coreboot_timestamps.txt"