Added package to get ekb hwps attributes xml
In this commit, added new package for getting required ekb hwps
attributes xml file for bmc to generate device tree which will
contains all required targets and attributes information in the
device tree structure format.
The required ekb hwps attributes xml files are added based on
target processor. So, In future just addeding new processor
specific required attributes xml file is sufficient.
Signed-off-by: Ramesh Iyyar <rameshi1@in.ibm.com>
diff --git a/openpower/package/Config.in b/openpower/package/Config.in
index 906b69b..b7a0f04 100755
--- a/openpower/package/Config.in
+++ b/openpower/package/Config.in
@@ -27,3 +27,4 @@
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/sb-signing-framework/Config.in"
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/ocmb-explorer-fw/Config.in"
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/fsp-trace/Config.in"
+source "$BR2_EXTERNAL_OP_BUILD_PATH/package/ekb/Config.in"
diff --git a/openpower/package/ekb/Config.in b/openpower/package/ekb/Config.in
new file mode 100644
index 0000000..a70fa0f
--- /dev/null
+++ b/openpower/package/ekb/Config.in
@@ -0,0 +1,36 @@
+menu "ekb"
+
+config BR2_PACKAGE_EKB
+ bool "ekb"
+ default y if (BR2_OPENPOWER_POWER10)
+ help
+ To get FAPI attributes xml files. This is required for generate
+ power processor specific device tree by using specific HWPs xmls.
+ If new processor need to support then adding required xmls
+ in this package file is sufficient by using BR2_OPENPOWER_POWERxx.
+
+if BR2_PACKAGE_EKB
+
+choice
+ prompt "EKB version"
+ default BR2_EKB_LATEST_VERSION
+
+config BR2_EKB_LATEST_VERSION
+ bool "Use latest EKB master"
+
+config BR2_EKB_CUSTOM_VERSION
+ bool "Custom EKB version"
+
+endchoice
+
+config BR2_EKB_CUSTOM_VERSION_VALUE
+ string "EKB version"
+ depends on BR2_EKB_CUSTOM_VERSION
+
+config BR2_EKB_VERSION
+ string
+ default "289ff52f89894e39211150444ff3e9fc296e67df" if BR2_EKB_LATEST_VERSION
+ default BR2_EKB_CUSTOM_VERSION_VALUE if BR2_EKB_CUSTOM_VERSION
+endif
+
+endmenu
diff --git a/openpower/package/ekb/ekb.mk b/openpower/package/ekb/ekb.mk
new file mode 100644
index 0000000..4c5c32e
--- /dev/null
+++ b/openpower/package/ekb/ekb.mk
@@ -0,0 +1,39 @@
+################################################################################
+#
+# ekb
+#
+################################################################################
+
+EKB_VERSION = $(call qstrip,$(BR2_EKB_VERSION))
+# TODO: WORKAROUND: Need to reenable next line and comment out the two lines
+# after that, when code is propagated to a public repo
+#EKB_SITE = $(call github,openbmc,ekb,$(EKB_VERSION))
+EKB_SITE = git@github.ibm.com:openbmc/ekb.git
+EKB_SITE_METHOD = git
+
+EKB_INSTALL_STAGING = YES
+EKB_INSTALL_TARGET = NO
+
+EKB_STAGING_DIR = $(STAGING_DIR)/ekb/
+
+ifeq ($(BR2_OPENPOWER_POWER10),y)
+EKB_HWP_ATTRS_XML_FILES = chips/p10/procedures/xml/attribute_info/p10_clock_attributes.xml \
+ chips/p10/procedures/xml/attribute_info/p10_freq_attributes.xml \
+ chips/p10/procedures/xml/attribute_info/p10_ipl_attributes.xml \
+ chips/p10/procedures/xml/attribute_info/p10_nest_attributes.xml \
+ chips/p10/procedures/xml/attribute_info/p10_pervasive_attributes.xml \
+ chips/p10/procedures/xml/attribute_info/p10_runn_attributes.xml \
+ chips/p10/procedures/xml/attribute_info/p10_bars_attributes.xml \
+ hwpf/fapi2/xml/attribute_info/unit_attributes.xml \
+ hwpf/fapi2/xml/attribute_info/common_attributes.xml \
+ hwpf/fapi2/xml/attribute_info/chip_attributes.xml
+endif
+
+define EKB_INSTALL_STAGING_CMDS
+ # Creating ekb staging directory
+ mkdir -p $(EKB_STAGING_DIR)
+ # Copying all required hwps attributes xml file with respective directory structures
+ cd $(@D); cp --parents $(EKB_HWP_ATTRS_XML_FILES) $(EKB_STAGING_DIR)
+endef
+
+$(eval $(generic-package))