| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have been using the time of compilation to determine the
version string. This CL will keep doing that if the git repo has
uncommitted changes, but if the repo is clean we'll just use the
author date of the last commit. This ensures that the same source
will produce bitwise-identical builds (assuming no toolchain
changes, of course).
BUG=chrome-os-partner:45616
BRANCH=none
TEST=manual
cd src/platform/ec
make buildall
mv build build.one
make buildall
md5sum build{,.one}/*/ec.bin | sort
Observe that successive builds produce identical binaries.
Change-Id: Ie2ef44b216586097589c9c15f12e05c87a53f991
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/302140
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the EC is built using "emerge-<board> chromeos-ec" on a developer
workstation with the chromeos-ec package "cros-worked'on", put
"1.1.9999-<git-sha1>" rather than "no_version" in the version string.
Emerge is exporting the current git SHA-1 hash in the VCSID id but the
.git repository is not available during the build.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=none
BUG=none
TEST=try the following build setups:
- local emerge
$ emerge-smaug chromeos-ec
$ strings /build/smaug/firmware/ec.bin | grep ryu
ryu_p4p5_1.1.9999-ebe18ef
- local build
$ make BOARD=ryu_p4p5
$ strings build/ryu_p4p5/ec.bin | grep ryu
ryu_p4p5_v1.1.3127-ebe18ef-dirt
- trybot build
$ cbuildbot --remote -g 270554 smaug-firmware
$ tar xvjf firmware_from_sources.tar.bz2
$ strings ec.bin | grep ryu
ryu_p4p5_v1.1.3137-9b52578
Change-Id: I386f80d82d95b5e99a1660a1eb242c47c54d17ef
Reviewed-on: https://chromium-review.googlesource.com/270554
Trybot-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Up until now, every image includes the time of compilation in the
build information. This makes it impossible to verify that a
particular image came from a particular source code snapshot.
With this change, specifying USE_GIT_DATE=1 to the make command
will use the author date of HEAD as the timestamp. That means
that successive builds from the same source will produce
bitwise-identical output (assuming the same toolchain, of
course).
BUG=none
BRANCH=none
TEST=manual
Do this twice:
\rm -rf build
make BOARD=cr50 USE_GIT_DATE=1
md5sum build/cr50/ec.bin
The md5sum should be the same for both runs.
Change-Id: If64307101a453cb13c62fa003f1bf432f4998273
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/252751
Reviewed-by: Randall Spangler <rspangler@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the version string was special cased in the USB stack
because the build system prevented the inclusion of ec_version.h in
any file other than common/version.c. This lead to common/version.c
being the only place that the USB version string could be computed
and thus the special case of filling in the version string descriptor
at run time. This made the USB stack more complex, and lead to the
common/version.c file including usb.h, which is actually STM32
specific.
Now, the portion of ec_version.h that is deterministic is only
updated when something in the tree actually changes (by way of a
conditional in the makefile), and ec_version.h no longer has to
depend on all object files (other than the special version.o).
This allows anyone to include ec_version.h as needed. In particular,
each board that wants to define a USB version string can directly
include ec_version.h and do so.
Signed-off-by: Anton Staaf <robotboy@chromium.org>
BRANCH=None
BUG=None
TEST=make buildall -j
touch files and verify rebuilds happen correctly
Change-Id: Ic84d0b9da90f82ebb4630fb550ec841071e25a49
Reviewed-on: https://chromium-review.googlesource.com/227211
Tested-by: Anton Staaf <robotboy@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Anton Staaf <robotboy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The version struct and EC_CMD_GET_VERSION assume 32-character version
strings. But if the git tree is dirty and the board name is long, the
version string overflows that limit.
This change truncates what's stored in the version string to fit.
The build info still contains the full version string, as it did before.
BUG=chrome-os-partner:21156
BRANCH=none
TEST=build BOARD=mccroskey with a dirty tree; it should build.
Then cat build/mccroskey/ec_version.h to see CROS_EC_VERSION32 has
truncated the version string. Then build a platform of your choice
and type 'version' to see that the version string and build info is
still reported correctly.
Change-Id: Ie71b8efd99a83315f8b4d5ad10c51e48781b12f4
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/62649
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For EC update test, we produce binary-wise shifted image. To make it
easier to tell if update has succeeded, let's append "shift" to the
verison in this image.
BUG=chrome-os-partner:10264
TEST=Build shifted image and check the version string.
Change-Id: I16187611cf61fc97a74bc3707a77ad9ad5274f37
Reviewed-on: https://gerrit.chromium.org/gerrit/27577
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Ready: Vic Yang <victoryang@chromium.org>
Tested-by: Vic Yang <victoryang@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the quoting for git local change detection.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=None
TEST=run ./util/getversion.sh on a repository with and without local
changes and observe we no longer have a spurious output on stderr.
Change-Id: I40ea4505d175c9135027ba7cf2b787c08eff6f70
|
|
Add build information (date/time/builder) which can be displayed at the
EC console.
Generate a version from the board name and the branch tag.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chromium-os:27013
TEST=on BDS, run version command on the console.
inspect the built binary.
Change-Id: Idb1f68898ba6b811d02919f17ab4536ed9f8934a
|