g: signer: unify order of board ID fields

The board ID fields are displayed by the Cr50 console command 'bid' as
follows: <board id>:<board id mask>:<board id flags>.

Make sure the user passes them in the same order when invoking the signer
to sign a board locked image.

BRANCH=none
BUG=none
TEST=verified proper order of the fields when generating and using a
     prod signed image.

Change-Id: Ia4569c5e9e663b26edaa591bae881c719c4f199c
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/604218
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
This commit is contained in:
Vadim Bendebury
2017-08-07 11:34:57 -07:00
committed by chrome-bot
parent e656b970e2
commit 1573f257b7

View File

@@ -58,7 +58,7 @@ required to include three colon separated fields. The first field is a four
letter board RLZ code, the second field is board id mask in hex, no 0x prefix,
and the third field - board ID flags, again, hex, no 0x prefix.
CR50_BOARD_ID='XXYY:12:13' ${progname} [other options, if any]
CR50_BOARD_ID='XXYY:ffffff00:ff00' ${progname} [other options, if any]
both H1_DEVIDS and CR50_BOARD_ID can be defined independently.
@@ -100,8 +100,8 @@ tweak_manifest () {
# Prepare text of all three board ID related nodes
sub="$(printf "\\\n\"board_id\": %s,\\\n" "${rlz}")"
sub+="$(printf "\"board_id_flags\": %s,\\\n" "0x${bid_params[1]}")"
sub+="$(printf "\"board_id_mask\": %s,\\\n" "0x${bid_params[2]}")"
sub+="$(printf "\"board_id_mask\": %s,\\\n" "0x${bid_params[1]}")"
sub+="$(printf "\"board_id_flags\": %s,\\\n" "0x${bid_params[2]}")"
sed -i "s/\"fuses\": {/${sub}\"fuses\": {/" "${tmpf}"
}