Enabled dynamic device tree generation
In this commit, added support to auto generate the device tree blob
file for BMC apps and Hostboot to read/write targets and attributes
during ipling to boot the server.
Signed-off-by: Ramesh Iyyar <rameshi1@in.ibm.com>
diff --git a/openpower/package/pdata/pdata.mk b/openpower/package/pdata/pdata.mk
new file mode 100644
index 0000000..9cb811b
--- /dev/null
+++ b/openpower/package/pdata/pdata.mk
@@ -0,0 +1,42 @@
+################################################################################
+#
+# pdata
+#
+################################################################################
+
+PDATA_VERSION = $(call qstrip,$(BR2_PDATA_VERSION))
+# TODO: WORKAROUND: Need to reenable next line and comment out the two lines
+# after that, when code is propagated to a public repo
+#PDATA_SITE = $(call github,phal,pdata,$(PDATA_VERSION))
+PDATA_SITE = git@github.ibm.com:phal/pdata.git
+PDATA_SITE_METHOD = git
+
+PDATA_LICENSE = Apache-2.0
+PDATA_LICENSE_FILES = $(@D)/LICENSE
+PDATA_INSTALL_STAGING = YES
+PDATA_INSTALL_TARGET = NO
+PDATA_AUTORECONF = YES
+PDATA_DEPENDENCIES = ekb host-dtc machine-xml
+
+EKB_STAGING_DIR = $(STAGING_DIR)/ekb
+MACHINE_XML_STAGING_DIR = $(STAGING_DIR)/openpower_mrw_scratch
+
+TARGET_PROC =
+ifeq ($(BR2_OPENPOWER_POWER10),y)
+TARGET_PROC = p10
+endif
+
+QSTRIP_MACHINE_XML = $(call qstrip,$(BR2_OPENPOWER_MACHINE_XML_FILENAME))
+
+PDATA_CONF_OPTS = --enable-gen_dynamicdt
+PDATA_MAKE_OPTS = SYSTEM_NAME=$(call qstrip,$(BR2_OPENPOWER_CONFIG_NAME)) \
+ TARGET_PROC=$(TARGET_PROC) \
+ EKB=$(EKB_STAGING_DIR) \
+ SYSTEM_MRW_XML=$(MACHINE_XML_STAGING_DIR)/$(QSTRIP_MACHINE_XML) \
+
+define PDATA_CREATE_M4_DIR
+ mkdir -p $(@D)/m4
+endef
+
+PDATA_PRE_CONFIGURE_HOOKS += PDATA_CREATE_M4_DIR
+$(eval $(autotools-package))