Use base board name to find default flash map
When using board variants (as denoted by _<variant> prefix in the
board name) use the base board name to figure out the default flash
map.
BUG=chrome-os-partner:18329
TEST=manual
. peach_pit bootimage builds and executes fine
Change-Id: Icccb9a54d023f00bd7db5b368925ddb435afcb72
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/46656
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/host/lib/bundle_firmware.py b/host/lib/bundle_firmware.py
index 6265d73..ebceee3 100644
--- a/host/lib/bundle_firmware.py
+++ b/host/lib/bundle_firmware.py
@@ -1052,9 +1052,10 @@
"""
self._out.Notice("Model: %s" % fdt.GetString('/', 'model'))
- # Get the flashmap so we know what to build
pack = PackFirmware(self._tools, self._out)
- default_flashmap = default_flashmaps.get(self._board)
+ # Get the flashmap so we know what to build. For board variants use the
+ # main board name as the key (drop the _<variant> suffix).
+ default_flashmap = default_flashmaps.get(self._board.split('_')[0])
if self._force_rw:
fdt.PutInteger('/flash/rw-a-vblock', 'preamble-flags', 0)
fdt.PutInteger('/flash/rw-b-vblock', 'preamble-flags', 0)