summaryrefslogtreecommitdiff
path: root/sys-apps/opal-utils
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-09-06 10:28:05 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-09-06 10:28:05 +0100
commitf1af93971b7490792d8541bc790e0d8c6d787059 (patch)
treea38046712bbc3a3844d77452d16c84e716caa3d4 /sys-apps/opal-utils
parentfc637fb28da700da71ec2064d65ca5a7a31b9c6c (diff)
gentoo resync : 06.08.2019
Diffstat (limited to 'sys-apps/opal-utils')
-rw-r--r--sys-apps/opal-utils/Manifest5
-rw-r--r--sys-apps/opal-utils/files/opal-prd.confd4
-rw-r--r--sys-apps/opal-utils/files/opal-prd.initd20
-rw-r--r--sys-apps/opal-utils/metadata.xml22
-rw-r--r--sys-apps/opal-utils/opal-utils-6.5.ebuild83
5 files changed, 134 insertions, 0 deletions
diff --git a/sys-apps/opal-utils/Manifest b/sys-apps/opal-utils/Manifest
new file mode 100644
index 000000000000..d38af50046d8
--- /dev/null
+++ b/sys-apps/opal-utils/Manifest
@@ -0,0 +1,5 @@
+AUX opal-prd.confd 99 BLAKE2B 105ccd9e2d6d7d51ffc1a82b3fa174ae61ea4e945f679f82460f84bbf2036f4f7f3da2f8d9c66807a275aa98778d824f8ba5d50d1e5349fd17adbee032816290 SHA512 387ec1d00afeaf7c44e4ee5c7e6a3959e1465b7a8a9a121bf470105c23df1f906f23cedbd1006bed250f50a3c3a77f9f40ea62bafa6d6397dda2152c9dedda06
+AUX opal-prd.initd 480 BLAKE2B 895440e30d5a136a717462f8890b3123ca4e31b75f1443f95020e98bf92b0a82f7c0536f828956ea5705c090bb598ab7d48f60653da0eab9bd904e234264ee9e SHA512 9a850a840697bcfeb272dffdabc80be321768fee91808562650d4162555212ce4c6639fd58832979fb710c2f2c78e7835dd99b435b22a64cae9810085d93f459
+DIST opal-utils-6.5.tar.gz 2080841 BLAKE2B cd8bda3b7f3bcbc620f922a6baa69f452a95c60a96eb9adf67d781dc5d1a75fc43cba7aa3ed82105de7a04041cfb61f43e909794702564819cda6f11afd23815 SHA512 f756307403ec49f24e5dbc06dbe8fe52898da27f2a0fa761164b1d85efd33dae8a8f96de3859eb7b11f85f43a790c9c213f9ebf0c7f4a859b590dcfb35e38571
+EBUILD opal-utils-6.5.ebuild 2172 BLAKE2B 08a34fecb2957b97edd28259f8d3a4749c184a5a1be06840621c73b902563f1e7c8b565973d4eb919747f392cfe8b84e860afa61d8afe4252c444545093b1892 SHA512 01f37623ff3b6d00c098017676bf9cfcee0cb898be9700682136d0c4352e5b60669aa4e1b64bd61033ed8bb07a8424114cc8e390d5f5426f9b98237de97fbc61
+MISC metadata.xml 975 BLAKE2B e3185490ec22ed5c776c9df2a627e698e6a3d35085694d397df52c965d3c23dd57f628289ea660a24f2623d5821fba838e504bf15a77d86e3a55b42bfc7ffd8b SHA512 0fe842a12d4c5f34b6042b91b5c63fc7354e17f8228841809305006f84613dd6d894d2780725f1046beb7fbec04a17e1e08d54db37ab027f275f3543c5bb5b56
diff --git a/sys-apps/opal-utils/files/opal-prd.confd b/sys-apps/opal-utils/files/opal-prd.confd
new file mode 100644
index 000000000000..a61415ef9345
--- /dev/null
+++ b/sys-apps/opal-utils/files/opal-prd.confd
@@ -0,0 +1,4 @@
+# /etc/conf.d/opal-prd: config file for /etc/init.d/opal-prd
+# see OPAL-PRD(8)
+
+#OPAL_PRD_OPTS=""
diff --git a/sys-apps/opal-utils/files/opal-prd.initd b/sys-apps/opal-utils/files/opal-prd.initd
new file mode 100644
index 000000000000..935d39f6f94a
--- /dev/null
+++ b/sys-apps/opal-utils/files/opal-prd.initd
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name="OPAL PRD daemon"
+description="Processor RunTime Diagnostics daemon"
+command=/usr/sbin/opal-prd
+command_args="${OPAL_PRD_OPTS}"
+command_background="true"
+pidfile="/run/${RC_SVCNAME}.pid"
+
+depend() {
+ need dev-mount sysfs
+ use logger
+ keyword -containers
+
+}
+
+required_dirs="/sys/firmware/devicetree/base/ibm,opal/diagnostics"
+required_files="/dev/opal-prd"
diff --git a/sys-apps/opal-utils/metadata.xml b/sys-apps/opal-utils/metadata.xml
new file mode 100644
index 000000000000..308277edf698
--- /dev/null
+++ b/sys-apps/opal-utils/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>gyakovlev@gentoo.org</email>
+ <name>Georgy Yakovlev</name>
+ </maintainer>
+ <longdescription lang="en">
+ This package contains utility programs for OpenPower systems:
+ 'opal-prd' provides a daemon to load and run the OpenPower firmware's Processor Recovery Diagnostics binary.
+ It's responsible for run time maintenance of OpenPower Systems hardware.
+
+ 'gard' utility can read, parse and clear hardware gard partitions on OpenPower platforms.
+
+ 'getscom' and 'putscom' utilities provide an interface to query or modify the registers of the different chipsets of an OpenPower system.
+
+ 'pflash' is a tool to access the flash modules on such systems and update the OpenPower firmware.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">open-power/skiboot</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/opal-utils/opal-utils-6.5.ebuild b/sys-apps/opal-utils/opal-utils-6.5.ebuild
new file mode 100644
index 000000000000..bbde6d6db522
--- /dev/null
+++ b/sys-apps/opal-utils/opal-utils-6.5.ebuild
@@ -0,0 +1,83 @@
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
+
+inherit linux-info python-any-r1 systemd toolchain-funcs
+
+DESCRIPTION="OPAL firmware utilities"
+HOMEPAGE="https://github.com/open-power/skiboot"
+SRC_URI="https://github.com/open-power/skiboot/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~ppc64"
+IUSE="doc"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+BDEPEND="doc? (
+ $(python_gen_any_dep '
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ dev-python/recommonmark[${PYTHON_USEDEP}]
+ ')
+)"
+
+CONFIG_CHECK="~MTD_POWERNV_FLASH ~OPAL_PRD ~PPC_DT_CPU_FTRS ~SCOM_DEBUGFS"
+ERROR_MTD_POWERND_FLASH="CONFIG_MTD_POWERND_FLASH is required to use pflash and opal-gard"
+ERROR_OPAL_PRD="CONFIG_OPAL_PRD is required to run opal-prd daemon"
+ERROR_SCOM_DEBUGFS="CONFIG_SCOM_DEBUGFS is required to use xscom-utils"
+
+S="${WORKDIR}/skiboot-${PV}"
+
+python_check_deps() {
+ has_version "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
+ has_version "dev-python/sphinx[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ linux-info_pkg_setup
+ use doc && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+ sed -i '/^CFLAGS +=/ s/-g2 -ggdb//' external/opal-prd/Makefile || die
+}
+
+src_configure() {
+ tc-export CC LD
+ export OPAL_PRD_VERSION="${PV}"
+ export GARD_VERSION="${PV}"
+ export PFLASH_VERSION="${PV}"
+ export XSCOM_VERSION="${PV}"
+}
+
+src_compile() {
+ emake V=1 -C external/opal-prd
+ emake V=1 -C external/gard
+ emake V=1 -C external/pflash
+ emake V=1 -C external/xscom-utils
+
+ use doc && emake V=1 -C doc html
+}
+
+src_install() {
+ emake -C external/opal-prd DESTDIR="${D}" prefix="${EPREFIX}/usr" install
+ emake -C external/gard DESTDIR="${D}" prefix="${EPREFIX}/usr" install
+ emake -C external/pflash DESTDIR="${D}" prefix="${EPREFIX}/usr" install
+ emake -C external/xscom-utils DESTDIR="${D}" prefix="${EPREFIX}/usr" install
+
+ newinitd "${FILESDIR}"/opal-prd.initd opal-prd
+ newconfd "${FILESDIR}"/opal-prd.confd opal-prd
+
+ systemd_dounit external/opal-prd/opal-prd.service
+
+ if use doc; then
+ rm -r doc/_build/html/_sources || die
+ local HTML_DOCS=( doc/_build/html/. )
+ fi
+ einstalldocs
+}