Allow creating firmware images without GBB

Do not fail creating an image in case '/config/nogbb' object is
present in the device tree, just do not build the GBB section in that
case.

BUG=chrome-os-partner:18329
TEST=manual
  . with the upcoming chromeos-bootimage and peach-u-boot modifications

   $ emerge-peach_pit chromeos-bootimage

   succeeds for both peach_pit and smdk5420 device trees.

Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>

Change-Id: I482a1e2686437cd06a25385f564b349bd91fe10b
Reviewed-on: https://gerrit.chromium.org/gerrit/47165
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
diff --git a/host/lib/bundle_firmware.py b/host/lib/bundle_firmware.py
index 61df9ef..c83119d 100644
--- a/host/lib/bundle_firmware.py
+++ b/host/lib/bundle_firmware.py
@@ -1198,8 +1198,9 @@
     Returns:
       Filename of the resulting image (not the output_fname copy).
     """
-    gbb = ''
-    if not self._small:
+    if self._small or self.fdt.GetProp('/config', 'nogbb', 'any') != 'any':
+      gbb = ''  # Building a small image or `nogbb' is requested in device tree.
+    else:
       gbb = self._CreateGoogleBinaryBlock(hardware_id)
 
     # This creates the actual image.