openpower-pnor: build a PNOR squashfs as consumed by OpenBMC
Recently, OpenBMC has started supporting a firmware update mechanism
that requires a specially formatted tarball to be passed to it.
Since we want op-build to produce images that are easily consumable,
this patch makes the openpower-pnor build produce one of these images.
There is currently no documentation of this format, although the code
that produces it from a PNOR is open source.
Signed-off-by: Charles P. Hofer <charles.hofer@ibm.com>
[stewart@linux.vnet.ibm.com: flattened commit history, rewrote commit message]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
diff --git a/openpower/package/openpower-vpnor/openpower-vpnor.mk b/openpower/package/openpower-vpnor/openpower-vpnor.mk
new file mode 100644
index 0000000..e7ee67a
--- /dev/null
+++ b/openpower/package/openpower-vpnor/openpower-vpnor.mk
@@ -0,0 +1,15 @@
+################################################################################
+#
+# openpower_vpnor
+#
+################################################################################
+
+HOST_OPENPOWER_VPNOR_VERSION ?= 5c90711a8aaa6b1d760388a5116e36831ce5e7ab
+HOST_OPENPOWER_VPNOR_SITE ?= $(call github,openbmc,openpower-pnor-code-mgmt,$(HOST_OPENPOWER_VPNOR_VERSION))
+HOST_OPENPOWER_VPNOR_DEPENDENCIES = host-squashfs host-libflash
+
+define HOST_OPENPOWER_VPNOR_INSTALL_CMDS
+ $(INSTALL) -D $(@D)/generate-squashfs $(HOST_DIR)/usr/bin/generate-squashfs
+endef
+
+$(eval $(host-generic-package))