summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2017-03-10 14:56:04 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2017-03-15 20:36:15 +0000
commit41bdc319bcf39042e08b1af75db611170b7da6e5 (patch)
treedc3980949228fe812bc8b5a8fc6ddec7118ca055
parent4e223bc2cba1527ca225f7c909bdb3d1b7876c21 (diff)
downloadchrome-ec-41bdc319bcf39042e08b1af75db611170b7da6e5.tar.gz
cr50: fix prod images timestamp
When sighing prod images it is important to be able to reproduce them bit for bit. Setting the manifest timestamp filed to a non-zero value makes sure that this value is used in the header as opposed to the current time. Setting the value to 1 guarantees that any dev image with the same epoch/major/minor field values will be preferred, as it would have a later timestamp. BRANCH=none BUG=none TEST=verified that two images built with this manifest are exactly the same (they used to differ before this change). verified that the header timestamp field is indeed set to 1: $ od -Ax -t x1 -vd d2/cr50.bin.prod | grep -A1 004350 $ 004350 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 $ 004360 00 00 00 00 11 00 00 00 01 00 00 00 00 00 00 00 location 0x435c is the epoch_ field offset, 32 bit epoch/major/minor is set to 0/0/17 and 64 bit timestamp is set to 1. Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Change-Id: I6ea0e664fa3eab7917ca472d715824feec49eb51 Reviewed-on: https://chromium-review.googlesource.com/452956 Commit-Ready: Vadim Bendebury <vbendeb@chromium.org> Tested-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-by: Marius Schilder <mschilder@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> (cherry picked from commit 3d9c6052578758558f4cef73e473b0fb8d1f7b29) Reviewed-on: https://chromium-review.googlesource.com/455249 Commit-Queue: Vadim Bendebury <vbendeb@chromium.org> Trybot-Ready: Vadim Bendebury <vbendeb@chromium.org>
-rw-r--r--util/signer/ec_RW-manifest-prod.json5
1 files changed, 4 insertions, 1 deletions
diff --git a/util/signer/ec_RW-manifest-prod.json b/util/signer/ec_RW-manifest-prod.json
index 57d52cd0b3..2234f30f3d 100644
--- a/util/signer/ec_RW-manifest-prod.json
+++ b/util/signer/ec_RW-manifest-prod.json
@@ -38,7 +38,10 @@
"p4cl": 177, // P4 sync cl for XML we link against. 177 == 0xb1.
- "timestamp": 0,
+ // Make sure a value is there so that current time is not used, and make
+ // sure the value is small so that any dev build with the same
+ // epoch/major/minor would be preferred
+ "timestamp": 1,
"epoch": 0, // FWR diversification contributor, 32 bits.
"major": 0, // FW2_HIK_CHAIN counter.
"minor": 17, // Mostly harmless version field.