cros_bundle_firmware: Add default flashmap for exynos

Provide a set of default flashmaps for boards that we understand. Rather
than hard-code the tegra support in PackFirmware, pass it in from
bundle_firmware, which knows about the board type. This allows us to
support exynos as well as tegra.

The exynos flashmap has three sections: BL1, SPL, U-Boot.

BUG=chromium-os:36112
TEST=manual
Build and boot upstream U-Boot on snow (it doesn't actually work yet, but
the downloads happen, and when upstream U-Boot is far enough advanced,
it will work).

Change-Id: Idd918de75d38f3ffd93c8d7f0008c6c296980c9e
Reviewed-on: https://gerrit.chromium.org/gerrit/37460
Commit-Ready: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
diff --git a/host/lib/bundle_firmware.py b/host/lib/bundle_firmware.py
index edbec06..310535c 100644
--- a/host/lib/bundle_firmware.py
+++ b/host/lib/bundle_firmware.py
@@ -56,6 +56,48 @@
   - [ dev_en, rec_en, yuck_en, ins_en ]
 '''
 
+# Default flash maps for various boards we support.
+# These are used when no fdt is provided (e.g. upstream U-Boot with no
+# fdt. Each is a list of nodes.
+default_flashmaps = {
+  'tegra' : [{
+      'node' : 'ro-boot',
+      'label' : 'boot-stub',
+      'size' : 512 << 10,
+      'read-only' : True,
+      'type' : 'blob signed',
+      'required' : True
+    }
+  ],
+  'daisy' : [
+    {
+        'node' : 'pre-boot',
+        'label' : "bl1 pre-boot",
+        'size' : 0x2000,
+        'read-only' : True,
+        'filename' : "e5250.nbl1.bin",
+        'type' : "blob exynos-bl1",
+        'required' : True,
+    }, {
+        'node' : 'spl',
+        'label' : "bl2 spl",
+        'size' : 0x4000,
+        'read-only' : True,
+        'filename' : "bl2.bin",
+        'type' : "blob exynos-bl2 boot,dtb",
+        'required' : True,
+    }, {
+        'node' : 'ro-boot',
+        'label' : "u-boot",
+        'size' : 0x9a000,
+        'read-only' : True,
+        'type' : "blob boot,dtb",
+        'required' : True,
+    }
+  ]
+}
+
+
 # Build GBB flags.
 # (src/platform/vboot_reference/firmware/include/gbb_header.h)
 gbb_flag_properties = {
@@ -921,7 +963,8 @@
 
     # Get the flashmap so we know what to build
     pack = PackFirmware(self._tools, self._out)
-    pack.SelectFdt(fdt)
+    default_flashmap = default_flashmaps.get(self._board)
+    pack.SelectFdt(fdt, self._board, default_flashmap)
 
     # Get all our blobs ready
     pack.AddProperty('boot', self.uboot_fname)