1 |
commit: b80da88e70669297ff9374738d7d5c7a89a6ae0f |
2 |
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 13 21:28:29 2022 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 13 21:28:29 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b80da88e |
7 |
|
8 |
sys-apps/opal-utils: add 7.0 |
9 |
|
10 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
11 |
|
12 |
sys-apps/opal-utils/Manifest | 1 + |
13 |
sys-apps/opal-utils/opal-utils-7.0.ebuild | 95 +++++++++++++++++++++++++++++++ |
14 |
2 files changed, 96 insertions(+) |
15 |
|
16 |
diff --git a/sys-apps/opal-utils/Manifest b/sys-apps/opal-utils/Manifest |
17 |
index e789980f23a7..72dec2bddbcc 100644 |
18 |
--- a/sys-apps/opal-utils/Manifest |
19 |
+++ b/sys-apps/opal-utils/Manifest |
20 |
@@ -1 +1,2 @@ |
21 |
DIST opal-utils-6.8.tar.gz 5321377 BLAKE2B 3be812618dcbd3d877576e1dec0b6a74ad9091b59760bd8f1f67ba9a8efbce79cba4130464dcb6f2b8e61dedca3a1a60103f36d04fcd234b5a4c577c6e07635b SHA512 a799112c14abdcdb37e1a4c63e48e12bb7a67b6c90476d4e60597f06fd6050a58ffd25859cf6bb12c393522e4b4771ce3aa25a1277bac35855d599e9eb357814 |
22 |
+DIST opal-utils-7.0.tar.gz 5418069 BLAKE2B 86ad4c1a3000753b0bd48f0cf50e9a91eeff8c2a420a6339e4359a5ce6a35954120d7fe7caff64def83bb06e96c602d099fb1fc8e5b580adb67c48a09fb9d7a8 SHA512 72198f0d1bb0d09cb74fe4656421a73ec1a604ec6fa0965bd82e56819a2d41a1a6588f8a8cc7eb507d73ef401f8557901a5305c844fbfc9f27534c7b2e2e9db3 |
23 |
|
24 |
diff --git a/sys-apps/opal-utils/opal-utils-7.0.ebuild b/sys-apps/opal-utils/opal-utils-7.0.ebuild |
25 |
new file mode 100644 |
26 |
index 000000000000..c0dc400c7312 |
27 |
--- /dev/null |
28 |
+++ b/sys-apps/opal-utils/opal-utils-7.0.ebuild |
29 |
@@ -0,0 +1,95 @@ |
30 |
+# Copyright 2019-2022 Gentoo Authors |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+EAPI=8 |
34 |
+ |
35 |
+PYTHON_COMPAT=( python3_{7..10} ) |
36 |
+ |
37 |
+inherit linux-info python-single-r1 systemd toolchain-funcs |
38 |
+ |
39 |
+DESCRIPTION="OPAL firmware utilities" |
40 |
+HOMEPAGE="https://github.com/open-power/skiboot" |
41 |
+SRC_URI="https://github.com/open-power/skiboot/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
42 |
+ |
43 |
+LICENSE="Apache-2.0 GPL-2+" |
44 |
+SLOT="0" |
45 |
+KEYWORDS="~ppc64" |
46 |
+IUSE="doc" |
47 |
+ |
48 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
49 |
+ |
50 |
+DEPEND="" |
51 |
+RDEPEND="${DEPEND} ${PYTHON_DEPS}" |
52 |
+ |
53 |
+BDEPEND="doc? ( $(python_gen_cond_dep ' |
54 |
+ dev-python/sphinx[${PYTHON_USEDEP}] |
55 |
+ dev-python/recommonmark[${PYTHON_USEDEP}]') |
56 |
+)" |
57 |
+ |
58 |
+CONFIG_CHECK="~MTD_POWERNV_FLASH ~OPAL_PRD ~PPC_DT_CPU_FTRS ~SCOM_DEBUGFS" |
59 |
+ERROR_MTD_POWERND_FLASH="CONFIG_MTD_POWERND_FLASH is required to use pflash and opal-gard" |
60 |
+ERROR_OPAL_PRD="CONFIG_OPAL_PRD is required to run opal-prd daemon" |
61 |
+ERROR_SCOM_DEBUGFS="CONFIG_SCOM_DEBUGFS is required to use xscom-utils" |
62 |
+ |
63 |
+S="${WORKDIR}/skiboot-${PV}" |
64 |
+ |
65 |
+PATCHES=( |
66 |
+ "${FILESDIR}/flags.patch" |
67 |
+) |
68 |
+ |
69 |
+pkg_setup() { |
70 |
+ linux-info_pkg_setup |
71 |
+ python-single-r1_pkg_setup |
72 |
+} |
73 |
+ |
74 |
+src_configure() { |
75 |
+ tc-export CC LD |
76 |
+ export OPAL_PRD_VERSION="${PV}" |
77 |
+ export GARD_VERSION="${PV}" |
78 |
+ export PFLASH_VERSION="${PV}" |
79 |
+ export XSCOM_VERSION="${PV}" |
80 |
+ export FFSPART_VERSION="${PV}" |
81 |
+} |
82 |
+ |
83 |
+src_compile() { |
84 |
+ emake V=1 -C external/opal-prd |
85 |
+ emake V=1 -C external/gard |
86 |
+ emake V=1 -C external/pflash |
87 |
+ emake V=1 -C external/xscom-utils |
88 |
+ emake V=1 -C external/ffspart |
89 |
+ |
90 |
+ use doc && emake V=1 -C doc html |
91 |
+} |
92 |
+ |
93 |
+src_install() { |
94 |
+ emake -C external/opal-prd DESTDIR="${D}" prefix="${EPREFIX}/usr" install |
95 |
+ emake -C external/gard DESTDIR="${D}" prefix="${EPREFIX}/usr" install |
96 |
+ emake -C external/pflash DESTDIR="${D}" prefix="${EPREFIX}/usr" install |
97 |
+ emake -C external/xscom-utils DESTDIR="${D}" prefix="${EPREFIX}/usr" install |
98 |
+ dosbin external/ffspart/ffspart |
99 |
+ |
100 |
+ python_domodule external/pci-scripts/ppc.py |
101 |
+ python_doscript external/pci-scripts/phberr.py |
102 |
+ |
103 |
+ newinitd "${FILESDIR}"/opal-prd.initd opal-prd |
104 |
+ newconfd "${FILESDIR}"/opal-prd.confd opal-prd |
105 |
+ |
106 |
+ systemd_dounit external/opal-prd/opal-prd.service |
107 |
+ |
108 |
+ if use doc; then |
109 |
+ rm -r doc/_build/html/_sources || die |
110 |
+ local HTML_DOCS=( doc/_build/html/. ) |
111 |
+ fi |
112 |
+ einstalldocs |
113 |
+} |
114 |
+ |
115 |
+src_test() { |
116 |
+ emake V=1 -C external/opal-prd test |
117 |
+ emake V=1 -C external/gard check |
118 |
+ |
119 |
+ # 2 test are fragile and fails because of filename path |
120 |
+ rm -v external/pflash/test/tests/01-info || die |
121 |
+ rm -v external/pflash/test/tests/06-miscprint || die |
122 |
+ emake V=1 -C external/pflash check |
123 |
+ emake V=1 -C external/ffspart check |
124 |
+} |