-
Notifications
You must be signed in to change notification settings - Fork 82
/
opae.spec.rhel
351 lines (307 loc) · 11.2 KB
/
opae.spec.rhel
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
%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: libuuid
Requires: json-c
Requires: python3
Requires: systemd
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: rpm-build
BuildRequires: systemd-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
%{?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 -DOPAE_MINIMAL_BUILD=ON \
-DFETCHCONTENT_FULLY_DISCONNECTED=ON \
-DFETCHCONTENT_BASE_DIR=_build/_deps
%if 0%{?rhel}
%if 0%{rhel} <= 8
echo "Building for RHEL <= 8"
%make_build
%else
echo "Building for RHEL >= 9"
%cmake_build
%endif
%else
echo "Building for non-RHEL"
%cmake_build
%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/afu-test
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
mkdir -p %{buildroot}%{_usr}/src/opae/samples/dummy_afu
mkdir -p %{buildroot}%{_usr}/src/opae/samples/host_exerciser
mkdir -p %{buildroot}%{_usr}/src/opae/samples/hssi
mkdir -p %{buildroot}%{_usr}/src/opae/samples/opae.io/opae/io
mkdir -p %{buildroot}%{_usr}/src/opae/samples/opae.io/scripts
cp libraries/afu-test/*.{cpp,h} %{buildroot}%{_usr}/src/opae/samples/afu-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/
cp samples/dummy_afu/*.{cpp,h} %{buildroot}%{_usr}/src/opae/samples/dummy_afu/
cp samples/host_exerciser/*.{cpp,h} %{buildroot}%{_usr}/src/opae/samples/host_exerciser/
cp samples/hssi/*.{cpp,h} %{buildroot}%{_usr}/src/opae/samples/hssi/
cp binaries/opae.io/*.{cpp,h,py} %{buildroot}%{_usr}/src/opae/samples/opae.io/
cp binaries/opae.io/opae/io/*.py %{buildroot}%{_usr}/src/opae/samples/opae.io/opae/io
cp binaries/opae.io/scripts/*.py %{buildroot}%{_usr}/src/opae/samples/opae.io/scripts
%if 0%{?rhel}
%if 0%{rhel} <= 8
%make_install
%else
%cmake_install
%endif
%else
%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}/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}/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
# packager
for file in %{buildroot}%{python3_sitelib}/packager/tools/{afu_json_mgr,packager}.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_jtag_pci_dk.so
%{_libdir}/opae/libboard_c6100.so
%{_libdir}/opae/libboard_cmc.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
%{_usr}/src/opae/samples/afu-test/afu_test.cpp
%{_usr}/src/opae/samples/afu-test/afu_test.h
%{_usr}/src/opae/samples/dummy_afu/ddr.h
%{_usr}/src/opae/samples/dummy_afu/dummy_afu.cpp
%{_usr}/src/opae/samples/dummy_afu/dummy_afu.h
%{_usr}/src/opae/samples/dummy_afu/lpbk.h
%{_usr}/src/opae/samples/dummy_afu/mmio.h
%{_usr}/src/opae/samples/host_exerciser/host_exerciser.cpp
%{_usr}/src/opae/samples/host_exerciser/host_exerciser.h
%{_usr}/src/opae/samples/host_exerciser/host_exerciser_cmd.h
%{_usr}/src/opae/samples/host_exerciser/host_exerciser_lpbk.h
%{_usr}/src/opae/samples/host_exerciser/host_exerciser_mem.h
%{_usr}/src/opae/samples/hssi/hssi.cpp
%{_usr}/src/opae/samples/hssi/hssi_100g_cmd.h
%{_usr}/src/opae/samples/hssi/hssi_10g_cmd.h
%{_usr}/src/opae/samples/hssi/hssi_afu.h
%{_usr}/src/opae/samples/hssi/hssi_cmd.h
%{_usr}/src/opae/samples/hssi/hssi_pkt_filt_100g_cmd.h
%{_usr}/src/opae/samples/hssi/hssi_pkt_filt_10g_cmd.h
%{_usr}/src/opae/samples/opae.io/main.cpp
%{_usr}/src/opae/samples/opae.io/main.h
%{_usr}/src/opae/samples/opae.io/pymain.h
%{_usr}/src/opae/samples/opae.io/setup.py
%{_usr}/src/opae/samples/opae.io/vfiobindings.cpp
%{_usr}/src/opae/samples/opae.io/opae/io/__init__.py
%{_usr}/src/opae/samples/opae.io/opae/io/utils.py
%{_usr}/src/opae/samples/opae.io/opae/io/pci.py
%{_usr}/src/opae/samples/opae.io/opae/io/config.py
%{_usr}/src/opae/samples/opae.io/scripts/args.py
%{_usr}/src/opae/samples/opae.io/scripts/nlb0.py
%{_usr}/src/opae/samples/opae.io/scripts/nlb_walk.py
%{_usr}/src/opae/samples/opae.io/scripts/port.py
%{_usr}/src/opae/samples/opae.io/scripts/walk.py
%{_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}/qsfpinfo
%{_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*
%changelog
* Mon Dec 14 2020 The OPAE Dev Team <[email protected]> - 2.0.0-2
- Update OPAE spec file and tarball generation script
- Fix build errors
* Thu Sep 17 2020 Ananda Ravuri <[email protected]> 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 <[email protected]> 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