forked from OFS/opae-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
opae.spec.fedora
391 lines (336 loc) · 11.5 KB
/
opae.spec.fedora
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
%define opae_release @RELEASE@
Summary: Open Programmable Acceleration Engine (OPAE) SDK
Name: opae
Version: @VERSION@
Release: %{opae_release}%{?dist}
License: BSD
ExclusiveArch: x86_64
Group: Development/Libraries
Vendor: Intel Corporation
Requires: uuid
Requires: json-c
Requires: python3
Requires: systemd
Requires: tbb
Requires: hwloc
Requires: spdlog
Requires: libedit
URL: https://github.com/OPAE/%{name}-sdk
Source0: https://github.com/OPAE/opae-sdk/releases/download/%{version}-%{opae_release}/%{name}-%{version}-%{opae_release}.tar.gz
BuildRequires: make
BuildRequires: cmake
BuildRequires: git
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: json-c-devel
BuildRequires: libuuid-devel
BuildRequires: python3-devel
BuildRequires: python3-jsonschema
BuildRequires: python3-pip
BuildRequires: python3-setuptools
BuildRequires: python3-pyyaml
BuildRequires: python3-pybind11
BuildRequires: rpm-build
BuildRequires: systemd-devel
BuildRequires: tbb-devel
BuildRequires: hwloc-devel
BuildRequires: pybind11-devel
BuildRequires: cli11-devel
BuildRequires: spdlog-devel
BuildRequires: libedit-devel
%description
Open Programmable Acceleration Engine (OPAE) is a software framework
for managing and accessing programmable accelerators (FPGAs).
Its main parts are:
* OPAE Software Development Kit (OPAE SDK) (this package)
* OPAE Linux driver for Intel(R) Xeon(R) CPU with
Integrated FPGAs and Intel(R) PAC with Arria(R) 10 GX FPGA
* Basic Building Block (BBB) library for accelerating AFU
OPAE SDK is a collection of libraries and tools to facilitate the
development of software applications and accelerators using OPAE.
It provides a library implementing the OPAE C API for presenting a
streamlined and easy-to-use interface for software applications to
discover, access, and manage FPGA devices and accelerators using
the OPAE software stack.
%package devel
Summary: OPAE headers, sample source, and documentation
Requires: opae
Requires: libuuid-devel, %{name}%{?_isa} = %{version}-%{release}
Requires: openssl-devel
%description devel
OPAE headers, tools, sample source, and documentation
%package extra-tools
Summary: Additional OPAE tools
Requires: opae-devel
%description extra-tools
Additional OPAE tools
%{?python_disable_dependency_generator}
# Workaround a problem with pybind11 *.so not having build-id's
%undefine _missing_build_ids_terminate_build
%prep
%setup -q -n %{name}-%{version}-%{opae_release}
%build
%cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DFETCHCONTENT_FULLY_DISCONNECTED=ON \
-DFETCHCONTENT_BASE_DIR=_build/_deps \
-DOPAE_BUILD_PYTHON_DIST=ON \
-DOPAE_BUILD_FPGABIST=ON
%if 0%{?rhel}
%if 0%{rhel} <= 8
echo "Building for RHEL <= 8"
%{?!__cmake_builddir: %global __cmake_builddir %{?__builddir}%{!?__builddir:.}}
%make_build
%else
echo "Building for RHEL >= 9"
%cmake_build
%endif
%else
echo "Building for non-RHEL"
%cmake_build
%endif
%if 0%{?suse_version} > 0
echo "Building for openSUSE"
%{?!__cmake_builddir: %global __cmake_builddir %{?__builddir}%{!?__builddir:.}}
%endif
%install
mkdir -p %{buildroot}%{_datadir}/opae
cp RELEASE_NOTES.md %{buildroot}%{_datadir}/opae/RELEASE_NOTES.md
cp LICENSE %{buildroot}%{_datadir}/opae/LICENSE
cp COPYING %{buildroot}%{_datadir}/opae/COPYING
mkdir -p %{buildroot}%{_usr}/src/opae/cmake/modules
mkdir -p %{buildroot}%{_usr}/src/opae/samples
mkdir -p %{buildroot}%{_usr}/src/opae/samples/hello_fpga/
mkdir -p %{buildroot}%{_usr}/src/opae/samples/hello_events/
mkdir -p %{buildroot}%{_usr}/src/opae/samples/object_api/
mkdir -p %{buildroot}%{_usr}/src/opae/samples/n5010-test/
cp samples/hello_fpga/hello_fpga.c %{buildroot}%{_usr}/src/opae/samples/hello_fpga/
cp samples/hello_events/hello_events.c %{buildroot}%{_usr}/src/opae/samples/hello_events/
cp samples/object_api/object_api.c %{buildroot}%{_usr}/src/opae/samples/object_api/
cp samples/n5010-test/n5010-test.c %{buildroot}%{_usr}/src/opae/samples/n5010-test/
%if 0%{?rhel}
%if 0%{rhel} <= 8
echo "Installing for RHEL <= 8"
%make_install
%else
echo "Installing for RHEL >= 9"
%cmake_install
%endif
%else
echo "Installing for non-RHEL"
%cmake_install
%endif
#cmake
for file in %{buildroot}%{_usr}/lib/opae*/modules/*; do
chmod a+x $file
done
for file in %{buildroot}%{_usr}/src/opae/cmake/modules/*; do
chmod a+x $file
done
%{__python3} -m pip install --prefix=/usr --root=%{buildroot} %{_topdir}/BUILD/%{name}-%{version}-%{opae_release}/%__cmake_builddir/binaries/opae.io/stage
%{__python3} -m pip install --prefix=/usr --root=%{buildroot} %{_topdir}/BUILD/%{name}-%{version}-%{opae_release}/binaries/hssi
%{__python3} -m pip install --prefix=/usr --root=%{buildroot} %{_topdir}/BUILD/%{name}-%{version}-%{opae_release}/%__cmake_builddir/binaries/fpgadiag/stage
%{__python3} -m pip install --prefix=/usr --root=%{buildroot} %{_topdir}/BUILD/%{name}-%{version}-%{opae_release}/%__cmake_builddir/libraries/pyopae/stage
%{__python3} -m pip install --prefix=/usr --root=%{buildroot} %{_topdir}/BUILD/%{name}-%{version}-%{opae_release}/%__cmake_builddir/libraries/pyopaeuio/stage
%{__python3} -m pip install --prefix=/usr --root=%{buildroot} %{_topdir}/BUILD/%{name}-%{version}-%{opae_release}/python/opae.admin
%{__python3} -m pip install --prefix=/usr --root=%{buildroot} %{_topdir}/BUILD/%{name}-%{version}-%{opae_release}/python/pacsign
%{__python3} -m pip install --prefix=/usr --root=%{buildroot} %{_topdir}/BUILD/%{name}-%{version}-%{opae_release}/python/packager
%{__python3} -m pip install --prefix=/usr --root=%{buildroot} %{_topdir}/BUILD/%{name}-%{version}-%{opae_release}/binaries/ofs.uio
%{__python3} -m pip install --prefix=/usr --root=%{buildroot} %{_topdir}/BUILD/%{name}-%{version}-%{opae_release}/platforms
# Make rpmlint happy about install permissions
# admin tools
for file in %{buildroot}%{python3_sitelib}/opae/admin/tools/{fpgaflash,fpgaotsu,fpgaport,fpgasupdate,ihex2ipmi,rsu,super_rsu,bitstream_info,opaevfio,pci_device,fpgareg,n5010tool}.py; do
chmod a+x $file
done
# ethernet
for file in %{buildroot}%{python3_sitelib}/ethernet/{hssicommon,hssiloopback,hssimac,hssistats}.py; do
chmod a+x $file
done
# diag
for file in %{buildroot}%{python3_sitearch}/opae/diag/{common,fecmode,fpgadiag,fpgalpbk,fpgamac,fpgastats,fvlbypass,mactest,mux}.py; do
chmod a+x $file
done
# packager
for file in %{buildroot}%{python3_sitelib}/packager/tools/{afu_json_mgr,packager}.py; do
chmod a+x $file
done
# opae.uio
for file in %{buildroot}%{python3_sitelib}/uio/ofs_uio.py; do
chmod a+x $file
done
%files
%dir %{_datadir}/opae
%doc %{_datadir}/opae/RELEASE_NOTES.md
%license %{_datadir}/opae/LICENSE
%license %{_datadir}/opae/COPYING
%{_libdir}/libopae-c.so.*
%{_libdir}/libbitstream.so.*
%{_libdir}/libopae-c++-nlb.so.*
%{_libdir}/libopae-cxx-core.so.*
%{_libdir}/libopae-c++-utils.so.*
%{_libdir}/libfpgad-api.so.*
%{_libdir}/libmml-srv.so.*
%{_libdir}/libmml-stream.so.*
%{_libdir}/libofs.so.*
%{_libdir}/libopaemem.so.*
%{_libdir}/libopaeuio.so.*
%{_libdir}/libopaevfio.so.*
%{_libdir}/libofs_cpeng.so.*
%{_libdir}/opae/libxfpga.so
%{_libdir}/opae/libopae-v.so
%{_libdir}/opae/libopae-u.so
%{_libdir}/opae/libmodbmc.so
%{_libdir}/opae/libfpgad-xfpga.so
%{_libdir}/opae/libfpgad-vc.so
%{_libdir}/opae/libboard_a10gx.so
%{_libdir}/opae/libboard_n3000.so
%{_libdir}/opae/libboard_d5005.so
%{_libdir}/opae/libboard_n5010.so
%{_libdir}/opae/libboard_n6000.so
%{_libdir}/opae/libboard_c6100.so
%{_bindir}/fpgad
%{_bindir}/fpgaconf
%{_bindir}/fpgainfo
%{_bindir}/fpgasupdate
%{_bindir}/rsu
%{_bindir}/pci_device
%{python3_sitelib}/opae.admin*
%{python3_sitelib}/opae/admin*
%config(noreplace) %{_sysconfdir}/opae/opae.cfg*
%config(noreplace) %{_sysconfdir}/sysconfig/fpgad.conf*
%{_unitdir}/fpgad.service
%post
%systemd_post fpgad.service
/sbin/ldconfig
%preun
%systemd_preun fpgad.service
%files devel
%dir %{_includedir}/opae
%{_includedir}/opae/*.h
%{_includedir}/opae/cxx/core.h
%{_includedir}/opae/cxx/core/*.h
%{_includedir}/opae/plugin/*.h
%{_includedir}/mock/opae_std.h
%dir %{_usr}/src/opae
%{_usr}/src/opae/samples/hello_fpga/hello_fpga.c
%{_usr}/src/opae/samples/hello_events/hello_events.c
%{_usr}/src/opae/samples/object_api/object_api.c
%{_usr}/src/opae/samples/n5010-test/n5010-test.c
%{_usr}/src/opae/samples/n5010-ctl/n5010-ctl.c
%{_usr}/src/opae/cmake/modules/*
%{_usr}/src/opae/argsfilter/argsfilter.c
%{_usr}/src/opae/argsfilter/argsfilter.h
%{_libdir}/libfpgad-api.so
%{_libdir}/libopae-c++-nlb.so
%{_libdir}/libopae-cxx-core.so
%{_libdir}/libopae-c++-utils.so
%{_libdir}/libopae-c.so
%{_libdir}/libbitstream.so
%{_libdir}/libmml-stream.so
%{_libdir}/libmml-srv.so
%{_libdir}/libofs.so
%{_libdir}/libofs_cpeng.so
%{_libdir}/libopaemem.so
%{_libdir}/libopaeuio.so
%{_libdir}/libopaevfio.so
%{_prefix}/lib/opae-%{version}
%{_bindir}/bitstreaminfo
%{_bindir}/fpgaflash
%{_bindir}/fpgaotsu
%{_bindir}/fpgaport
%{_bindir}/super-rsu
%{_bindir}/mmlink
%{_bindir}/userclk
%{_bindir}/hello_fpga
%{_bindir}/object_api
%{_bindir}/hello_events
%{_bindir}/hello_cxxcore
%{_bindir}/afu_json_mgr
%{_bindir}/packager
%{_bindir}/fpgametrics
%{_bindir}/n5010-test
%{_bindir}/n5010-ctl
%{_bindir}/PACSign
%{_bindir}/opaevfio
%{_bindir}/opaevfiotest
%{_bindir}/regmap-debugfs
%{_bindir}/fpgareg
%{_bindir}/afu_platform_config
%{_bindir}/afu_platform_info
%{_bindir}/afu_synth_setup
%{_bindir}/rtl_src_config
%{_bindir}/hssiloopback
%{_bindir}/hssimac
%{_bindir}/hssistats
%{_bindir}/opaeuiotest
%{_bindir}/pac_hssi_config.py
%{_bindir}/nlb0
%{_bindir}/nlb3
%{_bindir}/nlb7
%{_bindir}/vabtool
%{_bindir}/n5010tool
%{_usr}/share/opae/*
%{python3_sitelib}/ethernet*
%{python3_sitelib}/hssi_ethernet*
%{python3_sitelib}/pacsign*
%{python3_sitelib}/packager*
%{python3_sitelib}/platmgr*
%{python3_sitearch}/libvfio*
%{python3_sitearch}/opae.fpga*
%{python3_sitearch}/opae/fpga*
%files extra-tools
%{_bindir}/bist_app
%{_bindir}/dummy_afu
%{_bindir}/bist_app.py
%{_bindir}/bist_common.py
%{_bindir}/bist_dma.py
%{_bindir}/bist_def.py
%{_bindir}/bist_nlb3.py
%{_bindir}/bist_nlb0.py
%{_bindir}/fpgabist
%{_bindir}/fecmode
%{_bindir}/fpgamac
%{_bindir}/fvlbypass
%{_bindir}/mactest
%{_bindir}/fpgadiag
%{_bindir}/fpgalpbk
%{_bindir}/fpgastats
%{_bindir}/fpga_dma_N3000_test
%{_bindir}/fpga_dma_test
%{_bindir}/host_exerciser
%{_bindir}/bist
%{_bindir}/hps
%{_bindir}/hssi
%{_bindir}/opae.io
%{_bindir}/mem_tg
%{_bindir}/ofs.uio
%{python3_sitearch}/opae.diag*
%{python3_sitearch}/opae/diag*
%{python3_sitearch}/opae.io*
%{python3_sitearch}/opae/io*
%{python3_sitearch}/pyopaeuio*
%{python3_sitelib}/ofs.uio*
%{python3_sitelib}/uio*
%changelog
* Mon Dec 14 2020 The OPAE Dev Team <opae@lists.linuxfoundation.org> - 2.0.0-2
- Update OPAE spec file and tarball generation script
- Fix build errors
* Thu Sep 17 2020 Ananda Ravuri <ananda.ravuri@intel.com> 2.0.0-1
- Various Static code scan bug fixes
- Added support to FPGA Linux kernel Device Feature List (DFL) driver.
- Added support to PAC card N3000 series.
- Added PACSign, bitstream_info, fpgasudpate, rsu, fpgaotsu, fpgaport python tools.
- Added ethernet tools for PAC card N3000.
- Various bug fixes
- Various memory leak fixes.
- Various Static code scan bug fixes
- Added python3 support.
- OPAE USMG API are deprecated.
- Updated OPAE documentation.
* Tue Dec 17 2019 Korde Nakul <nakul.korde@intel.com> 1.4.0-1
- Added support to FPGA Linux kernel Device Feature List (DFL) driver patch set2.
- Increased test cases and test coverage
- Various bug fixes
- Various compiler warning fixes
- Various memory leak fixes
- Various Static code scan bug fixes
- Added new FPGA MMIO API to write 512 bits