From 942f57f515ba3761fb2051c225111172d9dc5d2e Mon Sep 17 00:00:00 2001 From: Jayanth Othayoth Date: Mon, 21 Jun 2021 07:23:09 -0500 Subject: meta-openpower: Add pdata support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OpenPOWER systems uses devicetree based data structure to manage CEC hardware information. Devicetree data modelling mainly includes the hardware topology and attributes, which includes the configuration data. Devicetree data base is constructed during the build time, based on the System specific MRW and hardware team provided attributes, and packaged as part of Hostboot image. pdata provides tools and libraries to manage the phal(power hardware abstraction layer) devicetree. Repository: https://github.com/open-power/pdata Signed-off-by: Jayanth Othayoth Change-Id: I2a7186210ca46d8ee99b457a2b6af61a9a8d8f96 --- .../recipes-bsp/pdata/files/power-target.sh | 6 +++++ meta-openpower/recipes-bsp/pdata/pdata_git.bb | 27 ++++++++++++++++++++++ meta-openpower/recipes-bsp/pdata/phal-devtree.bb | 22 ++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100755 meta-openpower/recipes-bsp/pdata/files/power-target.sh create mode 100644 meta-openpower/recipes-bsp/pdata/pdata_git.bb create mode 100644 meta-openpower/recipes-bsp/pdata/phal-devtree.bb diff --git a/meta-openpower/recipes-bsp/pdata/files/power-target.sh b/meta-openpower/recipes-bsp/pdata/files/power-target.sh new file mode 100755 index 000000000..10c985050 --- /dev/null +++ b/meta-openpower/recipes-bsp/pdata/files/power-target.sh @@ -0,0 +1,6 @@ +# Command line debug tools like pdbg and ecmd requires +# PDBG_DTB environment variable. +# attributes tool required both PDBG_DTB and PDATA_INFODB. + +export PDBG_DTB=/var/lib/phosphor-software-manager/pnor/rw/DEVTREE +export PDATA_INFODB=/usr/share/pdata/attributes_info.db diff --git a/meta-openpower/recipes-bsp/pdata/pdata_git.bb b/meta-openpower/recipes-bsp/pdata/pdata_git.bb new file mode 100644 index 000000000..50f406db1 --- /dev/null +++ b/meta-openpower/recipes-bsp/pdata/pdata_git.bb @@ -0,0 +1,27 @@ +HOMEPAGE = "https://github.com/open-power/pdata/" + +SUMMARY = "POWER Host data management" +DESCRIPTION = "Devicetree based POWER host data management" +PR = "r1" +PV = "1.0+git${SRCPV}" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +S = "${WORKDIR}/git" + +inherit autotools \ + perlnative + +SRC_URI = "git://git@github.com/open-power/pdata;branch="main"" +SRCREV = "a617306c59c81b879aeb1a3d271b5f633895efd0" + +DEPENDS = "pdbg \ + libxml-simple-perl-native \ + libxml-libxml-perl-native \ + ekb-native \ + autoconf-archive" + +PDATA_CONFARG = "CHIP=p10" +EXTRA_OECONF = "--enable-gen_attrsinfo ${PDATA_CONFARG}" + +EXTRA_OEMAKE = "EKB=${STAGING_DATADIR_NATIVE}/ekb/" diff --git a/meta-openpower/recipes-bsp/pdata/phal-devtree.bb b/meta-openpower/recipes-bsp/pdata/phal-devtree.bb new file mode 100644 index 000000000..4ad477ae4 --- /dev/null +++ b/meta-openpower/recipes-bsp/pdata/phal-devtree.bb @@ -0,0 +1,22 @@ +SUMMARY = "Tools and libraries to manage the phal devicetree" +DESCRIPTION = "phal(power hardware abstraction layer) devicetree data \ +modelling mainly includes the host hardware topology and attributes, \ +which includes the configuration data" + +PR = "r1" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +PDATA_DTB_PATH="${datadir}/pdata" +FILES_${PN} += "${PDATA_DTB_PATH}" + +do_install() { + + DTB_FILE_ENV=power-target.sh + DTB_FILE_CONF_PATH=${D}${PDATA_DTB_PATH} + + install -d ${DTB_FILE_CONF_PATH} + install -m 744 ${THISDIR}/files/${DTB_FILE_ENV} ${DTB_FILE_CONF_PATH}/${DTB_FILE_ENV} + install -d ${D}${sysconfdir}/profile.d + ln -s ${PDATA_DTB_PATH}/${DTB_FILE_ENV} ${D}${sysconfdir}/profile.d/${DTB_FILE_ENV} +} -- cgit v1.2.3