Commit Graph

20 Commits

Author SHA1 Message Date
Patrick Georgi 77b182a31a board-status: be protocol agnostic on upload
Generate the board-status repo URL by replacing the
last occurrence of "/coreboot" by "/board-status",
which works across repo URL schemes (gerrit provides
several).

Change-Id: Iccb53bde994be619c1436815e13741d63738edf7
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/6574
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
2014-08-12 11:52:49 +02:00
Patrick Georgi 4ef309e85d board-status: avoid shell error
[ $3 -eq 1 ] fails if no third argument is given.
[ "$3" -eq 1 ] still fails.

Doing a string comparison is robust across shells.

Change-Id: I3ee388fdbe51b7ab9344d86e67827654714d3191
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/6576
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2014-08-11 08:21:45 +02:00
Idwer Vollering b37ee1ee7c util/board_status: use the right location of cbfstool
The cbfstool binary in util/ doesn't exist as often as build/cbfstool does.
Since cbfstool obtains details from coreboot.rom, use the binary in build/

Change-Id: Id7d5632f4e5cbd5ede58cd136c37b0dacee9ff93
Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Reviewed-on: http://review.coreboot.org/6299
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Martin Roth <gaumless@gmail.com>
2014-07-28 23:18:56 +02:00
Martin Roth bcd09930d8 board_status.sh minor fixes - no functional changes
- Update some comments
- Whitespace fixes
- change from backticks to $() format for getting command data.

Change-Id: Iaf424224abfd30a3581d0e43a1689cc7c887beec
Signed-off-by: Martin Roth <martin.roth@se-eng.com>
Reviewed-on: http://review.coreboot.org/6261
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-07-21 17:36:58 +02:00
Martin Roth 8e0071b798 board_status.sh: Read coreboot boot log from a serial device
- Read the boot log from a serial device.

Change-Id: I9daf97fd9b7fc55d0d56d815b185f9b4e3ef9f5a
Signed-off-by: Martin Roth <martin.roth@se-eng.com>
Reviewed-on: http://review.coreboot.org/6260
Reviewed-by: Mike Loptien <mike.loptien@se-eng.com>
Tested-by: build bot (Jenkins)
2014-07-21 17:35:45 +02:00
Martin Roth 13c7db8fe8 board_status.sh: name temp dir and print the name
- give a template to the temp dir so they're recognizable.
- show the location of the temp files again at the end of the script.

Change-Id: Ieb031ee249043697f6a75e42284c23d0b9bad1b3
Signed-off-by: Martin Roth <martin.roth@se-eng.com>
Reviewed-on: http://review.coreboot.org/6259
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: build bot (Jenkins)
2014-07-21 17:26:20 +02:00
Martin Roth 224617752b board_status.sh allow cmd() to not save output
- allow for cmd() to be run, but not pipe to a file.

Change-Id: I3e1650e421a49a06218e082ceb5a60b7b4808ce8
Signed-off-by: Martin Roth <martin.roth@se-eng.com>
Reviewed-on: http://review.coreboot.org/6258
Tested-by: build bot (Jenkins)
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-07-21 17:25:32 +02:00
Martin Roth be5340bad2 board_status.sh add non-fatal test_cmd
- add a non-fatal option to test_cmd.

Change-Id: If74693ea7ec8ea24104d5836e4c24bfb135ef0e1
Signed-off-by: Martin Roth <martin.roth@se-eng.com>
Reviewed-on: http://review.coreboot.org/6257
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-07-15 03:04:31 +02:00
Paul Menzel 4b10bb7c80 util/board_status/board_status.sh: Move `cbfs.txt` to results directory
Commit 40e936a1 [1]

    util/board_status/board_status.sh: Save ROM contents in `cbfs.txt`

creates `cbfs.txt` in `${tmpdir}` but does not move it to the results
directory `${tmpdir}/${results}`. So move it to the correct place.

[1] http://review.coreboot.org/5867

Change-Id: Ibca691ccf72b56b6271a611d92deaed7d377773b
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: http://review.coreboot.org/5883
Tested-by: build bot (Jenkins)
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-05-31 21:21:01 +02:00
Paul Menzel 40e936a199 util/board_status/board_status.sh: Save ROM contents in `cbfs.txt`
The ROM content (CBFS content) captured with

	cbfstool build/coreboot.rom print

is useful for two reasons.

1. With the used configuration for the build in `.config`, it can be
compared how the size for romstage and ramstage change over time. To
make that reproducible the used toolchain should also be stored
somewhere in the future.

2. With the CBFS content the time stamps can be better interpreted.
For example, the size of the payload file is needed to interpret the
time stamp for loading the payload.

Change-Id: If77ca6412b1710e560f405f9a48df613c1819d36
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: http://review.coreboot.org/5867
Tested-by: build bot (Jenkins)
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Marc Jones <marc.jones@se-eng.com>
2014-05-28 22:42:45 +02:00
Paul Menzel 47a14b15cb util/board_status/board_status.sh: set its executable flag
Change-Id: I58f6d356bf1625ee205a536ee95c08294891b123
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: http://review.coreboot.org/5171
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-04-29 17:57:41 +02:00
Paul Menzel 04eb2e89c6 util/board_status: Only pass switch `-a` once to `git commit`
Change-Id: Iabcb26229401b03ad4ba2df0f78eee08f379aa03
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: http://review.coreboot.org/5172
Tested-by: build bot (Jenkins)
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-04-16 13:34:01 +02:00
Vladimir Serbinenko 77005b4768 board_status.sh: Replace [[ with [.
[[ is a bashism.

Change-Id: Ief7c43fc1740db32ed97850a415b0c256b5bb35a
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/4764
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2014-01-21 03:17:13 +01:00
David Hendricks a4affe17f1 board_status.sh: trivial cosmetic changes toward the end
This moves an ugly comment closer to where it is applicable and also
adds a visual break between the commands which gather data and the
part of the script that finishes up. I'm usually not fan of banner
comments, but it seemed to help in my totally subjective opinion.

I was thinking about how to break the part that uploads results into
a separate function, but there are enough variables that are re-used
from earlier parts that the tradeoff probably isn't worth it.

Change-Id: If888329911c4de3b907cdf5973695c707bbb02fe
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: http://review.coreboot.org/4051
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2013-11-17 10:32:22 +01:00
David Hendricks 406ce8a06e board_status.sh: pass filename as an arg to command wrappers
This allows the command wrappers to delete files if the command
fails. In particular, it delets empty or otherwise useless files
that are generated if a non-fatal command fails.

Change-Id: If26d7b4d7500f160edd1cc2a8b6218792fefae8b
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: http://review.coreboot.org/4050
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2013-11-17 10:32:14 +01:00
David Hendricks f8b90e4622 board_status.sh: add support for non-fatal commands
This adds cmd_nonfatal() for commands which are considered
non-essential and can be expected to fail safely. This can be used,
for example, to gather data that is generated when using non-standard
utilities or coreboot config options.

Change-Id: Ie43944d2eb73f9aae1c30c3a204cfc413e11d286
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: http://review.coreboot.org/4049
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2013-11-17 10:32:07 +01:00
David Hendricks 1fc65f76f4 board_status.sh: move show_help()
This is really only a cosmetic change, but is intended to make it
slightly easier to remember to update the help menu whenever
options change.

Change-Id: I58b5012309229d08da138a01c7cd1c5096423179
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: http://review.coreboot.org/4048
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2013-11-17 10:31:37 +01:00
David Hendricks 16955fd665 board_status.sh: Make clobber option use 'C' instead of 'c'
Clobbering output is only really useful when debugging the script.
Since we're only using short options, let's save 'c' for something
more important.

Change-Id: If87a70fdc0cd006818d1736c40f9984dfec663a9
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: http://review.coreboot.org/4047
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2013-11-17 10:31:30 +01:00
David Hendricks 1b6e7a6748 Updates to the board status script
This is the first major re-work for the board status script.
Summary:
- Added a command to the getrevision.sh script to retrieve tagged
  revision.

- Results are placed in a dynamically generated temporary location.
  This makes it easy to do multiple trial runs and avoids polluting
  the coreboot directory.

- Results are stored in a directory with the following form:
  <vendor>/<mainboard>/<tagged_revision>/<timestamp>/
  Vendor and mainboard are obtained from CONFIG_MAINBOARD_DIR so that
  hierarchy is consistent between coreboot and board-status.

- The results directory is used as the commit message.

- board-status repository is checked out automatically if results are
  to be uploaded.

TODO:
- Add ability to run commands which may fail. Currently we assume
  any failure should terminate the script, but some commands can be
  made optional.

Successfully uploaded first result to board-status repository. See
http://review.coreboot.org/gitweb?p=board-status.git;a=summary .

Change-Id: Icba41ccad4e6e6ee829b8092a2459c2d72a3365b
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: http://review.coreboot.org/4039
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2013-11-17 10:31:17 +01:00
David Hendricks c5e947ef17 rename status-related stuff to board_status
This just moves stuff to be more clear about the purpose of
the script. Other suggestions are welcome.

Change-Id: Ic6095fd4eb347daa5a03eff21b5952d2d42a6bfd
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: http://review.coreboot.org/4038
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2013-11-12 20:14:23 +01:00
Renamed from util/status/status.sh (Browse further)