chroemos-cr50-scripts: support dual Cr50 image configurations

We want to be able to tell what Cr50 image (prod vs pre-pvt) to run on
a Chrome OS device based pn the Board ID flags programmed in the H1.

Both init scripts and postinstall/factory install scripts need to be
able to determine the type of Cr50 image to use at run time.

The new script implements the logic, it retrieves the Board ID flags
from the H1 and checks if the 0x10 bit is set, which is the indication
that the pre-pvt Cr50 image should be used.

Also removed use of BOARD ind cr50-update.conf, as it is not necessary
any more.

BUG=b:65628825
TEST=on a Coral verified that Cr50 is updated successfully from 0.0.22
  to 0.1.0 or 0.0.24 based on the Board ID flag value, both in
  postinstall and init cases.

Change-Id: I9bf47f81642fdf2fa717d0ebd734bd6706ccac6b
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/846474
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/875128
Commit-Queue: Mary Ruthven <mruthven@chromium.org>
Tested-by: Mary Ruthven <mruthven@chromium.org>
5 files changed