Merge pull request #235 from dcrowell/ebmclids

Enable creation of eBMC lid package
diff --git a/openpower/configs/rainier_defconfig b/openpower/configs/rainier_defconfig
index b6d607d..5575a3c 100644
--- a/openpower/configs/rainier_defconfig
+++ b/openpower/configs/rainier_defconfig
@@ -75,3 +75,4 @@
 BR2_CAPP_UCODE_BIN_FILENAME="cappucode.bin"
 BR2_PACKAGE_LOADKEYS=y
 BR2_IMA_CATALOG_DTS="POWER9"
+BR2_OPENPOWER_MAKE_LIDS=y
diff --git a/openpower/package/openpower-pnor/Config.in b/openpower/package/openpower-pnor/Config.in
index 5233fff..64231ce 100644
--- a/openpower/package/openpower-pnor/Config.in
+++ b/openpower/package/openpower-pnor/Config.in
@@ -177,4 +177,8 @@
         bool "Create a virtual PNOR image along with the standard image"
         default n
 
+config BR2_OPENPOWER_MAKE_LIDS
+        bool "Create a package of content and signature binaries to be used for lid creation"
+        default n
+
 endmenu
diff --git a/openpower/package/openpower-pnor/openpower-pnor.mk b/openpower/package/openpower-pnor/openpower-pnor.mk
index 8b4dac2..f248389 100644
--- a/openpower/package/openpower-pnor/openpower-pnor.mk
+++ b/openpower/package/openpower-pnor/openpower-pnor.mk
@@ -198,6 +198,15 @@
             $(INSTALL) $(STAGING_DIR)/pnor/$(BR2_OPENPOWER_PNOR_FILENAME).static.tar.gz $(BINARIES_DIR); \
         fi
 
+        # Make the lids 
+        if [ "$(BR2_OPENPOWER_MAKE_LIDS)" == "y" ]; then \
+            $(TARGET_MAKE_ENV) $(@D)/makelidpkg \
+                 $(OUTPUT_IMAGES_DIR) \
+                 $(OPENPOWER_PNOR_SCRATCH_DIR); \
+        else \
+            echo "Not making LIDs"; \
+        fi
+
 	#Create Debug Tarball
 	mkdir -p $(STAGING_DIR)/pnor/host_fw_debug_tarball_files/
 	cp -r $(FILES_TO_TAR) $(STAGING_DIR)/pnor/host_fw_debug_tarball_files/