summaryrefslogtreecommitdiff
path: root/sys-apps/opal-utils
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-01-16 20:27:28 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-01-16 20:27:28 +0000
commit2fd57282f0262ca084e05b0f2c63fbada395d02b (patch)
tree4e0f23cea9ce9fd972e70ebc5214bf36fed465cc /sys-apps/opal-utils
parentc3bc61051d7f12b4c682efa7a5460bbc8815649e (diff)
gentoo resync : 16.01.2021
Diffstat (limited to 'sys-apps/opal-utils')
-rw-r--r--sys-apps/opal-utils/Manifest2
-rw-r--r--sys-apps/opal-utils/opal-utils-7.0.ebuild95
2 files changed, 97 insertions, 0 deletions
diff --git a/sys-apps/opal-utils/Manifest b/sys-apps/opal-utils/Manifest
index 5367956f605e..97899757c9f2 100644
--- a/sys-apps/opal-utils/Manifest
+++ b/sys-apps/opal-utils/Manifest
@@ -2,5 +2,7 @@ AUX flags.patch 1057 BLAKE2B 4b601dff49cfe1d82cc32b2fbb0c32922e9f049e010d1403b89
AUX opal-prd.confd 99 BLAKE2B 105ccd9e2d6d7d51ffc1a82b3fa174ae61ea4e945f679f82460f84bbf2036f4f7f3da2f8d9c66807a275aa98778d824f8ba5d50d1e5349fd17adbee032816290 SHA512 387ec1d00afeaf7c44e4ee5c7e6a3959e1465b7a8a9a121bf470105c23df1f906f23cedbd1006bed250f50a3c3a77f9f40ea62bafa6d6397dda2152c9dedda06
AUX opal-prd.initd 480 BLAKE2B 895440e30d5a136a717462f8890b3123ca4e31b75f1443f95020e98bf92b0a82f7c0536f828956ea5705c090bb598ab7d48f60653da0eab9bd904e234264ee9e SHA512 9a850a840697bcfeb272dffdabc80be321768fee91808562650d4162555212ce4c6639fd58832979fb710c2f2c78e7835dd99b435b22a64cae9810085d93f459
DIST opal-utils-6.8.tar.gz 5321377 BLAKE2B 3be812618dcbd3d877576e1dec0b6a74ad9091b59760bd8f1f67ba9a8efbce79cba4130464dcb6f2b8e61dedca3a1a60103f36d04fcd234b5a4c577c6e07635b SHA512 a799112c14abdcdb37e1a4c63e48e12bb7a67b6c90476d4e60597f06fd6050a58ffd25859cf6bb12c393522e4b4771ce3aa25a1277bac35855d599e9eb357814
+DIST opal-utils-7.0.tar.gz 5418069 BLAKE2B 86ad4c1a3000753b0bd48f0cf50e9a91eeff8c2a420a6339e4359a5ce6a35954120d7fe7caff64def83bb06e96c602d099fb1fc8e5b580adb67c48a09fb9d7a8 SHA512 72198f0d1bb0d09cb74fe4656421a73ec1a604ec6fa0965bd82e56819a2d41a1a6588f8a8cc7eb507d73ef401f8557901a5305c844fbfc9f27534c7b2e2e9db3
EBUILD opal-utils-6.8.ebuild 2479 BLAKE2B 4ffa2f22532e19ed4669651cc945653208042341b025dffdc3618b36a6246a38b410a4bd9d556426e1314f0d1cfedd3b68239add8929cb2bd674112df9dd8e30 SHA512 5ff7b665abe48acd0515ff41152e956c60a76fca0d5e76196f167a2afe890c1eb996412f4af22155bef933f56866d535cbb61b1d6b355ec0b166ebbfae6c4471
+EBUILD opal-utils-7.0.ebuild 2536 BLAKE2B 4b7f883c4ae1afc2a82083c146b6d746f478f0acce56efda717a0d13a8b14012ec2e427bec1af193ed0d1b079a8a1da8f3248c79bd1bd3fd2d8cfd0815e91773 SHA512 a94d3a8d122adf223691104ff6d3dc8f7b614d0b04f5b90542e456ddb0a4342aa1ebd8ea35063470cb20a8e81c60bd9f6724cea317a7404b1acba4d714e274ee
MISC metadata.xml 1100 BLAKE2B 1e8e44dd35f5ced685c12c0ac30fb2b9c466103b75df166e53344c60c4c58d70be0bd42f4fcc59c37199ea770f40cedc4577c099dc6cd2f03b66606758f40247 SHA512 0e1b9cd39bdfa603a8e11a550d59877fe88d095332b500e470ac40fd3f3cfc84952a97b376cbff8037cd729ba8a2164a6aef390cb0cd13798909a2e1bda14ecd
diff --git a/sys-apps/opal-utils/opal-utils-7.0.ebuild b/sys-apps/opal-utils/opal-utils-7.0.ebuild
new file mode 100644
index 000000000000..c0dc400c7312
--- /dev/null
+++ b/sys-apps/opal-utils/opal-utils-7.0.ebuild
@@ -0,0 +1,95 @@
+# Copyright 2019-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{7..10} )
+
+inherit linux-info python-single-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 GPL-2+"
+SLOT="0"
+KEYWORDS="~ppc64"
+IUSE="doc"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND=""
+RDEPEND="${DEPEND} ${PYTHON_DEPS}"
+
+BDEPEND="doc? ( $(python_gen_cond_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}"
+
+PATCHES=(
+ "${FILESDIR}/flags.patch"
+)
+
+pkg_setup() {
+ linux-info_pkg_setup
+ python-single-r1_pkg_setup
+}
+
+src_configure() {
+ tc-export CC LD
+ export OPAL_PRD_VERSION="${PV}"
+ export GARD_VERSION="${PV}"
+ export PFLASH_VERSION="${PV}"
+ export XSCOM_VERSION="${PV}"
+ export FFSPART_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
+ emake V=1 -C external/ffspart
+
+ 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
+ dosbin external/ffspart/ffspart
+
+ python_domodule external/pci-scripts/ppc.py
+ python_doscript external/pci-scripts/phberr.py
+
+ 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
+}
+
+src_test() {
+ emake V=1 -C external/opal-prd test
+ emake V=1 -C external/gard check
+
+ # 2 test are fragile and fails because of filename path
+ rm -v external/pflash/test/tests/01-info || die
+ rm -v external/pflash/test/tests/06-miscprint || die
+ emake V=1 -C external/pflash check
+ emake V=1 -C external/ffspart check
+}