cros_bundle_firmware: Allow options entries in the flash map

With Tegra we have a hard-coded bypass where the -s option would write only
the first entry to the image. This allows us to write just U-Boot to the
flash, which is much faster than writing all the contents of the flash,
including GBB, A/B regions, etc.

This approach doesn't work with Exynos, since we must have at least three
regions present to boot (BL1, BL2, U-Boot).

We generalize things so that each flash map entry can have a 'required'
property to indicate if the entry must be in the final image. Other entries
are left out unless we are building a full image.

The building of a full image is controlled by the present/absense of the
GBB file.

BUG=chromium-os:19724
TEST=manual: cros_bundle_firmware -s (and without -s) to see that the
correct images are still produced.

Change-Id: I53c5630f4d8fbe899159d1107701255a7b37622d
Reviewed-on: https://gerrit.chromium.org/gerrit/18049
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Commit-Ready: 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 aa9c16a..d75f33b 100644
--- a/host/lib/bundle_firmware.py
+++ b/host/lib/bundle_firmware.py
@@ -498,6 +498,7 @@
       self._BuildBlob(pack, fdt, blob_type)
 
     if gbb:
+      pack.RequireAllEntries()
       fwid = '.'.join([
           re.sub('[ ,]+', '_', fdt.GetString('/', 'model')),
           self._tools.GetChromeosVersion()])