Support out of tree modules in kernel 5.10.
1. Upgrade opae-fpga-driver from version 2.0.1-8 to version 2.0.1-10. 2. Upgrade qat17 from version 4.5 to version 4.14. Deleted patch Get-and-report-the-return-code-on-firmware-load-fail.patch because the new code already had the fix. 3. Upgrade mlnx-ofa_kernel from version 5.0 to version 5.3. 4. Use dpdk-kmods-2a9f0f72a2d926382634cf8f1de10e1acf57542b.tar.gz for igb_uio. 5. Keep intel-i40e, intel-ice, and intel-iavf. Add devtoolset-8 for building, and fix a build issue with iavf. 6. Deleted drbd, intel-e1000e, intel-ixgbe and intel-ixgbevf that are used in kernel tree. Story: 2008921 Partial-Task: 42519 Depends-On: https://review.opendev.org/c/starlingx/kernel/+/798790 Signed-off-by: Jiping Ma <jiping.ma2@windriver.com> Change-Id: I4ecc38d0669dce187de0a64331577babda5921b7
This commit is contained in:
parent
7b55e47e1d
commit
f438b8b5f6
@ -18,11 +18,5 @@ kmod-i40e
|
||||
# ice-kmod
|
||||
kmod-ice
|
||||
|
||||
# ixgbevf-kmod
|
||||
kmod-ixgbevf
|
||||
|
||||
# ixgbe-kmod
|
||||
kmod-ixgbe
|
||||
|
||||
# qat17
|
||||
qat17
|
||||
|
@ -16,10 +16,8 @@ kmod-i40e-rt
|
||||
kmod-ice-rt
|
||||
|
||||
# ixgbevf-kmod
|
||||
kmod-ixgbevf-rt
|
||||
|
||||
# ixgbe-kmod
|
||||
kmod-ixgbe-rt
|
||||
|
||||
# qat17
|
||||
qat17-rt
|
||||
|
@ -21,8 +21,6 @@ kernel-rt-headers
|
||||
kernel-rt-devel
|
||||
|
||||
# e1000e-kmod
|
||||
kmod-e1000e
|
||||
kmod-e1000e-rt
|
||||
|
||||
# i40e-kmod
|
||||
kmod-i40e
|
||||
@ -37,20 +35,14 @@ kmod-ice
|
||||
kmod-ice-rt
|
||||
|
||||
# ixgbevf-kmod
|
||||
kmod-ixgbevf
|
||||
kmod-ixgbevf-rt
|
||||
|
||||
# ixgbe-kmod
|
||||
kmod-ixgbe
|
||||
kmod-ixgbe-rt
|
||||
|
||||
# igb_uio-kmod
|
||||
kmod-igb_uio
|
||||
kmod-igb_uio-rt
|
||||
|
||||
# drbd-kernel
|
||||
kmod-drbd
|
||||
kmod-drbd-rt
|
||||
|
||||
# qat17
|
||||
qat17
|
||||
|
@ -1,13 +1,9 @@
|
||||
kernel-std
|
||||
kernel-modules/intel-e1000e
|
||||
kernel-modules/intel-iavf
|
||||
kernel-modules/intel-i40e
|
||||
kernel-modules/intel-ice
|
||||
kernel-modules/intel-ixgbevf
|
||||
kernel-modules/intel-ixgbe
|
||||
kernel-modules/intel-igb_uio
|
||||
kernel-modules/qat17
|
||||
kernel-modules/drbd
|
||||
kernel-modules/intel-opae-fpga
|
||||
kernel-modules/mlnx-ofa_kernel
|
||||
userspace/mellanox/libibverbs
|
||||
|
@ -1,14 +1,10 @@
|
||||
kernel-rt
|
||||
kernel-modules/mlnx-ofa_kernel
|
||||
kernel-modules/intel-e1000e
|
||||
kernel-modules/intel-iavf
|
||||
kernel-modules/intel-i40e
|
||||
kernel-modules/intel-ice
|
||||
kernel-modules/intel-ixgbevf
|
||||
kernel-modules/intel-ixgbe
|
||||
kernel-modules/intel-igb_uio
|
||||
kernel-modules/qat17
|
||||
kernel-modules/drbd
|
||||
kernel-modules/intel-opae-fpga
|
||||
userspace/mellanox/libibverbs
|
||||
userspace/mellanox/rdma-core
|
||||
|
@ -1,16 +0,0 @@
|
||||
Metadata-Version: 1.1
|
||||
Name: drbd-kernel
|
||||
Version: 8.4.7
|
||||
Summary: Kernel driver for DRBD
|
||||
Home-page:
|
||||
Author:
|
||||
Author-email:
|
||||
License: GPLv2+
|
||||
|
||||
Description:
|
||||
This module is the kernel-dependent driver for DRBD. This is split out so
|
||||
that multiple kernel driver versions can be installed, one for each
|
||||
installed kernel.
|
||||
|
||||
|
||||
Platform: UNKNOWN
|
@ -1,9 +0,0 @@
|
||||
COPY_LIST="$FILES_BASE/* \
|
||||
$DISTRO/patches/* \
|
||||
$STX_BASE/downloads/drbd-8.4.11-1.tar.gz"
|
||||
OPT_DEP_LIST_FOR_BUILD_TYPE[std]=$GIT_BASE/kernel-std
|
||||
OPT_DEP_LIST_FOR_BUILD_TYPE[rt]=$GIT_BASE/kernel-rt
|
||||
BASE_SRCREV_FOR_PATH[$GIT_BASE/kernel-std]=145ff64b9734e5c45cfd8eb837a04e257b4b9581
|
||||
BASE_SRCREV_FOR_PATH[$GIT_BASE/kernel-rt]=c0fee2da8ef34aa816ddd76690ed425b2ff94c90
|
||||
PKG_BASE_SRCREV=4271ab1f4346779e5e1d73ba5f7c27e48d7be12e
|
||||
TIS_PATCH_VER=PKG_GITREVCOUNT+OTHER_GITREVCOUNT
|
@ -1,152 +0,0 @@
|
||||
%if "%{?_tis_build_type}" == "rt"
|
||||
%define bt_ext -rt
|
||||
%else
|
||||
%undefine bt_ext
|
||||
%endif
|
||||
|
||||
# Define the kmod package name here.
|
||||
%define kmod_name drbd
|
||||
|
||||
Name: drbd-kernel%{?bt_ext}
|
||||
Summary: Kernel driver for DRBD
|
||||
Version: 8.4.11
|
||||
%define upstream_release 1
|
||||
Release: %{upstream_release}%{?_tis_dist}.%{tis_patch_ver}
|
||||
%global tarball_version %(echo "%{version}-%{?upstream_release}" | sed -e "s,%{?dist}$,,")
|
||||
Group: System Environment/Kernel
|
||||
License: GPLv2+
|
||||
Summary: %{kmod_name} kernel module(s)
|
||||
|
||||
BuildRequires: kernel%{?bt_ext}-devel, redhat-rpm-config, perl, openssl
|
||||
BuildRequires: elfutils-libelf-devel
|
||||
ExclusiveArch: x86_64
|
||||
|
||||
# Sources.
|
||||
Source0: http://oss.linbit.com/drbd/drbd-%{tarball_version}.tar.gz
|
||||
|
||||
# STX
|
||||
Patch0001: 0001-remove_bind_before_connect_error.patch
|
||||
Patch0002: 0002-drbd-convert-to-bioset_init-mempool_init.patch
|
||||
Patch0003: 0003-Fix-queue_lock-compile-issue.patch
|
||||
|
||||
%define kversion %(rpm -q kernel%{?bt_ext}-devel | sort --version-sort | tail -1 | sed 's/kernel%{?bt_ext}-devel-//')
|
||||
|
||||
Summary: drbd kernel module(s)
|
||||
Group: System Environment/Kernel
|
||||
%global _use_internal_dependency_generator 0
|
||||
Provides: kernel-modules >= %{kversion}
|
||||
Provides: drbd-kernel = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Requires(post): /usr/sbin/depmod
|
||||
Requires(postun): /usr/sbin/depmod
|
||||
BuildRequires: kernel%{?bt_ext}-devel
|
||||
|
||||
%description
|
||||
This module is the kernel-dependent driver for DRBD. This is split out so
|
||||
that multiple kernel driver versions can be installed, one for each
|
||||
installed kernel.
|
||||
|
||||
%package -n kmod-drbd%{?bt_ext}
|
||||
Summary: drbd kernel module(s)
|
||||
%description -n kmod-drbd%{?bt_ext}
|
||||
This module is the kernel-dependent driver for DRBD. This is split out so
|
||||
that multiple kernel driver versions can be installed, one for each
|
||||
installed kernel.
|
||||
|
||||
%post -n kmod-drbd%{?bt_ext}
|
||||
echo "Working. This may take some time ..."
|
||||
if [ -e "/boot/System.map-%{kversion}" ]; then
|
||||
/usr/sbin/depmod -aeF "/boot/System.map-%{kversion}" "%{kversion}" > /dev/null || :
|
||||
fi
|
||||
echo "Done."
|
||||
%preun -n kmod-drbd%{?bt_ext}
|
||||
rpm -ql kmod-drbd%{?bt_ext}-%{version}-%{release}.x86_64 | grep '\.ko$' > /var/run/rpm-kmod-drbd%{?bt_ext}-modules
|
||||
%postun -n kmod-drbd%{?bt_ext}
|
||||
echo "Working. This may take some time ..."
|
||||
if [ -e "/boot/System.map-%{kversion}" ]; then
|
||||
/usr/sbin/depmod -aeF "/boot/System.map-%{kversion}" "%{kversion}" > /dev/null || :
|
||||
fi
|
||||
rm /var/run/rpm-kmod-drbd%{?bt_ext}-modules
|
||||
echo "Done."
|
||||
%files -n kmod-drbd%{?bt_ext}
|
||||
%defattr(644,root,root,755)
|
||||
/lib/modules/%{kversion}/
|
||||
%doc /usr/share/doc/kmod-drbd-%{version}/
|
||||
|
||||
|
||||
# Disable the building of the debug package(s).
|
||||
%define debug_package %{nil}
|
||||
|
||||
%prep
|
||||
%setup -q -n drbd-%{tarball_version}
|
||||
%patch0001 -p1
|
||||
%patch0002 -p1
|
||||
%patch0003 -p1
|
||||
|
||||
%build
|
||||
rm -rf obj
|
||||
mkdir obj
|
||||
ln -s ../scripts obj/
|
||||
cp -r drbd obj/default
|
||||
make -C obj/default %{_smp_mflags} all KDIR=/usr/src/kernels/%{kversion}
|
||||
|
||||
%install
|
||||
pwd
|
||||
%{__install} -d %{buildroot}/lib/modules/%{kversion}/extra/%{kmod_name}/
|
||||
%{__install} obj/default/%{kmod_name}.ko %{buildroot}/lib/modules/%{kversion}/extra/%{kmod_name}/
|
||||
%{__install} -d %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
|
||||
%{__install} ChangeLog %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
|
||||
%{__install} COPYING %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
|
||||
mv obj/default/.kernel.config.gz obj/k-config-$kernelrelease.gz
|
||||
%{__install} obj/k-config-$kernelrelease.gz %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
|
||||
|
||||
# Strip the modules(s).
|
||||
find %{buildroot} -type f -name \*.ko -exec %{__strip} --strip-debug \{\} \;
|
||||
|
||||
# Always Sign the modules(s).
|
||||
# If the module signing keys are not defined, define them here.
|
||||
%{!?privkey: %define privkey /usr/src/kernels/%{kversion}/signing_key.pem}
|
||||
%{!?pubkey: %define pubkey /usr/src/kernels/%{kversion}/signing_key.x509}
|
||||
for module in $(find %{buildroot} -type f -name \*.ko);
|
||||
do /usr/src/kernels/%{kversion}/scripts/sign-file \
|
||||
sha256 %{privkey} %{pubkey} $module;
|
||||
done
|
||||
|
||||
%clean
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
%changelog
|
||||
* Wed Dec 16 2015 Philipp Reisner <phil@linbit.com> - 8.4.7-1
|
||||
- New upstream release.
|
||||
|
||||
* Wed Sep 16 2015 Lars Ellenberg <lars@linbit.com> - 8.4.6-5
|
||||
- New upstream release.
|
||||
|
||||
* Thu Jul 30 2015 Lars Ellenberg <lars@linbit.com> - 8.4.6-4
|
||||
- New upstream release.
|
||||
|
||||
* Fri Apr 3 2015 Philipp Reisner <phil@linbit.com> - 8.4.6-1
|
||||
- New upstream release.
|
||||
|
||||
* Mon Jun 2 2014 Philipp Reisner <phil@linbit.com> - 8.4.5-1
|
||||
- New upstream release.
|
||||
|
||||
* Fri Oct 11 2013 Philipp Reisner <phil@linbit.com> - 8.4.4-1
|
||||
- New upstream release.
|
||||
|
||||
* Tue Feb 5 2013 Philipp Reisner <phil@linbit.com> - 8.4.3-1
|
||||
- New upstream release.
|
||||
|
||||
* Thu Sep 6 2012 Philipp Reisner <phil@linbit.com> - 8.4.2-1
|
||||
- New upstream release.
|
||||
|
||||
* Tue Dec 20 2011 Philipp Reisner <phil@linbit.com> - 8.4.1-1
|
||||
- New upstream release.
|
||||
|
||||
* Mon Jul 18 2011 Philipp Reisner <phil@linbit.com> - 8.4.0-1
|
||||
- New upstream release.
|
||||
|
||||
* Fri Jan 28 2011 Philipp Reisner <phil@linbit.com> - 8.3.10-1
|
||||
- New upstream release.
|
||||
|
||||
* Thu Nov 25 2010 Andreas Gruenbacher <agruen@linbit.com> - 8.3.9-1
|
||||
- Convert to a Kernel Module Package.
|
@ -1,11 +0,0 @@
|
||||
%defattr(644,root,root,755)
|
||||
%doc COPYING
|
||||
%doc ChangeLog
|
||||
%if 0%(grep -q "release 5" /etc/redhat-release && echo 1)
|
||||
/lib/modules/%verrel%variant
|
||||
%doc obj/k-config-%verrel%variant.gz
|
||||
%else
|
||||
/lib/modules/%verrel%dotvariant
|
||||
%doc obj/k-config-%verrel%dotvariant.gz
|
||||
%endif
|
||||
%config /etc/depmod.d/drbd.conf
|
@ -1,12 +0,0 @@
|
||||
Index: drbd-8.4.7-1/drbd/drbd_receiver.c
|
||||
===================================================================
|
||||
--- drbd-8.4.7-1.orig/drbd/drbd_receiver.c
|
||||
+++ drbd-8.4.7-1/drbd/drbd_receiver.c
|
||||
@@ -719,6 +719,7 @@ out:
|
||||
/* peer not (yet) available, network problem */
|
||||
case ECONNREFUSED: case ENETUNREACH:
|
||||
case EHOSTDOWN: case EHOSTUNREACH:
|
||||
+ case EADDRNOTAVAIL:
|
||||
disconnect_on_error = 0;
|
||||
break;
|
||||
default:
|
@ -1,271 +0,0 @@
|
||||
From 29199315f91bcb65936543865761dc27e3635d42 Mon Sep 17 00:00:00 2001
|
||||
From: Kent Overstreet <kent.overstreet@gmail.com>
|
||||
Date: Sun, 20 May 2018 18:25:48 -0400
|
||||
Subject: [PATCH] drbd: convert to bioset_init()/mempool_init()
|
||||
|
||||
Convert drbd to embedded bio sets and mempools.
|
||||
|
||||
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
||||
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
||||
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
|
||||
---
|
||||
drbd/drbd_bitmap.c | 4 +--
|
||||
drbd/drbd_int.h | 10 ++++----
|
||||
drbd/drbd_main.c | 70 +++++++++++++++++++---------------------------------
|
||||
drbd/drbd_receiver.c | 6 ++---
|
||||
drbd/drbd_req.c | 4 +--
|
||||
drbd/drbd_req.h | 2 +-
|
||||
6 files changed, 38 insertions(+), 58 deletions(-)
|
||||
|
||||
diff --git a/drbd/drbd_bitmap.c b/drbd/drbd_bitmap.c
|
||||
index 7faee2b..5c1f176 100644
|
||||
--- a/drbd/drbd_bitmap.c
|
||||
+++ b/drbd/drbd_bitmap.c
|
||||
@@ -990,7 +990,7 @@ static BIO_ENDIO_TYPE drbd_bm_endio BIO_ENDIO_ARGS(struct bio *bio)
|
||||
bm_page_unlock_io(device, idx);
|
||||
|
||||
if (ctx->flags & BM_AIO_COPY_PAGES)
|
||||
- mempool_free(bio->bi_io_vec[0].bv_page, drbd_md_io_page_pool);
|
||||
+ mempool_free(bio->bi_io_vec[0].bv_page, &drbd_md_io_page_pool);
|
||||
|
||||
bio_put(bio);
|
||||
|
||||
@@ -1029,7 +1029,7 @@ static void bm_page_io_async(struct drbd_bm_aio_ctx *ctx, int page_nr) __must_ho
|
||||
bm_set_page_unchanged(b->bm_pages[page_nr]);
|
||||
|
||||
if (ctx->flags & BM_AIO_COPY_PAGES) {
|
||||
- page = mempool_alloc(drbd_md_io_page_pool, __GFP_HIGHMEM|__GFP_RECLAIM);
|
||||
+ page = mempool_alloc(&drbd_md_io_page_pool, __GFP_HIGHMEM|__GFP_RECLAIM);
|
||||
copy_highpage(page, b->bm_pages[page_nr]);
|
||||
bm_store_page_idx(page, page_nr);
|
||||
} else
|
||||
diff --git a/drbd/drbd_int.h b/drbd/drbd_int.h
|
||||
index 60382c4..77fce6d 100644
|
||||
--- a/drbd/drbd_int.h
|
||||
+++ b/drbd/drbd_int.h
|
||||
@@ -1509,8 +1509,8 @@ extern struct kmem_cache *drbd_request_cache;
|
||||
extern struct kmem_cache *drbd_ee_cache; /* peer requests */
|
||||
extern struct kmem_cache *drbd_bm_ext_cache; /* bitmap extents */
|
||||
extern struct kmem_cache *drbd_al_ext_cache; /* activity log extents */
|
||||
-extern mempool_t *drbd_request_mempool;
|
||||
-extern mempool_t *drbd_ee_mempool;
|
||||
+extern mempool_t drbd_request_mempool;
|
||||
+extern mempool_t drbd_ee_mempool;
|
||||
|
||||
/* drbd's page pool, used to buffer data received from the peer,
|
||||
* or data requested by the peer.
|
||||
@@ -1536,16 +1536,16 @@ extern wait_queue_head_t drbd_pp_wait;
|
||||
* 128 should be plenty, currently we probably can get away with as few as 1.
|
||||
*/
|
||||
#define DRBD_MIN_POOL_PAGES 128
|
||||
-extern mempool_t *drbd_md_io_page_pool;
|
||||
+extern mempool_t drbd_md_io_page_pool;
|
||||
|
||||
/* We also need to make sure we get a bio
|
||||
* when we need it for housekeeping purposes */
|
||||
-extern struct bio_set *drbd_md_io_bio_set;
|
||||
+extern struct bio_set drbd_md_io_bio_set;
|
||||
/* to allocate from that set */
|
||||
extern struct bio *bio_alloc_drbd(gfp_t gfp_mask);
|
||||
|
||||
/* And a bio_set for cloning */
|
||||
-extern struct bio_set *drbd_io_bio_set;
|
||||
+extern struct bio_set drbd_io_bio_set;
|
||||
|
||||
extern struct mutex resources_mutex;
|
||||
|
||||
diff --git a/drbd/drbd_main.c b/drbd/drbd_main.c
|
||||
index dca68bc..4dd0bf1 100644
|
||||
--- a/drbd/drbd_main.c
|
||||
+++ b/drbd/drbd_main.c
|
||||
@@ -141,11 +141,11 @@ struct kmem_cache *drbd_request_cache;
|
||||
struct kmem_cache *drbd_ee_cache; /* peer requests */
|
||||
struct kmem_cache *drbd_bm_ext_cache; /* bitmap extents */
|
||||
struct kmem_cache *drbd_al_ext_cache; /* activity log extents */
|
||||
-mempool_t *drbd_request_mempool;
|
||||
-mempool_t *drbd_ee_mempool;
|
||||
-mempool_t *drbd_md_io_page_pool;
|
||||
-struct bio_set *drbd_md_io_bio_set;
|
||||
-struct bio_set *drbd_io_bio_set;
|
||||
+mempool_t drbd_request_mempool;
|
||||
+mempool_t drbd_ee_mempool;
|
||||
+mempool_t drbd_md_io_page_pool;
|
||||
+struct bio_set drbd_md_io_bio_set;
|
||||
+struct bio_set drbd_io_bio_set;
|
||||
|
||||
/* I do not use a standard mempool, because:
|
||||
1) I want to hand out the pre-allocated objects first.
|
||||
@@ -188,10 +188,10 @@ struct bio *bio_alloc_drbd(gfp_t gfp_mask)
|
||||
{
|
||||
struct bio *bio;
|
||||
|
||||
- if (!drbd_md_io_bio_set)
|
||||
+ if (!bioset_initialized(&drbd_md_io_bio_set))
|
||||
return bio_alloc(gfp_mask, 1);
|
||||
|
||||
- bio = bio_alloc_bioset(gfp_mask, 1, drbd_md_io_bio_set);
|
||||
+ bio = bio_alloc_bioset(gfp_mask, 1, &drbd_md_io_bio_set);
|
||||
if (!bio)
|
||||
return NULL;
|
||||
return bio;
|
||||
@@ -2209,16 +2209,11 @@ static void drbd_destroy_mempools(void)
|
||||
|
||||
/* D_ASSERT(device, atomic_read(&drbd_pp_vacant)==0); */
|
||||
|
||||
- if (drbd_io_bio_set)
|
||||
- bioset_free(drbd_io_bio_set);
|
||||
- if (drbd_md_io_bio_set)
|
||||
- bioset_free(drbd_md_io_bio_set);
|
||||
- if (drbd_md_io_page_pool)
|
||||
- mempool_destroy(drbd_md_io_page_pool);
|
||||
- if (drbd_ee_mempool)
|
||||
- mempool_destroy(drbd_ee_mempool);
|
||||
- if (drbd_request_mempool)
|
||||
- mempool_destroy(drbd_request_mempool);
|
||||
+ bioset_exit(&drbd_io_bio_set);
|
||||
+ bioset_exit(&drbd_md_io_bio_set);
|
||||
+ mempool_exit(&drbd_md_io_page_pool);
|
||||
+ mempool_exit(&drbd_ee_mempool);
|
||||
+ mempool_exit(&drbd_request_mempool);
|
||||
if (drbd_ee_cache)
|
||||
kmem_cache_destroy(drbd_ee_cache);
|
||||
if (drbd_request_cache)
|
||||
@@ -2228,11 +2223,6 @@ static void drbd_destroy_mempools(void)
|
||||
if (drbd_al_ext_cache)
|
||||
kmem_cache_destroy(drbd_al_ext_cache);
|
||||
|
||||
- drbd_io_bio_set = NULL;
|
||||
- drbd_md_io_bio_set = NULL;
|
||||
- drbd_md_io_page_pool = NULL;
|
||||
- drbd_ee_mempool = NULL;
|
||||
- drbd_request_mempool = NULL;
|
||||
drbd_ee_cache = NULL;
|
||||
drbd_request_cache = NULL;
|
||||
drbd_bm_ext_cache = NULL;
|
||||
@@ -2245,18 +2235,7 @@ static int drbd_create_mempools(void)
|
||||
{
|
||||
struct page *page;
|
||||
const int number = (DRBD_MAX_BIO_SIZE/PAGE_SIZE) * drbd_minor_count;
|
||||
- int i;
|
||||
-
|
||||
- /* prepare our caches and mempools */
|
||||
- drbd_request_mempool = NULL;
|
||||
- drbd_ee_cache = NULL;
|
||||
- drbd_request_cache = NULL;
|
||||
- drbd_bm_ext_cache = NULL;
|
||||
- drbd_al_ext_cache = NULL;
|
||||
- drbd_pp_pool = NULL;
|
||||
- drbd_md_io_page_pool = NULL;
|
||||
- drbd_md_io_bio_set = NULL;
|
||||
- drbd_io_bio_set = NULL;
|
||||
+ int i, ret;
|
||||
|
||||
/* caches */
|
||||
drbd_request_cache = kmem_cache_create(
|
||||
@@ -2280,25 +2259,26 @@ static int drbd_create_mempools(void)
|
||||
goto Enomem;
|
||||
|
||||
/* mempools */
|
||||
- drbd_io_bio_set = bioset_create(BIO_POOL_SIZE, 0, 0);
|
||||
- if (drbd_io_bio_set == NULL)
|
||||
+ ret = bioset_init(&drbd_io_bio_set, BIO_POOL_SIZE, 0, 0);
|
||||
+ if (ret)
|
||||
goto Enomem;
|
||||
|
||||
- drbd_md_io_bio_set = bioset_create(DRBD_MIN_POOL_PAGES, 0,
|
||||
- BIOSET_NEED_BVECS);
|
||||
- if (drbd_md_io_bio_set == NULL)
|
||||
+ ret = bioset_init(&drbd_md_io_bio_set, DRBD_MIN_POOL_PAGES, 0,
|
||||
+ BIOSET_NEED_BVECS);
|
||||
+ if (ret)
|
||||
goto Enomem;
|
||||
|
||||
- drbd_md_io_page_pool = mempool_create_page_pool(DRBD_MIN_POOL_PAGES, 0);
|
||||
- if (drbd_md_io_page_pool == NULL)
|
||||
+ ret = mempool_init_page_pool(&drbd_md_io_page_pool, DRBD_MIN_POOL_PAGES, 0);
|
||||
+ if (ret)
|
||||
goto Enomem;
|
||||
|
||||
- drbd_request_mempool = mempool_create_slab_pool(number, drbd_request_cache);
|
||||
- if (drbd_request_mempool == NULL)
|
||||
+ ret = mempool_init_slab_pool(&drbd_request_mempool, number,
|
||||
+ drbd_request_cache);
|
||||
+ if (ret)
|
||||
goto Enomem;
|
||||
|
||||
- drbd_ee_mempool = mempool_create_slab_pool(number, drbd_ee_cache);
|
||||
- if (drbd_ee_mempool == NULL)
|
||||
+ ret = mempool_init_slab_pool(&drbd_ee_mempool, number, drbd_ee_cache);
|
||||
+ if (ret)
|
||||
goto Enomem;
|
||||
|
||||
/* drbd's page pool */
|
||||
diff --git a/drbd/drbd_receiver.c b/drbd/drbd_receiver.c
|
||||
index b69e9a7..d7ba2a5 100644
|
||||
--- a/drbd/drbd_receiver.c
|
||||
+++ b/drbd/drbd_receiver.c
|
||||
@@ -417,7 +417,7 @@ drbd_alloc_peer_req(struct drbd_peer_device *peer_device, u64 id, sector_t secto
|
||||
if (drbd_insert_fault(device, DRBD_FAULT_AL_EE))
|
||||
return NULL;
|
||||
|
||||
- peer_req = mempool_alloc(drbd_ee_mempool, gfp_mask & ~__GFP_HIGHMEM);
|
||||
+ peer_req = mempool_alloc(&drbd_ee_mempool, gfp_mask & ~__GFP_HIGHMEM);
|
||||
if (!peer_req) {
|
||||
if (!(gfp_mask & __GFP_NOWARN))
|
||||
drbd_err(device, "%s: allocation failed\n", __func__);
|
||||
@@ -447,7 +447,7 @@ drbd_alloc_peer_req(struct drbd_peer_device *peer_device, u64 id, sector_t secto
|
||||
return peer_req;
|
||||
|
||||
fail:
|
||||
- mempool_free(peer_req, drbd_ee_mempool);
|
||||
+ mempool_free(peer_req, &drbd_ee_mempool);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -464,7 +464,7 @@ void __drbd_free_peer_req(struct drbd_device *device, struct drbd_peer_request *
|
||||
peer_req->flags &= ~EE_CALL_AL_COMPLETE_IO;
|
||||
drbd_al_complete_io(device, &peer_req->i);
|
||||
}
|
||||
- mempool_free(peer_req, drbd_ee_mempool);
|
||||
+ mempool_free(peer_req, &drbd_ee_mempool);
|
||||
}
|
||||
|
||||
int drbd_free_peer_reqs(struct drbd_device *device, struct list_head *list)
|
||||
diff --git a/drbd/drbd_req.c b/drbd/drbd_req.c
|
||||
index b602cb3..221d6f6 100644
|
||||
--- a/drbd/drbd_req.c
|
||||
+++ b/drbd/drbd_req.c
|
||||
@@ -73,7 +73,7 @@ static struct drbd_request *drbd_req_new(struct drbd_device *device, struct bio
|
||||
{
|
||||
struct drbd_request *req;
|
||||
|
||||
- req = mempool_alloc(drbd_request_mempool, GFP_NOIO);
|
||||
+ req = mempool_alloc(&drbd_request_mempool, GFP_NOIO);
|
||||
if (!req)
|
||||
return NULL;
|
||||
memset(req, 0, sizeof(*req));
|
||||
@@ -202,7 +202,7 @@ void drbd_req_destroy(struct kref *kref)
|
||||
}
|
||||
}
|
||||
|
||||
- mempool_free(req, drbd_request_mempool);
|
||||
+ mempool_free(req, &drbd_request_mempool);
|
||||
}
|
||||
|
||||
static void wake_all_senders(struct drbd_connection *connection) {
|
||||
diff --git a/drbd/drbd_req.h b/drbd/drbd_req.h
|
||||
index bd5935f..68e6469 100644
|
||||
--- a/drbd/drbd_req.h
|
||||
+++ b/drbd/drbd_req.h
|
||||
@@ -271,7 +271,7 @@ enum drbd_req_state_bits {
|
||||
static inline void drbd_req_make_private_bio(struct drbd_request *req, struct bio *bio_src)
|
||||
{
|
||||
struct bio *bio;
|
||||
- bio = bio_clone_fast(bio_src, GFP_NOIO, drbd_io_bio_set);
|
||||
+ bio = bio_clone_fast(bio_src, GFP_NOIO, &drbd_io_bio_set);
|
||||
|
||||
req->private_bio = bio;
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,37 +0,0 @@
|
||||
From 6ab2cc667468284ef176b72859823e2e946e9ee6 Mon Sep 17 00:00:00 2001
|
||||
From: Shuicheng Lin <shuicheng.lin@intel.com>
|
||||
Date: Fri, 7 Feb 2020 15:21:23 +0800
|
||||
Subject: [PATCH] Fix queue_lock compile issue
|
||||
|
||||
queue_lock was "spinlock_t *" type in "struct request_queue". But
|
||||
with current 4.18.0-80 kernel, it is "spinlock_t".
|
||||
|
||||
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
|
||||
---
|
||||
drbd/drbd_main.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drbd/drbd_main.c b/drbd/drbd_main.c
|
||||
index 4dd0bf1..8022c9a 100644
|
||||
--- a/drbd/drbd_main.c
|
||||
+++ b/drbd/drbd_main.c
|
||||
@@ -2910,7 +2910,7 @@ enum drbd_ret_code drbd_create_device(struct drbd_config_context *adm_ctx, unsig
|
||||
|
||||
drbd_init_set_defaults(device);
|
||||
|
||||
- q = blk_alloc_queue(GFP_KERNEL);
|
||||
+ q = blk_alloc_queue_node(GFP_KERNEL, NUMA_NO_NODE);
|
||||
if (!q)
|
||||
goto out_no_q;
|
||||
device->rq_queue = q;
|
||||
@@ -2944,7 +2944,6 @@ enum drbd_ret_code drbd_create_device(struct drbd_config_context *adm_ctx, unsig
|
||||
#ifdef COMPAT_HAVE_BLK_QUEUE_MERGE_BVEC
|
||||
blk_queue_merge_bvec(q, drbd_merge_bvec);
|
||||
#endif
|
||||
- q->queue_lock = &resource->req_lock;
|
||||
#ifdef blk_queue_plugged
|
||||
/* plugging on a queue, that actually has no requests! */
|
||||
q->unplug_fn = drbd_unplug_fn;
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,9 +0,0 @@
|
||||
COPY_LIST=" \
|
||||
$PKG_BASE/files/* \
|
||||
$STX_BASE/downloads/e1000e-3.6.0.tar.gz"
|
||||
OPT_DEP_LIST_FOR_BUILD_TYPE[std]=$GIT_BASE/kernel-std
|
||||
OPT_DEP_LIST_FOR_BUILD_TYPE[rt]=$GIT_BASE/kernel-rt
|
||||
BASE_SRCREV_FOR_PATH[$GIT_BASE/kernel-std]=145ff64b9734e5c45cfd8eb837a04e257b4b9581
|
||||
BASE_SRCREV_FOR_PATH[$GIT_BASE/kernel-rt]=c0fee2da8ef34aa816ddd76690ed425b2ff94c90
|
||||
PKG_BASE_SRCREV=83ff54f4239c3beeba23f81558fbf0c430233fe2
|
||||
TIS_PATCH_VER=PKG_GITREVCOUNT+OTHER_GITREVCOUNT+1
|
@ -1,114 +0,0 @@
|
||||
%if "%{?_tis_build_type}" == "rt"
|
||||
%define bt_ext -rt
|
||||
%else
|
||||
%undefine bt_ext
|
||||
%endif
|
||||
|
||||
# Define the kmod package name here.
|
||||
%define kmod_name e1000e
|
||||
|
||||
Name: %{kmod_name}-kmod%{?bt_ext}
|
||||
Version: 3.6.0
|
||||
Release: 0%{?_tis_dist}.%{tis_patch_ver}
|
||||
Group: System Environment/Kernel
|
||||
License: GPLv2
|
||||
Summary: %{kmod_name}%{?bt_ext} kernel module(s)
|
||||
URL: http://www.intel.com/
|
||||
|
||||
BuildRequires: kernel%{?bt_ext}-devel, redhat-rpm-config, perl, openssl
|
||||
BuildRequires: elfutils-libelf-devel
|
||||
ExclusiveArch: x86_64
|
||||
|
||||
# Sources.
|
||||
Source0: %{kmod_name}-%{version}.tar.gz
|
||||
Source5: GPL-v2.0.txt
|
||||
Source11: modules-load.conf
|
||||
|
||||
%define kversion %(rpm -q kernel%{?bt_ext}-devel | sort --version-sort | tail -1 | sed 's/kernel%{?bt_ext}-devel-//')
|
||||
|
||||
%package -n kmod-e1000e%{?bt_ext}
|
||||
Summary: e1000e kernel module(s)
|
||||
Group: System Environment/Kernel
|
||||
%global _use_internal_dependency_generator 0
|
||||
Provides: kernel-modules >= %{kversion}
|
||||
Provides: e1000e-kmod = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Requires(post): /usr/sbin/depmod
|
||||
Requires(postun): /usr/sbin/depmod
|
||||
|
||||
%description -n kmod-e1000e%{?bt_ext}
|
||||
This package provides the e1000e kernel module(s) built
|
||||
for the Linux kernel using the %{_target_cpu} family of processors.
|
||||
|
||||
%post -n kmod-e1000e%{?bt_ext}
|
||||
echo "Working. This may take some time ..."
|
||||
if [ -e "/boot/System.map-%{kversion}" ]; then
|
||||
/usr/sbin/depmod -aeF "/boot/System.map-%{kversion}" "%{kversion}" > /dev/null || :
|
||||
fi
|
||||
echo "Done."
|
||||
|
||||
%preun -n kmod-e1000e%{?bt_ext}
|
||||
rpm -ql kmod-e1000e%{?bt_ext}-%{version}-%{release}.x86_64 | grep '\.ko$' > /var/run/rpm-kmod-e1000e%{?bt_ext}-modules
|
||||
|
||||
%postun -n kmod-e1000e%{?bt_ext}
|
||||
echo "Working. This may take some time ..."
|
||||
if [ -e "/boot/System.map-%{kversion}" ]; then
|
||||
/usr/sbin/depmod -aeF "/boot/System.map-%{kversion}" "%{kversion}" > /dev/null || :
|
||||
fi
|
||||
rm /var/run/rpm-kmod-e1000e%{?bt_ext}-modules
|
||||
echo "Done."
|
||||
|
||||
%files -n kmod-e1000e%{?bt_ext}
|
||||
%defattr(644,root,root,755)
|
||||
/lib/modules/%{kversion}/
|
||||
%doc /usr/share/doc/kmod-e1000e-%{version}/
|
||||
%doc /usr/share/man/man7/
|
||||
%{_sysconfdir}/modules-load.d/e1000e.conf
|
||||
|
||||
# Disable the building of the debug package(s).
|
||||
%define debug_package %{nil}
|
||||
|
||||
%description
|
||||
This package provides the %{kmod_name} kernel module(s).
|
||||
It is built to depend upon the specific ABI provided by a range of releases
|
||||
of the same variant of the Linux kernel and not on any one specific build.
|
||||
|
||||
%prep
|
||||
%autosetup -p 1 -n %{kmod_name}-%{version}
|
||||
%{__gzip} %{kmod_name}.7
|
||||
|
||||
%build
|
||||
pushd src >/dev/null
|
||||
%{__make} KSRC=%{_usrsrc}/kernels/%{kversion}
|
||||
popd >/dev/null
|
||||
|
||||
%install
|
||||
%{__install} -d %{buildroot}/lib/modules/%{kversion}/extra/%{kmod_name}/
|
||||
%{__install} src/%{kmod_name}.ko %{buildroot}/lib/modules/%{kversion}/extra/%{kmod_name}/
|
||||
%{__install} -d %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
|
||||
%{__install} %{SOURCE5} %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
|
||||
%{__install} pci.updates %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
|
||||
%{__install} README %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
|
||||
%{__install} -d %{buildroot}%{_mandir}/man7/
|
||||
%{__install} %{kmod_name}.7.gz %{buildroot}%{_mandir}/man7/
|
||||
%{__install} -d %{buildroot}%{_sysconfdir}/modules-load.d
|
||||
%{__install} -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/modules-load.d/e1000e.conf
|
||||
|
||||
# Strip the modules(s).
|
||||
find %{buildroot} -type f -name \*.ko -exec %{__strip} --strip-debug \{\} \;
|
||||
|
||||
# Always Sign the modules(s).
|
||||
# If the module signing keys are not defined, define them here.
|
||||
%{!?privkey: %define privkey /usr/src/kernels/%{kversion}/signing_key.pem}
|
||||
%{!?pubkey: %define pubkey /usr/src/kernels/%{kversion}/signing_key.x509}
|
||||
for module in $(find %{buildroot} -type f -name \*.ko);
|
||||
do /usr/src/kernels/%{kversion}/scripts/sign-file \
|
||||
sha256 %{privkey} %{pubkey} $module;
|
||||
done
|
||||
|
||||
%clean
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
%changelog
|
||||
* Fri Feb 24 2017 Matt Peters <matt.peters@windriver.com> 3.3.5.3
|
||||
- Initial RPM package
|
||||
|
@ -1,339 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
@ -1 +0,0 @@
|
||||
e1000e
|
@ -15,8 +15,14 @@ License: GPLv2
|
||||
Summary: %{kmod_name}%{?bt_ext} kernel module(s)
|
||||
URL: http://www.intel.com/
|
||||
|
||||
BuildRequires: kernel%{?bt_ext}-devel, redhat-rpm-config, perl, openssl
|
||||
BuildRequires: kernel%{?bt_ext}-devel, redhat-rpm-config, openssl
|
||||
BuildRequires: elfutils-libelf-devel
|
||||
%if 0%{?rhel} == 7
|
||||
BuildRequires: devtoolset-8-build
|
||||
BuildRequires: devtoolset-8-binutils
|
||||
BuildRequires: devtoolset-8-gcc
|
||||
BuildRequires: devtoolset-8-make
|
||||
%endif
|
||||
ExclusiveArch: x86_64
|
||||
|
||||
# Sources.
|
||||
@ -76,15 +82,27 @@ It is built to depend upon the specific ABI provided by a range of releases
|
||||
of the same variant of the Linux kernel and not on any one specific build.
|
||||
|
||||
%prep
|
||||
%if 0%{?rhel} == 7
|
||||
source scl_source enable devtoolset-8 || :
|
||||
source scl_source enable llvm-toolset-7.0 || :
|
||||
%endif
|
||||
%autosetup -p 1 -n %{kmod_name}-%{version}
|
||||
%{__gzip} %{kmod_name}.7
|
||||
|
||||
%build
|
||||
%if 0%{?rhel} == 7
|
||||
source scl_source enable devtoolset-8 || :
|
||||
source scl_source enable llvm-toolset-7.0 || :
|
||||
%endif
|
||||
pushd src >/dev/null
|
||||
%{__make} KSRC=%{_usrsrc}/kernels/%{kversion}
|
||||
popd >/dev/null
|
||||
|
||||
%install
|
||||
%if 0%{?rhel} == 7
|
||||
source scl_source enable devtoolset-8 || :
|
||||
source scl_source enable llvm-toolset-7.0 || :
|
||||
%endif
|
||||
%{__install} -d %{buildroot}/lib/modules/%{kversion}/extra/%{kmod_name}/
|
||||
%{__install} src/%{kmod_name}.ko %{buildroot}/lib/modules/%{kversion}/extra/%{kmod_name}/
|
||||
%{__install} -d %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
|
||||
|
@ -1,5 +1,6 @@
|
||||
COPY_LIST=" \
|
||||
$PKG_BASE/files/* \
|
||||
$DISTRO/patches/* \
|
||||
$STX_BASE/downloads/iavf-4.0.1.tar.gz"
|
||||
OPT_DEP_LIST_FOR_BUILD_TYPE[std]=$GIT_BASE/kernel-std
|
||||
OPT_DEP_LIST_FOR_BUILD_TYPE[rt]=$GIT_BASE/kernel-rt
|
||||
|
@ -15,8 +15,14 @@ License: GPLv2
|
||||
Summary: %{kmod_name} kernel module(s)
|
||||
URL: http://www.intel.com/
|
||||
|
||||
BuildRequires: kernel%{?bt_ext}-devel, redhat-rpm-config, perl, openssl
|
||||
BuildRequires: kernel%{?bt_ext}-devel, redhat-rpm-config, openssl
|
||||
BuildRequires: elfutils-libelf-devel
|
||||
%if 0%{?rhel} == 7
|
||||
BuildRequires: devtoolset-8-build
|
||||
BuildRequires: devtoolset-8-binutils
|
||||
BuildRequires: devtoolset-8-gcc
|
||||
BuildRequires: devtoolset-8-make
|
||||
%endif
|
||||
ExclusiveArch: x86_64
|
||||
|
||||
# Sources.
|
||||
@ -24,6 +30,8 @@ Source0: %{kmod_name}-%{version}.tar.gz
|
||||
Source5: GPL-v2.0.txt
|
||||
Source11: modules-load.conf
|
||||
|
||||
Patch01: 0001-Fix-build-issues.patch
|
||||
|
||||
%define kversion %(rpm -q kernel%{?bt_ext}-devel | sort --version-sort | tail -1 | sed 's/kernel%{?bt_ext}-devel-//')
|
||||
|
||||
%package -n kmod-iavf%{?bt_ext}
|
||||
@ -73,15 +81,27 @@ It is built to depend upon the specific ABI provided by a range of releases
|
||||
of the same variant of the Linux kernel and not on any one specific build.
|
||||
|
||||
%prep
|
||||
%if 0%{?rhel} == 7
|
||||
source scl_source enable devtoolset-8 || :
|
||||
source scl_source enable llvm-toolset-7.0 || :
|
||||
%endif
|
||||
%autosetup -p 1 -n %{kmod_name}-%{version}
|
||||
%{__gzip} %{kmod_name}.7
|
||||
|
||||
%build
|
||||
%if 0%{?rhel} == 7
|
||||
source scl_source enable devtoolset-8 || :
|
||||
source scl_source enable llvm-toolset-7.0 || :
|
||||
%endif
|
||||
pushd src >/dev/null
|
||||
%{__make} KSRC=%{_usrsrc}/kernels/%{kversion}
|
||||
popd >/dev/null
|
||||
|
||||
%install
|
||||
%if 0%{?rhel} == 7
|
||||
source scl_source enable devtoolset-8 || :
|
||||
source scl_source enable llvm-toolset-7.0 || :
|
||||
%endif
|
||||
%{__install} -d %{buildroot}/lib/modules/%{kversion}/extra/%{kmod_name}/
|
||||
%{__install} src/%{kmod_name}.ko %{buildroot}/lib/modules/%{kversion}/extra/%{kmod_name}/
|
||||
%{__install} -d %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
|
||||
|
@ -0,0 +1,50 @@
|
||||
From 5784019caaa7d4d33798be2e70ea5b63d9c5252a Mon Sep 17 00:00:00 2001
|
||||
From: Jiping Ma <jiping.ma2@windriver.com>
|
||||
Date: Tue, 29 Jun 2021 19:09:25 -0700
|
||||
Subject: [PATCH] Fix build issues
|
||||
|
||||
1. Deleted dma_zalloc_coherent() because it had been removed.
|
||||
dma_zalloc_coherent() is no longer needed as it has no users because
|
||||
dma_alloc_coherent() already zeroes out memory for us.
|
||||
2. Use smp_rmb() directly in 5.10 version.
|
||||
|
||||
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
|
||||
---
|
||||
src/iavf_helper.h | 5 -----
|
||||
src/iavf_txrx.c | 2 +-
|
||||
2 files changed, 1 insertion(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/iavf_helper.h b/src/iavf_helper.h
|
||||
index edfa216..de79f96 100644
|
||||
--- a/src/iavf_helper.h
|
||||
+++ b/src/iavf_helper.h
|
||||
@@ -21,13 +21,8 @@ inline int iavf_allocate_dma_mem_d(struct iavf_hw *hw,
|
||||
struct iavf_adapter *nf = (struct iavf_adapter *)hw->back;
|
||||
|
||||
mem->size = ALIGN(size, alignment);
|
||||
-#ifdef HAVE_DMA_ALLOC_COHERENT_ZEROES_MEM
|
||||
mem->va = dma_alloc_coherent(&nf->pdev->dev, mem->size,
|
||||
&mem->pa, GFP_KERNEL);
|
||||
-#else /* HAVE_DMA_ALLOC_COHERENT_ZEROES_MEM */
|
||||
- mem->va = dma_zalloc_coherent(&nf->pdev->dev, mem->size,
|
||||
- &mem->pa, GFP_KERNEL);
|
||||
-#endif /* HAVE_DMA_ALLOC_COHERENT_ZEROES_MEM */
|
||||
if (!mem->va)
|
||||
return -ENOMEM;
|
||||
|
||||
diff --git a/src/iavf_txrx.c b/src/iavf_txrx.c
|
||||
index 03c685c..da3cfed 100644
|
||||
--- a/src/iavf_txrx.c
|
||||
+++ b/src/iavf_txrx.c
|
||||
@@ -289,7 +289,7 @@ static bool iavf_clean_tx_irq(struct iavf_vsi *vsi,
|
||||
break;
|
||||
|
||||
/* prevent any other reads prior to eop_desc */
|
||||
- read_barrier_depends();
|
||||
+ smp_rmb();
|
||||
|
||||
iavf_trace(clean_tx_irq, tx_ring, tx_desc, tx_buf);
|
||||
/* if the descriptor isn't done, no work yet to do */
|
||||
--
|
||||
2.31.1
|
||||
|
@ -15,8 +15,14 @@ Summary: Intel(R) Ethernet Connection E800 Series Linux Driver
|
||||
URL: http://support.intel.com
|
||||
|
||||
|
||||
BuildRequires: kernel%{?bt_ext}-devel, redhat-rpm-config, perl, openssl, elfutils-libelf-devel
|
||||
BuildRequires: kernel%{?bt_ext}-devel, redhat-rpm-config, openssl, elfutils-libelf-devel
|
||||
Requires: kernel%{?bt_ext}-devel, findutils, gawk, bash
|
||||
%if 0%{?rhel} == 7
|
||||
BuildRequires: devtoolset-8-build
|
||||
BuildRequires: devtoolset-8-binutils
|
||||
BuildRequires: devtoolset-8-gcc
|
||||
BuildRequires: devtoolset-8-make
|
||||
%endif
|
||||
|
||||
%define kernel_module_package_buildreqs kernel%{?bt_ext}-devel
|
||||
|
||||
@ -43,14 +49,26 @@ This package provides the Intel(R) Ethernet Connection E800 Series Linux Driver,
|
||||
ice, built for the Linux kernel using the %{_target_cpu} family of processors.
|
||||
|
||||
%prep
|
||||
%if 0%{?rhel} == 7
|
||||
source scl_source enable devtoolset-8 || :
|
||||
source scl_source enable llvm-toolset-7.0 || :
|
||||
%endif
|
||||
%autosetup -p 1 -n %{kmod_name}-%{version}
|
||||
|
||||
%build
|
||||
%if 0%{?rhel} == 7
|
||||
source scl_source enable devtoolset-8 || :
|
||||
source scl_source enable llvm-toolset-7.0 || :
|
||||
%endif
|
||||
pushd src >/dev/null
|
||||
%{__make} KSRC=%{_usrsrc}/kernels/%{kversion}
|
||||
popd >/dev/null
|
||||
|
||||
%install
|
||||
%if 0%{?rhel} == 7
|
||||
source scl_source enable devtoolset-8 || :
|
||||
source scl_source enable llvm-toolset-7.0 || :
|
||||
%endif
|
||||
%{__install} -d %{buildroot}/lib/modules/%{kversion}/extra/%{kmod_name}/
|
||||
%{__install} src/%{kmod_name}.ko %{buildroot}/lib/modules/%{kversion}/extra/%{kmod_name}/
|
||||
%{__install} -d %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
|
||||
|
@ -1,6 +1,6 @@
|
||||
COPY_LIST=" \
|
||||
$PKG_BASE/files/* \
|
||||
$STX_BASE/downloads/dpdk-20.05.tar.gz"
|
||||
$STX_BASE/downloads/dpdk-kmods-2a9f0f72a2d926382634cf8f1de10e1acf57542b.tar.gz"
|
||||
OPT_DEP_LIST_FOR_BUILD_TYPE[std]=$GIT_BASE/kernel-std
|
||||
OPT_DEP_LIST_FOR_BUILD_TYPE[rt]=$GIT_BASE/kernel-rt
|
||||
BASE_SRCREV_FOR_PATH[$GIT_BASE/kernel-std]=145ff64b9734e5c45cfd8eb837a04e257b4b9581
|
||||
|
@ -8,39 +8,26 @@
|
||||
%define kmod_name igb_uio
|
||||
|
||||
Name: %{kmod_name}-kmod%{?bt_ext}
|
||||
Version: 20.05
|
||||
Version: 21.02
|
||||
Release: 0%{?_tis_dist}.%{tis_patch_ver}
|
||||
Group: System Environment/Kernel
|
||||
License: GPLv2
|
||||
Summary: %{kmod_name} kernel module(s)
|
||||
URL: http://www.intel.com/
|
||||
|
||||
BuildRequires: kernel%{?bt_ext}-devel, redhat-rpm-config, perl, openssl
|
||||
BuildRequires: elfutils-libelf-devel
|
||||
BuildRequires: gcc
|
||||
BuildRequires: glibc-headers
|
||||
BuildRequires: numactl-devel
|
||||
BuildRequires: libmnl-devel
|
||||
ExclusiveArch: x86_64
|
||||
|
||||
# Get the kernel headers version installed, not based on uname.
|
||||
%define KERNEL_VERSION %(rpm -q kernel%{?bt_ext}-devel | sort --version-sort | tail -1 | sed 's/kernel%{?bt_ext}-devel-//')
|
||||
%define DPDK_TARGET_MACHINE default
|
||||
%define STAGING_KERNEL_DIR /usr/src/kernels/%{KERNEL_VERSION}/
|
||||
%define DPDK_EXTRA_CFLAGS "-fPIC -g -msse4.2"
|
||||
%define DPDK_TARGET x86_64-native-linuxapp-gcc
|
||||
|
||||
%define EXTRA_OEMAKE prefix= \\\
|
||||
TARGET_LDFLAGS= \\\
|
||||
TARGET_CFLAGS= \\\
|
||||
RTE_KERNELDIR=%{STAGING_KERNEL_DIR} \\\
|
||||
EXTRA_CFLAGS=%{DPDK_EXTRA_CFLAGS} \\\
|
||||
RTE_TARGET=%{DPDK_TARGET} \\\
|
||||
GCC_MAJOR_VERSION="%(gcc -dumpversion | cut -f1 -d.)" \\\
|
||||
GCC_MINOR_VERSION="%(gcc -dumpversion | cut -f2 -d.)"
|
||||
BuildRequires: kernel%{?bt_ext}-devel, openssl, redhat-rpm-config
|
||||
%if 0%{?rhel} == 7
|
||||
BuildRequires: devtoolset-8-build
|
||||
BuildRequires: devtoolset-8-binutils
|
||||
BuildRequires: devtoolset-8-gcc
|
||||
BuildRequires: devtoolset-8-make
|
||||
%endif
|
||||
|
||||
ExclusiveArch: x86_64 i686 aarch64 ppc64le
|
||||
|
||||
# Sources.
|
||||
Source0: dpdk-%{version}.tar.gz
|
||||
Source0: dpdk-kmods-2a9f0f72a2d926382634cf8f1de10e1acf57542b.tar.gz
|
||||
|
||||
%define kversion %(rpm -q kernel%{?bt_ext}-devel | sort --version-sort | tail -1 | sed 's/kernel%{?bt_ext}-devel-//')
|
||||
|
||||
@ -78,10 +65,6 @@ echo "Done."
|
||||
%files -n kmod-igb_uio%{?bt_ext}
|
||||
%defattr(644,root,root,755)
|
||||
/lib/modules/%{kversion}/
|
||||
%doc /usr/share/doc/kmod-igb_uio-%{version}/
|
||||
%defattr(755,root,root,755)
|
||||
%{_datadir}/starlingx/scripts/dpdk-devbind.py
|
||||
%exclude %{_datadir}/starlingx/scripts/*.py[oc]
|
||||
|
||||
# Disable the building of the debug package(s).
|
||||
%define debug_package %{nil}
|
||||
@ -92,26 +75,21 @@ It is built to depend upon the specific ABI provided by a range of releases
|
||||
of the same variant of the Linux kernel and not on any one specific build.
|
||||
|
||||
%prep
|
||||
%autosetup -p 1 -n dpdk-%{version}
|
||||
%autosetup -p 1 -n dpdk-kmods
|
||||
|
||||
%build
|
||||
make T=%{DPDK_TARGET} config
|
||||
%if 0%{?rhel} == 7
|
||||
source scl_source enable devtoolset-8 || :
|
||||
source scl_source enable llvm-toolset-7.0 || :
|
||||
%endif
|
||||
|
||||
# This line changes default compiler flags from native to proper value
|
||||
sed -i 's/"native"/"%{DPDK_TARGET_MACHINE}"/' build/.config
|
||||
sed -i 's/CONFIG_RTE_EAL_IGB_UIO=n/CONFIG_RTE_EAL_IGB_UIO=y/' build/.config
|
||||
|
||||
make %{?_smp_mflags} %{EXTRA_OEMAKE}
|
||||
ls build/kmod/
|
||||
cd linux/igb_uio
|
||||
%{__make} KSRC=%{_usrsrc}/kernels/%{kversion}
|
||||
|
||||
%install
|
||||
find . -name *.ko
|
||||
%{__install} -d %{buildroot}/lib/modules/%{kversion}/extra/%{kmod_name}/
|
||||
%{__install} build/kmod/%{kmod_name}.ko %{buildroot}/lib/modules/%{kversion}/extra/%{kmod_name}/
|
||||
%{__install} -d %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
|
||||
%{__install} license/gpl-2.0.txt %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
|
||||
%{__install} -d %{buildroot}%{_datadir}/starlingx/scripts
|
||||
%{__install} -m755 usertools/dpdk-devbind.py %{buildroot}%{_datadir}/starlingx/scripts/dpdk-devbind.py
|
||||
%{__install} linux/igb_uio/%{kmod_name}.ko %{buildroot}/lib/modules/%{kversion}/extra/%{kmod_name}/
|
||||
|
||||
# Strip the modules(s).
|
||||
find %{buildroot} -type f -name \*.ko -exec %{__strip} --strip-debug \{\} \;
|
||||
@ -129,5 +107,7 @@ done
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
%changelog
|
||||
* Mon Apr 26 2021 Jiping Ma <jiping.ma2@windriver.com> - 21.02
|
||||
- Up to version 21.02, based on Linux kernel 5.10.
|
||||
* Wed Jun 03 2020 Steven Webster <steven.webster@windriver.com> - 20.05-1
|
||||
- Initial RPM package, based on Starlingx iavf-kmod.
|
||||
|
@ -1,9 +0,0 @@
|
||||
COPY_LIST=" \
|
||||
$PKG_BASE/files/* \
|
||||
$STX_BASE/downloads/ixgbe-5.6.5.tar.gz"
|
||||
OPT_DEP_LIST_FOR_BUILD_TYPE[std]=$GIT_BASE/kernel-std
|
||||
OPT_DEP_LIST_FOR_BUILD_TYPE[rt]=$GIT_BASE/kernel-rt
|
||||
BASE_SRCREV_FOR_PATH[$GIT_BASE/kernel-std]=145ff64b9734e5c45cfd8eb837a04e257b4b9581
|
||||
BASE_SRCREV_FOR_PATH[$GIT_BASE/kernel-rt]=c0fee2da8ef34aa816ddd76690ed425b2ff94c90
|
||||
PKG_BASE_SRCREV=04704ebb785074dbb38b65f9d9457b6e8c2a11c6
|
||||
TIS_PATCH_VER=PKG_GITREVCOUNT+OTHER_GITREVCOUNT+1
|
@ -1,113 +0,0 @@
|
||||
%if "%{?_tis_build_type}" == "rt"
|
||||
%define bt_ext -rt
|
||||
%else
|
||||
%undefine bt_ext
|
||||
%endif
|
||||
|
||||
# Define the kmod package name here.
|
||||
%define kmod_name ixgbe
|
||||
|
||||
Name: %{kmod_name}-kmod%{?bt_ext}
|
||||
Version: 5.6.5
|
||||
Release: 0%{?_tis_dist}.%{tis_patch_ver}
|
||||
Group: System Environment/Kernel
|
||||
License: GPLv2
|
||||
Summary: %{kmod_name} kernel module(s)
|
||||
URL: http://www.intel.com/
|
||||
|
||||
BuildRequires: kernel%{?bt_ext}-devel, redhat-rpm-config, perl, openssl
|
||||
BuildRequires: elfutils-libelf-devel
|
||||
ExclusiveArch: x86_64
|
||||
|
||||
# Sources.
|
||||
Source0: %{kmod_name}-%{version}.tar.gz
|
||||
Source5: GPL-v2.0.txt
|
||||
Source11: modules-load.conf
|
||||
|
||||
#Patch01: first-patch-would-go-here.patch
|
||||
|
||||
%define kversion %(rpm -q kernel%{?bt_ext}-devel | sort --version-sort | tail -1 | sed 's/kernel%{?bt_ext}-devel-//')
|
||||
|
||||
%package -n kmod-ixgbe%{?bt_ext}
|
||||
Summary: ixgbe kernel module(s)
|
||||
Group: System Environment/Kernel
|
||||
%global _use_internal_dependency_generator 0
|
||||
Provides: kernel-modules >= %{kversion}
|
||||
Provides: ixgbe-kmod = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Requires(post): /usr/sbin/depmod
|
||||
Requires(postun): /usr/sbin/depmod
|
||||
BuildRequires: kernel%{?bt_ext}-devel
|
||||
%description -n kmod-ixgbe%{?bt_ext}
|
||||
This package provides the ixgbe kernel module(s) built
|
||||
for the Linux kernel using the %{_target_cpu} family of processors.
|
||||
%post -n kmod-ixgbe%{?bt_ext}
|
||||
echo "Working. This may take some time ..."
|
||||
if [ -e "/boot/System.map-%{kversion}" ]; then
|
||||
/usr/sbin/depmod -aeF "/boot/System.map-%{kversion}" "%{kversion}" > /dev/null || :
|
||||
fi
|
||||
echo "Done."
|
||||
%preun -n kmod-ixgbe%{?bt_ext}
|
||||
rpm -ql kmod-ixgbe%{?bt_ext}-%{version}-%{release}.x86_64 | grep '\.ko$' > /var/run/rpm-kmod-ixgbe%{?bt_ext}-modules
|
||||
%postun -n kmod-ixgbe%{?bt_ext}
|
||||
echo "Working. This may take some time ..."
|
||||
if [ -e "/boot/System.map-%{kversion}" ]; then
|
||||
/usr/sbin/depmod -aeF "/boot/System.map-%{kversion}" "%{kversion}" > /dev/null || :
|
||||
fi
|
||||
rm /var/run/rpm-kmod-ixgbe%{?bt_ext}-modules
|
||||
echo "Done."
|
||||
%files -n kmod-ixgbe%{?bt_ext}
|
||||
%defattr(644,root,root,755)
|
||||
/lib/modules/%{kversion}/
|
||||
%doc /usr/share/doc/kmod-ixgbe-%{version}/
|
||||
%doc /usr/share/man/man7/
|
||||
%{_sysconfdir}/modules-load.d/ixgbe.conf
|
||||
|
||||
|
||||
# Disable the building of the debug package(s).
|
||||
%define debug_package %{nil}
|
||||
|
||||
%description
|
||||
This package provides the %{kmod_name} kernel module(s).
|
||||
It is built to depend upon the specific ABI provided by a range of releases
|
||||
of the same variant of the Linux kernel and not on any one specific build.
|
||||
|
||||
%prep
|
||||
%autosetup -p 1 -n %{kmod_name}-%{version}
|
||||
%{__gzip} %{kmod_name}.7
|
||||
|
||||
%build
|
||||
pushd src >/dev/null
|
||||
%{__make} KSRC=%{_usrsrc}/kernels/%{kversion}
|
||||
popd >/dev/null
|
||||
|
||||
%install
|
||||
%{__install} -d %{buildroot}/lib/modules/%{kversion}/extra/%{kmod_name}/
|
||||
%{__install} src/%{kmod_name}.ko %{buildroot}/lib/modules/%{kversion}/extra/%{kmod_name}/
|
||||
%{__install} -d %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
|
||||
%{__install} %{SOURCE5} %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
|
||||
%{__install} pci.updates %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
|
||||
%{__install} README %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
|
||||
%{__install} -d %{buildroot}%{_mandir}/man7/
|
||||
%{__install} %{kmod_name}.7.gz %{buildroot}%{_mandir}/man7/
|
||||
%{__install} -d %{buildroot}%{_sysconfdir}/modules-load.d
|
||||
%{__install} -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/modules-load.d/ixgbe.conf
|
||||
|
||||
# Strip the modules(s).
|
||||
find %{buildroot} -type f -name \*.ko -exec %{__strip} --strip-debug \{\} \;
|
||||
|
||||
# Always Sign the modules(s).
|
||||
# If the module signing keys are not defined, define them here.
|
||||
%{!?privkey: %define privkey /usr/src/kernels/%{kversion}/signing_key.pem}
|
||||
%{!?pubkey: %define pubkey /usr/src/kernels/%{kversion}/signing_key.x509}
|
||||
for module in $(find %{buildroot} -type f -name \*.ko);
|
||||
do /usr/src/kernels/%{kversion}/scripts/sign-file \
|
||||
sha256 %{privkey} %{pubkey} $module;
|
||||
done
|
||||
|
||||
%clean
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
%changelog
|
||||
* Thu Feb 11 2016 Matthias Saou <matthias@saou.eu> 1.4.25-1
|
||||
- Initial RPM package, based on elrepo.org's ixgbe one.
|
||||
|
@ -1,339 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
@ -1 +0,0 @@
|
||||
ixgbe
|
@ -1,9 +0,0 @@
|
||||
COPY_LIST=" \
|
||||
$PKG_BASE/files/* \
|
||||
$STX_BASE/downloads/ixgbevf-4.6.3.tar.gz"
|
||||
OPT_DEP_LIST_FOR_BUILD_TYPE[std]=$GIT_BASE/kernel-std
|
||||
OPT_DEP_LIST_FOR_BUILD_TYPE[rt]=$GIT_BASE/kernel-rt
|
||||
BASE_SRCREV_FOR_PATH[$GIT_BASE/kernel-std]=145ff64b9734e5c45cfd8eb837a04e257b4b9581
|
||||
BASE_SRCREV_FOR_PATH[$GIT_BASE/kernel-rt]=c0fee2da8ef34aa816ddd76690ed425b2ff94c90
|
||||
PKG_BASE_SRCREV=04704ebb785074dbb38b65f9d9457b6e8c2a11c6
|
||||
TIS_PATCH_VER=PKG_GITREVCOUNT+OTHER_GITREVCOUNT+1
|
@ -1,111 +0,0 @@
|
||||
%if "%{?_tis_build_type}" == "rt"
|
||||
%define bt_ext -rt
|
||||
%else
|
||||
%undefine bt_ext
|
||||
%endif
|
||||
|
||||
# Define the kmod package name here.
|
||||
%define kmod_name ixgbevf
|
||||
|
||||
Name: %{kmod_name}-kmod%{?bt_ext}
|
||||
Version: 4.6.3
|
||||
Release: 0%{?_tis_dist}.%{tis_patch_ver}
|
||||
Group: System Environment/Kernel
|
||||
License: GPLv2
|
||||
Summary: %{kmod_name} kernel module(s)
|
||||
URL: http://www.intel.com/
|
||||
|
||||
BuildRequires: kernel%{?bt_ext}-devel, redhat-rpm-config, perl, openssl
|
||||
BuildRequires: elfutils-libelf-devel
|
||||
ExclusiveArch: x86_64
|
||||
|
||||
# Sources.
|
||||
Source0: %{kmod_name}-%{version}.tar.gz
|
||||
Source5: GPL-v2.0.txt
|
||||
Source11: modules-load.conf
|
||||
|
||||
%define kversion %(rpm -q kernel%{?bt_ext}-devel | sort --version-sort | tail -1 | sed 's/kernel%{?bt_ext}-devel-//')
|
||||
|
||||
%package -n kmod-ixgbevf%{?bt_ext}
|
||||
Summary: ixgbevf kernel module(s)
|
||||
Group: System Environment/Kernel
|
||||
%global _use_internal_dependency_generator 0
|
||||
Provides: kernel-modules >= %{kversion}
|
||||
Provides: ixgbevf-kmod = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Requires(post): /usr/sbin/depmod
|
||||
Requires(postun): /usr/sbin/depmod
|
||||
BuildRequires: kernel%{?bt_ext}-devel
|
||||
%description -n kmod-ixgbevf%{?bt_ext}
|
||||
This package provides the ixgbevf kernel module(s) built
|
||||
for the Linux kernel using the %{_target_cpu} family of processors.
|
||||
%post -n kmod-ixgbevf%{?bt_ext}
|
||||
echo "Working. This may take some time ..."
|
||||
if [ -e "/boot/System.map-%{kversion}" ]; then
|
||||
/usr/sbin/depmod -aeF "/boot/System.map-%{kversion}" "%{kversion}" > /dev/null || :
|
||||
fi
|
||||
echo "Done."
|
||||
%preun -n kmod-ixgbevf%{?bt_ext}
|
||||
rpm -ql kmod-ixgbevf%{?bt_ext}-%{version}-%{release}.x86_64 | grep '\.ko$' > /var/run/rpm-kmod-ixgbevf%{?bt_ext}-modules
|
||||
%postun -n kmod-ixgbevf%{?bt_ext}
|
||||
echo "Working. This may take some time ..."
|
||||
if [ -e "/boot/System.map-%{kversion}" ]; then
|
||||
/usr/sbin/depmod -aeF "/boot/System.map-%{kversion}" "%{kversion}" > /dev/null || :
|
||||
fi
|
||||
rm /var/run/rpm-kmod-ixgbevf%{?bt_ext}-modules
|
||||
echo "Done."
|
||||
%files -n kmod-ixgbevf%{?bt_ext}
|
||||
%defattr(644,root,root,755)
|
||||
/lib/modules/%{kversion}/
|
||||
%doc /usr/share/doc/kmod-ixgbevf-%{version}/
|
||||
%doc /usr/share/man/man7/
|
||||
%{_sysconfdir}/modules-load.d/ixgbevf.conf
|
||||
|
||||
|
||||
# Disable the building of the debug package(s).
|
||||
%define debug_package %{nil}
|
||||
|
||||
%description
|
||||
This package provides the %{kmod_name} kernel module(s).
|
||||
It is built to depend upon the specific ABI provided by a range of releases
|
||||
of the same variant of the Linux kernel and not on any one specific build.
|
||||
|
||||
%prep
|
||||
%autosetup -p 1 -n %{kmod_name}-%{version}
|
||||
%{__gzip} %{kmod_name}.7
|
||||
|
||||
%build
|
||||
pushd src >/dev/null
|
||||
%{__make} KSRC=%{_usrsrc}/kernels/%{kversion}
|
||||
popd >/dev/null
|
||||
|
||||
%install
|
||||
%{__install} -d %{buildroot}/lib/modules/%{kversion}/extra/%{kmod_name}/
|
||||
%{__install} src/%{kmod_name}.ko %{buildroot}/lib/modules/%{kversion}/extra/%{kmod_name}/
|
||||
%{__install} -d %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
|
||||
%{__install} %{SOURCE5} %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
|
||||
%{__install} pci.updates %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
|
||||
%{__install} README %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
|
||||
%{__install} -d %{buildroot}%{_mandir}/man7/
|
||||
%{__install} %{kmod_name}.7.gz %{buildroot}%{_mandir}/man7/
|
||||
%{__install} -d %{buildroot}%{_sysconfdir}/modules-load.d
|
||||
%{__install} -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/modules-load.d/ixgbevf.conf
|
||||
|
||||
# Strip the modules(s).
|
||||
find %{buildroot} -type f -name \*.ko -exec %{__strip} --strip-debug \{\} \;
|
||||
|
||||
# Always Sign the modules(s).
|
||||
# If the module signing keys are not defined, define them here.
|
||||
%{!?privkey: %define privkey /usr/src/kernels/%{kversion}/signing_key.pem}
|
||||
%{!?pubkey: %define pubkey /usr/src/kernels/%{kversion}/signing_key.x509}
|
||||
for module in $(find %{buildroot} -type f -name \*.ko);
|
||||
do /usr/src/kernels/%{kversion}/scripts/sign-file \
|
||||
sha256 %{privkey} %{pubkey} $module;
|
||||
done
|
||||
|
||||
%clean
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
%changelog
|
||||
* Thu Feb 11 2016 Matthias Saou <matthias@saou.eu> 1.4.25-1
|
||||
- Initial RPM package, based on elrepo.org's ixgbevf one.
|
||||
|
@ -1,339 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
@ -1 +0,0 @@
|
||||
ixgbevf
|
@ -1,6 +1,5 @@
|
||||
COPY_LIST=" \
|
||||
$PATCHES_BASE/* \
|
||||
$STX_BASE/downloads/opae-intel-fpga-driver-2.0.1-8.tar.gz"
|
||||
$PATCHES_BASE/* "
|
||||
OPT_DEP_LIST_FOR_BUILD_TYPE[std]=$GIT_BASE/kernel-std
|
||||
OPT_DEP_LIST_FOR_BUILD_TYPE[rt]=$GIT_BASE/kernel-rt
|
||||
BASE_SRCREV_FOR_PATH[$GIT_BASE/kernel-std]=b3b85950aecb5fef6902d4dfcf578b402ec6a69d
|
||||
|
@ -1,108 +0,0 @@
|
||||
%if "%{?_tis_build_type}" == "rt"
|
||||
%define bt_ext -rt
|
||||
%else
|
||||
%undefine bt_ext
|
||||
%endif
|
||||
|
||||
# Define the kmod package name here.
|
||||
%define kmod_name opae-intel-fpga-driver
|
||||
# If a release doesn't have an iteration number, just use 0
|
||||
%define iteration 8
|
||||
|
||||
Name: %{kmod_name}-kmod%{?bt_ext}
|
||||
Version: 2.0.1
|
||||
Release: %{iteration}%{?_tis_dist}.%{tis_patch_ver}
|
||||
Group: System Environment/Kernel
|
||||
License: GPLv2
|
||||
Summary: %{kmod_name}%{?bt_ext} kernel module(s)
|
||||
URL: http://www.intel.com/
|
||||
|
||||
BuildRequires: kernel%{?bt_ext}-devel, redhat-rpm-config, perl, openssl, elfutils-libelf-devel
|
||||
ExclusiveArch: x86_64
|
||||
|
||||
# Sources.
|
||||
# The source tarball name may or may not include the iteration number.
|
||||
Source0: %{kmod_name}-%{version}-%{iteration}.tar.gz
|
||||
Patch01: Remove-regmap-mmio-as-it-is-built-into-the-kernel.patch
|
||||
Patch02: Fix-compile-error-with-CentOS-8.1-4.18.0-147-kernel.patch
|
||||
Patch03: Fix-wrong-kernel-version.patch
|
||||
|
||||
%define kversion %(rpm -q kernel%{?bt_ext}-devel | sort --version-sort | tail -1 | sed 's/kernel%{?bt_ext}-devel-//')
|
||||
|
||||
%package -n kmod-opae-fpga-driver%{?bt_ext}
|
||||
Summary: OPAE fpga driver kernel module(s)
|
||||
Group: System Environment/Kernel
|
||||
%global _use_internal_dependency_generator 0
|
||||
Provides: kernel-modules >= %{kversion}
|
||||
Provides: opae-intel-fpga-driver-kmod = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Requires(post): /usr/sbin/depmod
|
||||
Requires(postun): /usr/sbin/depmod
|
||||
|
||||
%description -n kmod-opae-fpga-driver%{?bt_ext}
|
||||
This package provides the opae-fpga-driver kernel module(s) built
|
||||
for the Linux kernel using the %{_target_cpu} family of processors.
|
||||
|
||||
%post -n kmod-opae-fpga-driver%{?bt_ext}
|
||||
echo "Working. This may take some time ..."
|
||||
if [ -e "/boot/System.map-%{kversion}" ]; then
|
||||
/usr/sbin/depmod -aeF "/boot/System.map-%{kversion}" "%{kversion}" > /dev/null || :
|
||||
fi
|
||||
echo "Done."
|
||||
|
||||
%preun -n kmod-opae-fpga-driver%{?bt_ext}
|
||||
rpm -ql kmod-opae-fpga-driver%{?bt_ext}-%{version}-%{release}.x86_64 | grep '\.ko$' > /var/run/rpm-kmod-opae-fpga-driver%{?bt_ext}-modules
|
||||
|
||||
%postun -n kmod-opae-fpga-driver%{?bt_ext}
|
||||
echo "Working. This may take some time ..."
|
||||
if [ -e "/boot/System.map-%{kversion}" ]; then
|
||||
/usr/sbin/depmod -aeF "/boot/System.map-%{kversion}" "%{kversion}" > /dev/null || :
|
||||
fi
|
||||
rm /var/run/rpm-kmod-opae-fpga-driver%{?bt_ext}-modules
|
||||
echo "Done."
|
||||
|
||||
%files -n kmod-opae-fpga-driver%{?bt_ext}
|
||||
%defattr(644,root,root,755)
|
||||
/lib/modules/%{kversion}/
|
||||
%doc /usr/share/doc/kmod-%{kmod_name}-%{version}/
|
||||
|
||||
# Disable the building of the debug package(s).
|
||||
%define debug_package %{nil}
|
||||
|
||||
%description
|
||||
This package provides the %{kmod_name} kernel module(s).
|
||||
It is built to depend upon the specific ABI provided by a range of releases
|
||||
of the same variant of the Linux kernel and not on any one specific build.
|
||||
|
||||
%prep
|
||||
%autosetup -p 1 -n %{kmod_name}-%{version}-%{iteration}
|
||||
%{__gzip} %{kmod_name}.7
|
||||
|
||||
%build
|
||||
%{__make} KERNELDIR=%{_usrsrc}/kernels/%{kversion}
|
||||
|
||||
%install
|
||||
%{__install} -d %{buildroot}/lib/modules/%{kversion}/extra/%{kmod_name}/
|
||||
%{__install} %{_builddir}/%{kmod_name}-%{version}-%{iteration}/*.ko %{buildroot}/lib/modules/%{kversion}/extra/%{kmod_name}/
|
||||
%{__install} -d %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
|
||||
%{__install} LICENSE %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
|
||||
%{__install} COPYING %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
|
||||
%{__install} -d %{buildroot}%{_sysconfdir}/modules-load.d
|
||||
|
||||
# Strip the modules(s).
|
||||
find %{buildroot} -type f -name \*.ko -exec %{__strip} --strip-debug \{\} \;
|
||||
|
||||
# Always Sign the modules(s).
|
||||
# If the module signing keys are not defined, define them here.
|
||||
%{!?privkey: %define privkey /usr/src/kernels/%{kversion}/signing_key.pem}
|
||||
%{!?pubkey: %define pubkey /usr/src/kernels/%{kversion}/signing_key.x509}
|
||||
for module in $(find %{buildroot} -type f -name \*.ko);
|
||||
do /usr/src/kernels/%{kversion}/scripts/sign-file \
|
||||
sha256 %{privkey} %{pubkey} $module;
|
||||
done
|
||||
|
||||
%clean
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
%changelog
|
||||
* Thu Feb 11 2016 Matthias Saou <matthias@saou.eu> 1.4.25-1
|
||||
- Initial RPM package, based on elrepo.org's ixgbe one.
|
@ -0,0 +1,52 @@
|
||||
From 70669797bbce2b74a78fb777d7acb87d93fee752 Mon Sep 17 00:00:00 2001
|
||||
From: Jiping Ma <jiping.ma2@windriver.com>
|
||||
Date: Sun, 27 Jun 2021 23:52:04 -0700
|
||||
Subject: [PATCH 2/2] Fix build issues
|
||||
|
||||
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
|
||||
---
|
||||
opae-intel-fpga-driver.spec | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/SPECS/opae-intel-fpga-driver.spec b/SPECS/opae-intel-fpga-driver.spec
|
||||
index 48f0590..3701475 100755
|
||||
--- a/SPECS/opae-intel-fpga-driver.spec
|
||||
+++ b/SPECS/opae-intel-fpga-driver.spec
|
||||
@@ -42,6 +42,8 @@ BuildRequires: kernel%{?bt_ext}-devel
|
||||
%endif
|
||||
Requires: dkms, gcc, kernel%{?bt_ext}-devel, make
|
||||
%define debug_package ${nil}
|
||||
+Patch0001: Fix-build-errors.patch
|
||||
+Patch0002: use-altera.h-from-driver-instead-of-from-kernel.patch
|
||||
|
||||
%package -n kmod-opae-fpga-driver%{?bt_ext}
|
||||
Summary: OPAE modules files
|
||||
@@ -74,6 +76,8 @@ source scl_source enable devtoolset-8 || :
|
||||
source scl_source enable llvm-toolset-7.0 || :
|
||||
%endif
|
||||
%setup -q -n %{kmod_name}-%{version}
|
||||
+%patch0001 -p1
|
||||
+%patch0002 -p1
|
||||
|
||||
%description
|
||||
OPAE Driver
|
||||
@@ -240,13 +244,15 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files -n kmod-opae-fpga-driver%{?bt_ext}
|
||||
%defattr(-,root,root)
|
||||
-/usr/src/%{kmod_name}-%{version}-%{_release}
|
||||
+/lib/modules
|
||||
+/etc/udev
|
||||
|
||||
%files -n kmod-opae-fpga-driver%{?bt_ext}-devel
|
||||
#/usr/include/*
|
||||
|
||||
%files -n kmod-opae-fpga-driver%{?bt_ext}-prebuilt
|
||||
%defattr(-,root,root)
|
||||
+/usr/src/%{kmod_name}-%{version}-%{_release}
|
||||
/lib/modules
|
||||
/etc/udev
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
@ -0,0 +1,2 @@
|
||||
Support-TiS-system-and-devtoolset-8.patch
|
||||
Fix-build-issues.patch
|
@ -0,0 +1,290 @@
|
||||
From 0bafdeac82f1f1544b73c5d55521e694cfa2a4ac Mon Sep 17 00:00:00 2001
|
||||
From: Jiping Ma <jiping.ma2@windriver.com>
|
||||
Date: Tue, 22 Jun 2021 23:40:36 -0700
|
||||
Subject: [PATCH 1/2] Support-TiS-system and devtoolset-8
|
||||
|
||||
Support-TiS-system and build with devtoolset-8, also
|
||||
change package name from opae-intel-fpga-driver to
|
||||
kmod-opae-fpga-driver.
|
||||
|
||||
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
|
||||
---
|
||||
opae-intel-fpga-driver.spec | 157 ++++++++++++++++++++++--------------
|
||||
1 file changed, 97 insertions(+), 60 deletions(-)
|
||||
|
||||
diff --git a/SPECS/opae-intel-fpga-driver.spec b/SPECS/opae-intel-fpga-driver.spec
|
||||
index c8374d8..48f0590 100755
|
||||
--- a/SPECS/opae-intel-fpga-driver.spec
|
||||
+++ b/SPECS/opae-intel-fpga-driver.spec
|
||||
@@ -1,19 +1,35 @@
|
||||
#
|
||||
# OPAE Drivers rpm .spec file
|
||||
#
|
||||
+%if "%{?_tis_build_type}" == "rt"
|
||||
+%define bt_ext -rt
|
||||
+%else
|
||||
+%undefine bt_ext
|
||||
+%endif
|
||||
+
|
||||
+# Define the kmod package name here.
|
||||
+%define kmod_name opae-intel-fpga-driver
|
||||
+
|
||||
Summary: Create OPAE Driver source and binary rpm packages.
|
||||
-Name: opae-intel-fpga-driver
|
||||
+Name: opae-intel-fpga-driver%{?bt_ext}
|
||||
Version: 2.0.1
|
||||
-Release: 10
|
||||
+%define _release 10
|
||||
+Release: %{_release}%{?_tis_dist}.%{tis_patch_ver}
|
||||
License: GPL V2
|
||||
Group: Applications/System
|
||||
Distribution: CentOS Linux
|
||||
Vendor: Intel Corporation
|
||||
-Source: %{name}-%{version}.tar.gz
|
||||
+Source: %{kmod_name}-%{version}.tar.gz
|
||||
Exclusiveos: linux
|
||||
ExclusiveArch: i386 i586 i686 x86_64
|
||||
-Buildroot: %{_builddir}/%{name}-%{version}
|
||||
-BuildRequires: kernel-headers, kernel-devel, tar, gcc, make
|
||||
+Buildroot: %{_builddir}/%{kmod_name}-%{version}
|
||||
+BuildRequires: kernel%{?bt_ext}-devel, tar, gcc, make
|
||||
+%if 0%{?rhel} == 7
|
||||
+BuildRequires: devtoolset-8-build
|
||||
+BuildRequires: devtoolset-8-binutils
|
||||
+BuildRequires: devtoolset-8-gcc
|
||||
+BuildRequires: devtoolset-8-make
|
||||
+%endif
|
||||
#BuildRequires: osv-linux4.14-devel
|
||||
#BuildRequires: osv-linux4.16-devel
|
||||
#BuildRequires: osv-linux4.19-devel
|
||||
@@ -21,40 +37,58 @@ BuildRequires: kernel-headers, kernel-devel, tar, gcc, make
|
||||
BuildRequires: kernel-default-devel
|
||||
%else
|
||||
%if %{?_vendor} != "clr"
|
||||
-BuildRequires: kernel-devel
|
||||
+BuildRequires: kernel%{?bt_ext}-devel
|
||||
%endif
|
||||
%endif
|
||||
-Requires: dkms, gcc, kernel-devel, make
|
||||
+Requires: dkms, gcc, kernel%{?bt_ext}-devel, make
|
||||
%define debug_package ${nil}
|
||||
|
||||
-%package devel
|
||||
+%package -n kmod-opae-fpga-driver%{?bt_ext}
|
||||
+Summary: OPAE modules files
|
||||
+Group: Applications/System
|
||||
+%description -n kmod-opae-fpga-driver%{?bt_ext}
|
||||
+OPAE Modules files
|
||||
+
|
||||
+%package -n kmod-opae-fpga-driver%{?bt_ext}-devel
|
||||
Summary: OPAE modules devel files
|
||||
Group: Applications/System
|
||||
-%description devel
|
||||
+%description -n kmod-opae-fpga-driver%{?bt_ext}-devel
|
||||
OPAE Modules Development files
|
||||
|
||||
-%package prebuilt
|
||||
+%package -n kmod-opae-fpga-driver%{?bt_ext}-prebuilt
|
||||
Summary: Prebuilt OPAE drivers for common kernels
|
||||
Group: Applications/System
|
||||
-%description prebuilt
|
||||
+%description -n kmod-opae-fpga-driver%{?bt_ext}-prebuilt
|
||||
Prebuilt OPAE Drivers for common kernels
|
||||
|
||||
-%package source
|
||||
+%package -n kmod-opae-fpga-driver%{?bt_ext}-source
|
||||
Summary: Source for the OPAE drivers for common kernels
|
||||
Group: Applications/System
|
||||
Requires: gcc, kernel-devel, make
|
||||
-%description source
|
||||
+%description -n kmod-opae-fpga-driver%{?bt_ext}-source
|
||||
Source for the OPAE Drivers for common kernels
|
||||
|
||||
%prep
|
||||
-%setup -q
|
||||
+%if 0%{?rhel} == 7
|
||||
+source scl_source enable devtoolset-8 || :
|
||||
+source scl_source enable llvm-toolset-7.0 || :
|
||||
+%endif
|
||||
+%setup -q -n %{kmod_name}-%{version}
|
||||
|
||||
%description
|
||||
OPAE Driver
|
||||
|
||||
%build
|
||||
+%if 0%{?rhel} == 7
|
||||
+source scl_source enable devtoolset-8 || :
|
||||
+source scl_source enable llvm-toolset-7.0 || :
|
||||
+%endif
|
||||
|
||||
%install
|
||||
+%if 0%{?rhel} == 7
|
||||
+source scl_source enable devtoolset-8 || :
|
||||
+source scl_source enable llvm-toolset-7.0 || :
|
||||
+%endif
|
||||
|
||||
FILES_TO_COPY=`ls | grep -v '^build-' | grep -v debian | grep -v spec`
|
||||
|
||||
@@ -74,12 +108,6 @@ do
|
||||
if [ -f $kern/Module.symvers ]
|
||||
then
|
||||
kernname=`basename $kern`
|
||||
- if [[ $kernname == *"2.6."* ]]; then
|
||||
- continue
|
||||
- fi
|
||||
- if [[ $kernname == *"4."* ]]; then
|
||||
- continue
|
||||
- fi
|
||||
if ! grep -q "CONFIG_REGMAP=y" $kern/include/config/auto.conf ; then
|
||||
continue
|
||||
fi
|
||||
@@ -95,57 +123,66 @@ done
|
||||
# Remove the depmod related file we will not be including
|
||||
rm -f $RPM_BUILD_ROOT/lib/modules/*/modules.*
|
||||
|
||||
+# Always Sign the modules(s).
|
||||
+# If the module signing keys are not defined, define them here.
|
||||
+%{!?privkey: %define privkey /usr/src/kernels/${kernname}/signing_key.pem}
|
||||
+%{!?pubkey: %define pubkey /usr/src/kernels/${kernname}/signing_key.x509}
|
||||
+for module in $(find %{buildroot} -type f -name \*.ko);
|
||||
+do /usr/src/kernels/${kernname}/scripts/sign-file \
|
||||
+ sha256 %{privkey} %{pubkey} $module;
|
||||
+done
|
||||
+
|
||||
# Now, install the source for the DKMS package
|
||||
-install -d $RPM_BUILD_ROOT/usr/src/%{name}-%{version}
|
||||
-cp -a drivers $RPM_BUILD_ROOT/usr/src/%{name}-%{version}
|
||||
-cp -a include $RPM_BUILD_ROOT/usr/src/%{name}-%{version}
|
||||
-cp -a scripts $RPM_BUILD_ROOT/usr/src/%{name}-%{version}
|
||||
-cp -a lib-4-12 $RPM_BUILD_ROOT/usr/src/%{name}-%{version}
|
||||
-cp -a Makefile $RPM_BUILD_ROOT/usr/src/%{name}-%{version}
|
||||
-cp -a 40-intel-fpga.rules $RPM_BUILD_ROOT/usr/src/%{name}-%{version}
|
||||
-cp -a LICENSE $RPM_BUILD_ROOT/usr/src/%{name}-%{version}
|
||||
+install -d $RPM_BUILD_ROOT/usr/src/%{kmod_name}-%{version}
|
||||
+cp -a drivers $RPM_BUILD_ROOT/usr/src/%{kmod_name}-%{version}
|
||||
+cp -a include $RPM_BUILD_ROOT/usr/src/%{kmod_name}-%{version}
|
||||
+cp -a scripts $RPM_BUILD_ROOT/usr/src/%{kmod_name}-%{version}
|
||||
+cp -a lib-4-12 $RPM_BUILD_ROOT/usr/src/%{kmod_name}-%{version}
|
||||
+cp -a Makefile $RPM_BUILD_ROOT/usr/src/%{kmod_name}-%{version}
|
||||
+cp -a 40-intel-fpga.rules $RPM_BUILD_ROOT/usr/src/%{kmod_name}-%{version}
|
||||
+cp -a LICENSE $RPM_BUILD_ROOT/usr/src/%{kmod_name}-%{version}
|
||||
# Now, create/install a source tarball of the driver for the -source package
|
||||
# Make a tarball of the driver source
|
||||
-tar -C $RPM_BUILD_ROOT/usr/src --group=root --owner=root -czf $RPM_BUILD_ROOT/usr/src/%{name}-%{version}-%{release}.tar.gz %{name}-%{version}
|
||||
+tar -C $RPM_BUILD_ROOT/usr/src --group=root --owner=root -czf $RPM_BUILD_ROOT/usr/src/%{kmod_name}-%{version}-%{_release}.tar.gz %{kmod_name}-%{version}
|
||||
# Set up a specfile
|
||||
-sed -e 's/PKGVER/%{version}/' -e 's/PKGREL/%{release}/' build/specs/native-build.spec.in >$RPM_BUILD_ROOT/usr/src/%{name}.spec
|
||||
+sed -e 's/PKGVER/%{version}/' -e 's/PKGREL/%{_release}/' build/specs/native-build.spec.in >$RPM_BUILD_ROOT/usr/src/%{kmod_name}.spec
|
||||
# Create a source package tarball that rpmbuild can consume directly
|
||||
-tar -C $RPM_BUILD_ROOT/usr/src --group=root --owner=root -czf $RPM_BUILD_ROOT/usr/src/%{name}-source-%{version}-%{release}.tar.gz %{name}-%{version}-%{release}.tar.gz %{name}.spec
|
||||
+tar -C $RPM_BUILD_ROOT/usr/src --group=root --owner=root -czf $RPM_BUILD_ROOT/usr/src/%{kmod_name}-source-%{version}-%{_release}.tar.gz %{kmod_name}-%{version}-%{_release}.tar.gz %{kmod_name}.spec
|
||||
# Clean up the intemediate files
|
||||
-rm -rf $RPM_BUILD_ROOT/usr/src/%{name}-%{version}-%{release}.tar.gz $RPM_BUILD_ROOT/usr/src/%{name}.spec $RPM_BUILD_ROOT/usr/src/%{name}-%{version}
|
||||
+rm -rf $RPM_BUILD_ROOT/usr/src/%{kmod_name}-%{version}-%{_release}.tar.gz $RPM_BUILD_ROOT/usr/src/%{kmod_name}.spec $RPM_BUILD_ROOT/usr/src/%{kmod_name}-%{version}
|
||||
|
||||
# Prebuilt module udev file
|
||||
install -d $RPM_BUILD_ROOT/etc/udev/rules.d
|
||||
cp -a 40-intel-fpga.rules $RPM_BUILD_ROOT/etc/udev/rules.d
|
||||
|
||||
# Now, install the source for the DKMS package
|
||||
-install -d $RPM_BUILD_ROOT/usr/src/%{name}-%{version}-%{release}
|
||||
-cp -a drivers $RPM_BUILD_ROOT/usr/src/%{name}-%{version}-%{release}
|
||||
-cp -a include $RPM_BUILD_ROOT/usr/src/%{name}-%{version}-%{release}
|
||||
-cp -a scripts $RPM_BUILD_ROOT/usr/src/%{name}-%{version}-%{release}
|
||||
-cp -a lib-4-12 $RPM_BUILD_ROOT/usr/src/%{name}-%{version}-%{release}
|
||||
-cp -a Makefile $RPM_BUILD_ROOT/usr/src/%{name}-%{version}-%{release}
|
||||
-cp -a 40-intel-fpga.rules $RPM_BUILD_ROOT/usr/src/%{name}-%{version}-%{release}
|
||||
-cp -a LICENSE $RPM_BUILD_ROOT/usr/src/%{name}-%{version}-%{release}
|
||||
+install -d $RPM_BUILD_ROOT/usr/src/%{kmod_name}-%{version}-%{_release}
|
||||
+cp -a drivers $RPM_BUILD_ROOT/usr/src/%{kmod_name}-%{version}-%{_release}
|
||||
+cp -a include $RPM_BUILD_ROOT/usr/src/%{kmod_name}-%{version}-%{_release}
|
||||
+cp -a scripts $RPM_BUILD_ROOT/usr/src/%{kmod_name}-%{version}-%{_release}
|
||||
+cp -a lib-4-12 $RPM_BUILD_ROOT/usr/src/%{kmod_name}-%{version}-%{_release}
|
||||
+cp -a Makefile $RPM_BUILD_ROOT/usr/src/%{kmod_name}-%{version}-%{_release}
|
||||
+cp -a 40-intel-fpga.rules $RPM_BUILD_ROOT/usr/src/%{kmod_name}-%{version}-%{_release}
|
||||
+cp -a LICENSE $RPM_BUILD_ROOT/usr/src/%{kmod_name}-%{version}-%{_release}
|
||||
|
||||
# DKMS stuff
|
||||
-cp -a dkms-postinst.sh $RPM_BUILD_ROOT/usr/src/%{name}-%{version}-%{release}
|
||||
-cp -a dkms-postrem.sh $RPM_BUILD_ROOT/usr/src/%{name}-%{version}-%{release}
|
||||
-sed -e 's/PKGVER/%{version}-%{release}/' dkms-preinst.sh >$RPM_BUILD_ROOT/usr/src/%{name}-%{version}-%{release}/dkms-preinst.sh
|
||||
-chmod 0755 $RPM_BUILD_ROOT/usr/src/%{name}-%{version}-%{release}/dkms-preinst.sh
|
||||
-echo "Creating $RPM_BUILD_ROOT/usr/src/%{name}-%{version}-%{release}/dkms.conf"
|
||||
-sed -e 's/PKGVER/%{version}-%{release}/' dkms.conf >$RPM_BUILD_ROOT/usr/src/%{name}-%{version}-%{release}/dkms.conf
|
||||
+cp -a dkms-postinst.sh $RPM_BUILD_ROOT/usr/src/%{kmod_name}-%{version}-%{_release}
|
||||
+cp -a dkms-postrem.sh $RPM_BUILD_ROOT/usr/src/%{kmod_name}-%{version}-%{_release}
|
||||
+sed -e 's/PKGVER/%{version}-%{_release}/' dkms-preinst.sh >$RPM_BUILD_ROOT/usr/src/%{kmod_name}-%{version}-%{_release}/dkms-preinst.sh
|
||||
+chmod 0755 $RPM_BUILD_ROOT/usr/src/%{kmod_name}-%{version}-%{_release}/dkms-preinst.sh
|
||||
+echo "Creating $RPM_BUILD_ROOT/usr/src/%{kmod_name}-%{version}-%{_release}/dkms.conf"
|
||||
+sed -e 's/PKGVER/%{version}-%{_release}/' dkms.conf >$RPM_BUILD_ROOT/usr/src/%{kmod_name}-%{version}-%{_release}/dkms.conf
|
||||
|
||||
%post
|
||||
-if [ -z "`dkms status -m opae-intel-fpga-driver -v %{version}-%{release}`" ]; then
|
||||
+if [ -z "`dkms status -m opae-intel-fpga-driver%{?bt_ext} -v %{version}-%{_release}`" ]; then
|
||||
echo "Add module source to dkms"
|
||||
- dkms add -m opae-intel-fpga-driver -v %{version}-%{release} --rpm_safe_upgrade
|
||||
+ dkms add -m opae-intel-fpga-driver%{?bt_ext} -v %{version}-%{_release} --rpm_safe_upgrade
|
||||
fi
|
||||
|
||||
# If we haven't loaded a tarball, then try building it for the current kernel
|
||||
if [ `uname -r | grep -c "BOOT"` -eq 0 ] && [ -e /lib/modules/`uname -r`/build/include ]; then
|
||||
- dkms build -m opae-intel-fpga-driver -v %{version}-%{release}
|
||||
- dkms install -m opae-intel-fpga-driver -v %{version}-%{release} --force
|
||||
+ dkms build -m opae-intel-fpga-driver%{?bt_ext} -v %{version}-%{_release}
|
||||
+ dkms install -m opae-intel-fpga-driver%{?bt_ext} -v %{version}-%{_release} --force
|
||||
|
||||
elif [ `uname -r | grep -c "BOOT"` -gt 0 ]; then
|
||||
echo -e ""
|
||||
@@ -162,8 +199,8 @@ exit 0
|
||||
|
||||
%preun
|
||||
echo -e
|
||||
-echo -e "Uninstall of opae-intel-fpga-driver module (version %{version}-%{release}) beginning:"
|
||||
-dkms remove -m opae-intel-fpga-driver -v %{version}-%{release} --all --rpm_safe_upgrade
|
||||
+echo -e "Uninstall of opae-intel-fpga-driver%{?bt_ext} module (version %{version}-%{_release}) beginning:"
|
||||
+dkms remove -m opae-intel-fpga-driver%{?bt_ext} -v %{version}-%{_release} --all --rpm_safe_upgrade
|
||||
if [ "$1" -eq "0" ]
|
||||
then
|
||||
find /lib/modules -type f \( -name spi-nor-mod.ko* \
|
||||
@@ -179,7 +216,7 @@ echo -e "Force regeneration of new initramfs"
|
||||
dracut --force /boot/initramfs-$(uname -r).img $(uname -r)
|
||||
exit 0
|
||||
|
||||
-%post prebuilt
|
||||
+%post -n kmod-opae-fpga-driver%{?bt_ext}-prebuilt
|
||||
depmod=/sbin/depmod
|
||||
if [ -x /usr/sbin/depmod ]
|
||||
then
|
||||
@@ -201,22 +238,22 @@ done
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
-%files
|
||||
+%files -n kmod-opae-fpga-driver%{?bt_ext}
|
||||
%defattr(-,root,root)
|
||||
-/usr/src/%{name}-%{version}-%{release}
|
||||
+/usr/src/%{kmod_name}-%{version}-%{_release}
|
||||
|
||||
-%files devel
|
||||
+%files -n kmod-opae-fpga-driver%{?bt_ext}-devel
|
||||
#/usr/include/*
|
||||
|
||||
-%files prebuilt
|
||||
+%files -n kmod-opae-fpga-driver%{?bt_ext}-prebuilt
|
||||
%defattr(-,root,root)
|
||||
/lib/modules
|
||||
/etc/udev
|
||||
|
||||
-%files source
|
||||
+%files -n kmod-opae-fpga-driver%{?bt_ext}-source
|
||||
%defattr(-,root,root)
|
||||
-/usr/src/%{name}-source-%{version}-%{release}.tar.gz
|
||||
+/usr/src/%{kmod_name}-source-%{version}-%{_release}.tar.gz
|
||||
|
||||
%changelog
|
||||
-* %(date "+%a %b %d %Y") %{version}-%{release}
|
||||
+* %(date "+%a %b %d %Y") %{version}-%{_release}
|
||||
-OPAE Intel FPGA Driver Build
|
||||
--
|
||||
2.31.1
|
||||
|
@ -0,0 +1,104 @@
|
||||
From 262f8cbac0e4699edfcc5d1027479f85f9c8177f Mon Sep 17 00:00:00 2001
|
||||
From: Jiping Ma <jiping.ma2@windriver.com>
|
||||
Date: Sun, 27 Jun 2021 23:13:51 -0700
|
||||
Subject: [PATCH 1/2] Fix build errors.
|
||||
|
||||
Fix the following issues.
|
||||
1. readx_poll_timeout redefined
|
||||
2. change mmap_sem to mmap_lock
|
||||
because commit da1c55f1b272f4bd54671d459b39ea7b54944ef9
|
||||
mmap locking API: rename mmap_sem to mmap_lock
|
||||
3. change i2c_new_device to i2c_new_client_device because
|
||||
i2c_new_device is deprecated.
|
||||
|
||||
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
|
||||
---
|
||||
drivers/fpga/intel/dma-region.c | 4 ++--
|
||||
drivers/fpga/intel/fme-main.c | 1 -
|
||||
drivers/i2c/busses/i2c-altera.c | 3 +--
|
||||
drivers/mtd/devices/intel-on-chip-flash.c | 1 -
|
||||
drivers/mtd/spi-nor/intel-generic-qspi.c | 1 -
|
||||
5 files changed, 3 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/drivers/fpga/intel/dma-region.c b/drivers/fpga/intel/dma-region.c
|
||||
index 87c8f32..d6749b1 100644
|
||||
--- a/drivers/fpga/intel/dma-region.c
|
||||
+++ b/drivers/fpga/intel/dma-region.c
|
||||
@@ -51,7 +51,7 @@ static long afu_dma_adjust_locked_vm(struct device *dev, long npages, bool incr)
|
||||
if (!current->mm)
|
||||
return 0;
|
||||
|
||||
- down_write(¤t->mm->mmap_sem);
|
||||
+ down_write(¤t->mm->mmap_lock);
|
||||
|
||||
if (incr) {
|
||||
locked = current->mm->locked_vm + npages;
|
||||
@@ -75,7 +75,7 @@ static long afu_dma_adjust_locked_vm(struct device *dev, long npages, bool incr)
|
||||
rlimit(RLIMIT_MEMLOCK),
|
||||
ret ? "- execeeded" : "");
|
||||
|
||||
- up_write(¤t->mm->mmap_sem);
|
||||
+ up_write(¤t->mm->mmap_lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
diff --git a/drivers/fpga/intel/fme-main.c b/drivers/fpga/intel/fme-main.c
|
||||
index 0b68232..29b2cc0 100644
|
||||
--- a/drivers/fpga/intel/fme-main.c
|
||||
+++ b/drivers/fpga/intel/fme-main.c
|
||||
@@ -30,7 +30,6 @@
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/intel-fpga.h>
|
||||
#include <linux/fpga/fpga-mgr-4-12.h>
|
||||
-#include <linux/iopoll-4-12.h>
|
||||
#include <linux/i2c/altera.h>
|
||||
#include <linux/spi/altera.h>
|
||||
#include <linux/mtd/altera-asmip2.h>
|
||||
diff --git a/drivers/i2c/busses/i2c-altera.c b/drivers/i2c/busses/i2c-altera.c
|
||||
index 381c562..cea3247 100644
|
||||
--- a/drivers/i2c/busses/i2c-altera.c
|
||||
+++ b/drivers/i2c/busses/i2c-altera.c
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <linux/err.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/i2c/altera.h>
|
||||
-#include <linux/iopoll-4-12.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/io.h>
|
||||
@@ -633,7 +632,7 @@ static int altr_i2c_probe(struct platform_device *pdev)
|
||||
if (pdata) {
|
||||
/* add in known devices to the bus */
|
||||
for (i = 0; i < pdata->num_devices; i++)
|
||||
- i2c_new_device(&idev->adapter, pdata->devices + i);
|
||||
+ i2c_new_client_device(&idev->adapter, pdata->devices + i);
|
||||
}
|
||||
|
||||
dev_info(&pdev->dev, "Altera SoftIP I2C Probe Complete\n");
|
||||
diff --git a/drivers/mtd/devices/intel-on-chip-flash.c b/drivers/mtd/devices/intel-on-chip-flash.c
|
||||
index 259801d..05e16af 100644
|
||||
--- a/drivers/mtd/devices/intel-on-chip-flash.c
|
||||
+++ b/drivers/mtd/devices/intel-on-chip-flash.c
|
||||
@@ -11,7 +11,6 @@
|
||||
*/
|
||||
|
||||
#include <linux/bitfield-intel-pac.h>
|
||||
-#include <linux/iopoll-4-12.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/intel-on-chip-flash.h>
|
||||
diff --git a/drivers/mtd/spi-nor/intel-generic-qspi.c b/drivers/mtd/spi-nor/intel-generic-qspi.c
|
||||
index 4183125..25d6d84 100644
|
||||
--- a/drivers/mtd/spi-nor/intel-generic-qspi.c
|
||||
+++ b/drivers/mtd/spi-nor/intel-generic-qspi.c
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
|
||||
#include <linux/bitfield-intel-pac.h>
|
||||
-#include <linux/iopoll-4-12.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mtd/intel-generic-qspi.h>
|
||||
#include <linux/mtd/mtd.h>
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,63 +0,0 @@
|
||||
From 36259496411e8d2e20bde91e93c9fcb83d9daa1d Mon Sep 17 00:00:00 2001
|
||||
From: Shuicheng Lin <shuicheng.lin@intel.com>
|
||||
Date: Mon, 24 Feb 2020 09:40:22 +0800
|
||||
Subject: [PATCH] Fix compile error with CentOS 8.1 4.18.0-147 kernel
|
||||
|
||||
access_ok definition in CentOS 8.1 is the same as linux kernel
|
||||
with version >= 5.0.0, so force the code to go with the correct
|
||||
path.
|
||||
|
||||
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
|
||||
---
|
||||
drivers/fpga/intel/fme-pr.c | 3 ++-
|
||||
drivers/fpga/intel/ifpga-sec-mgr.c | 5 +++--
|
||||
drivers/misc/avmmi-bmc.c | 3 ++-
|
||||
3 files changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/fpga/intel/fme-pr.c b/drivers/fpga/intel/fme-pr.c
|
||||
index a5bf846..a65ec0d 100644
|
||||
--- a/drivers/fpga/intel/fme-pr.c
|
||||
+++ b/drivers/fpga/intel/fme-pr.c
|
||||
@@ -338,7 +338,8 @@ static int fme_pr(struct platform_device *pdev, unsigned long arg)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)
|
||||
+/* CentOS 8.1 kernel also contains this change. */
|
||||
+#if 1 /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0) */
|
||||
if (!access_ok(u64_to_user_ptr(port_pr.buffer_address),
|
||||
port_pr.buffer_size))
|
||||
return -EFAULT;
|
||||
diff --git a/drivers/fpga/intel/ifpga-sec-mgr.c b/drivers/fpga/intel/ifpga-sec-mgr.c
|
||||
index 56405f2..c32e5b7 100644
|
||||
--- a/drivers/fpga/intel/ifpga-sec-mgr.c
|
||||
+++ b/drivers/fpga/intel/ifpga-sec-mgr.c
|
||||
@@ -132,8 +132,9 @@ static int ifpga_sec_mgr_ioctl_write_blk(struct ifpga_sec_mgr *imgr,
|
||||
|
||||
if (wb.size > SIZE_4K)
|
||||
return -ENOMEM;
|
||||
-
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)
|
||||
+
|
||||
+/* CentOS 8.1 kernel also contains this change. */
|
||||
+#if 1 /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0) */
|
||||
if (!access_ok(u64_to_user_ptr(wb.buf), wb.size))
|
||||
return -EFAULT;
|
||||
#else
|
||||
diff --git a/drivers/misc/avmmi-bmc.c b/drivers/misc/avmmi-bmc.c
|
||||
index 4716b0d..9bb70a7 100644
|
||||
--- a/drivers/misc/avmmi-bmc.c
|
||||
+++ b/drivers/misc/avmmi-bmc.c
|
||||
@@ -804,7 +804,8 @@ static long avmmi_bmc_ioctl(struct file *file, unsigned int cmd,
|
||||
if (xact.txlen > MAX_PACKET_SIZE || xact.rxlen > MAX_PACKET_SIZE)
|
||||
return -ENOMEM;
|
||||
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)
|
||||
+/* CentOS 8.1 kernel also contains this change. */
|
||||
+#if 1 /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0) */
|
||||
if (!access_ok(u64_to_user_ptr(xact.txbuf), xact.txlen))
|
||||
return -EFAULT;
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,25 +0,0 @@
|
||||
From 934c6a908315f7f5943760e9b9047e1225c54d3e Mon Sep 17 00:00:00 2001
|
||||
From: Dongqi Chen <chen.dq@neusoft.com>
|
||||
Date: Wed, 22 Apr 2020 23:42:26 -0700
|
||||
Subject: [PATCH] Fix wrong kernel version
|
||||
|
||||
Signed-off-by: Dongqi Chen <chen.dq@neusoft.com>
|
||||
---
|
||||
Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 0dfd0a8..4db08f2 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
|
||||
PWD ?= $(shell pwd)
|
||||
-kerval = $(shell uname -r | sed 's/\([0-9]*\.[0-9]*\)\..*/\1/')
|
||||
+kerval = $(shell echo $(KERNELDIR) | sed 's/.*\/\([0-9]*\.[0-9]*\)\..*/\1/')
|
||||
|
||||
cflags-y += -Wno-unused-value -Wno-unused-label -I$(M)/include -I$(M)/include/uapi -I$(M)/include/intel
|
||||
cflags-y += -I$(M)/build/include -I$(M)/build/include/uapi -I$(M)/build/include/intel
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,55 +0,0 @@
|
||||
From 94704d9260d7057549b9f66461f7c2328f6080d3 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <94704d9260d7057549b9f66461f7c2328f6080d3.1578602281.git.Jim.Somerville@windriver.com>
|
||||
From: Jim Somerville <Jim.Somerville@windriver.com>
|
||||
Date: Thu, 9 Jan 2020 15:36:55 -0500
|
||||
Subject: [PATCH 1/1] Remove regmap mmio as it is built into the kernel
|
||||
|
||||
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
|
||||
---
|
||||
Makefile | 9 ---------
|
||||
1 file changed, 9 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 0dfd0a8..3386289 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -12,7 +12,6 @@ ccflags-y += -I$(PWD)/scripts/dtc/libfdt-4-12
|
||||
|
||||
ifeq ($(kerval),3.10)
|
||||
obj-m += spi-bitbang-mod.o
|
||||
- obj-m += regmap-mmio-mod.o
|
||||
endif
|
||||
|
||||
obj-m += i2c-altera.o
|
||||
@@ -45,8 +44,6 @@ intel-max10-y += lib-4-12/fdt_sw.o
|
||||
intel-max10-y += lib-4-12/fdt_strerror.o
|
||||
intel-max10-y += lib-4-12/fdt_empty_tree.o
|
||||
|
||||
-regmap-mmio-mod-y := drivers/base/regmap/regmap-mmio-3-10.o
|
||||
-
|
||||
i2c-altera-y := drivers/i2c/busses/i2c-altera.o
|
||||
|
||||
intel-generic-qspi-y := drivers/mtd/spi-nor/intel-generic-qspi.o
|
||||
@@ -99,9 +96,6 @@ load-drv:
|
||||
if ! egrep -q '^intel_generic_qspi ' /proc/modules; then insmod intel-generic-qspi.ko; fi
|
||||
if ! egrep -q '^intel_on_chip_flash ' /proc/modules; then insmod intel-on-chip-flash.ko; fi
|
||||
if ! egrep -q '^altera_asmip2 ' /proc/modules; then insmod altera-asmip2.ko; fi
|
||||
-ifeq ($(kerval),3.10)
|
||||
- if ! egrep -q '^regmap_mmio_mod ' /proc/modules; then insmod regmap-mmio-mod.ko; fi
|
||||
-endif
|
||||
if ! egrep -q '^i2c_altera ' /proc/modules; then insmod i2c-altera.ko; fi
|
||||
ifeq ($(kerval),3.10)
|
||||
if ! egrep -q '^spi_bitbang_mod ' /proc/modules; then insmod spi-bitbang-mod.ko; fi
|
||||
@@ -137,9 +131,6 @@ ifeq ($(kerval),3.10)
|
||||
if egrep -q '^spi_bitbang_mod ' /proc/modules; then rmmod spi_bitbang_mod; fi
|
||||
endif
|
||||
if egrep -q '^i2c_altera ' /proc/modules; then rmmod i2c_altera; fi
|
||||
-ifeq ($(kerval),3.10)
|
||||
- if egrep -q '^regmap_mmio_mod ' /proc/modules; then rmmod regmap_mmio_mod; fi
|
||||
-endif
|
||||
if egrep -q '^altera_asmip2 ' /proc/modules; then rmmod altera_asmip2; fi
|
||||
if egrep -q '^intel_on_chip_flash ' /proc/modules; then rmmod intel_on_chip_flash; fi
|
||||
if egrep -q '^intel_generic_qspi ' /proc/modules; then rmmod intel_generic_qspi; fi
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,112 @@
|
||||
From 6371907d1b4809fe6c1cb02a4a9dc8b2a18999fa Mon Sep 17 00:00:00 2001
|
||||
From: Jiping Ma <jiping.ma2@windriver.com>
|
||||
Date: Wed, 23 Jun 2021 23:38:47 -0700
|
||||
Subject: [PATCH] use altera.h from driver instead of from kernel
|
||||
|
||||
linux/spi/altera.h in Kernel is very different from
|
||||
the file in opae-intel-fpga-driver. So we use the
|
||||
head file in opae-intel-fpga-driver driver.
|
||||
|
||||
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
|
||||
---
|
||||
Makefile | 28 ----------------------------
|
||||
drivers/fpga/intel/fme-main.c | 2 +-
|
||||
drivers/spi/spi-altera-4-12.c | 2 +-
|
||||
3 files changed, 2 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index bb31b0e..e5518ad 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -10,11 +10,6 @@ ccflags-y += -I$(M)/build/include -I$(M)/build/include/uapi -I$(M)/build/include
|
||||
ccflags-y += -DCONFIG_AS_AVX512
|
||||
ccflags-y += -I$(PWD)/scripts/dtc/libfdt-4-12
|
||||
|
||||
-ifeq ($(kerval), $(filter $(kerval), 4.18 3.10))
|
||||
-obj-m += spi-bitbang-mod.o
|
||||
-obj-m += regmap-mmio-mod.o
|
||||
-endif
|
||||
-
|
||||
obj-m += i2c-altera.o
|
||||
obj-m += intel-generic-qspi.o
|
||||
obj-m += intel-on-chip-flash.o
|
||||
@@ -45,22 +40,11 @@ intel-max10-y += lib-4-12/fdt_sw.o
|
||||
intel-max10-y += lib-4-12/fdt_strerror.o
|
||||
intel-max10-y += lib-4-12/fdt_empty_tree.o
|
||||
|
||||
-ifeq ($(kerval), 4.18)
|
||||
-regmap-mmio-mod-y := drivers/base/regmap/regmap-mmio-4-18.o
|
||||
-else
|
||||
-regmap-mmio-mod-y := drivers/base/regmap/regmap-mmio-3-10.o
|
||||
-endif
|
||||
-
|
||||
i2c-altera-y := drivers/i2c/busses/i2c-altera.o
|
||||
|
||||
intel-generic-qspi-y := drivers/mtd/spi-nor/intel-generic-qspi.o
|
||||
intel-on-chip-flash-y := drivers/mtd/devices/intel-on-chip-flash.o
|
||||
|
||||
-ifeq ($(kerval), 4.18)
|
||||
-spi-bitbang-mod-y := drivers/spi/spi-bitbang-4-18.o
|
||||
-else
|
||||
-spi-bitbang-mod-y := drivers/spi/spi-bitbang-3-10.o
|
||||
-endif
|
||||
|
||||
spi-altera-mod-y := drivers/spi/spi-altera-4-12.o
|
||||
|
||||
@@ -108,13 +92,7 @@ load-drv:
|
||||
if ! egrep -q '^intel_generic_qspi ' /proc/modules; then insmod intel-generic-qspi.ko; fi
|
||||
if ! egrep -q '^intel_on_chip_flash ' /proc/modules; then insmod intel-on-chip-flash.ko; fi
|
||||
if ! egrep -q '^altera_asmip2 ' /proc/modules; then insmod altera-asmip2.ko; fi
|
||||
-ifeq ($(kerval), $(filter $(kerval), 4.18 3.10))
|
||||
- if ! egrep -q '^regmap_mmio_mod ' /proc/modules; then insmod regmap-mmio-mod.ko; fi
|
||||
-endif
|
||||
if ! egrep -q '^i2c_altera ' /proc/modules; then insmod i2c-altera.ko; fi
|
||||
-ifeq ($(kerval), $(filter $(kerval), 4.18 3.10))
|
||||
- if ! egrep -q '^spi_bitbang_mod ' /proc/modules; then insmod spi-bitbang-mod.ko; fi
|
||||
-endif
|
||||
if ! egrep -q '^spi_altera_mod ' /proc/modules; then insmod spi-altera-mod.ko; fi
|
||||
if ! egrep -q '^ifpga_sec_mgr ' /proc/modules; then insmod ifpga-sec-mgr.ko; fi
|
||||
if ! egrep -q '^avmmi_bmc ' /proc/modules; then insmod avmmi-bmc.ko; fi
|
||||
@@ -142,13 +120,7 @@ unload-drv:
|
||||
if egrep -q '^avmmi_bmc ' /proc/modules; then rmmod avmmi_bmc; fi
|
||||
if egrep -q '^ifpga_sec_mgr ' /proc/modules; then rmmod ifpga_sec_mgr; fi
|
||||
if egrep -q '^spi_altera_mod ' /proc/modules; then rmmod spi_altera_mod; fi
|
||||
-ifeq ($(kerval), $(filter $(kerval), 4.18 3.10))
|
||||
- if egrep -q '^spi_bitbang_mod ' /proc/modules; then rmmod spi_bitbang_mod; fi
|
||||
-endif
|
||||
if egrep -q '^i2c_altera ' /proc/modules; then rmmod i2c_altera; fi
|
||||
-ifeq ($(kerval), $(filter $(kerval), 4.18 3.10))
|
||||
- if egrep -q '^regmap_mmio_mod ' /proc/modules; then rmmod regmap_mmio_mod; fi
|
||||
-endif
|
||||
if egrep -q '^altera_asmip2 ' /proc/modules; then rmmod altera_asmip2; fi
|
||||
if egrep -q '^intel_on_chip_flash ' /proc/modules; then rmmod intel_on_chip_flash; fi
|
||||
if egrep -q '^intel_generic_qspi ' /proc/modules; then rmmod intel_generic_qspi; fi
|
||||
diff --git a/drivers/fpga/intel/fme-main.c b/drivers/fpga/intel/fme-main.c
|
||||
index 29b2cc0..857cf87 100644
|
||||
--- a/drivers/fpga/intel/fme-main.c
|
||||
+++ b/drivers/fpga/intel/fme-main.c
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <linux/intel-fpga.h>
|
||||
#include <linux/fpga/fpga-mgr-4-12.h>
|
||||
#include <linux/i2c/altera.h>
|
||||
-#include <linux/spi/altera.h>
|
||||
+#include "../../../include/linux/spi/altera.h"
|
||||
#include <linux/mtd/altera-asmip2.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
diff --git a/drivers/spi/spi-altera-4-12.c b/drivers/spi/spi-altera-4-12.c
|
||||
index 9cc2f27..a67b87b 100644
|
||||
--- a/drivers/spi/spi-altera-4-12.c
|
||||
+++ b/drivers/spi/spi-altera-4-12.c
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/spi/spi_bitbang.h>
|
||||
-#include <linux/spi/altera.h>
|
||||
+#include "../../../include/linux/spi/altera.h"
|
||||
#include <linux/io.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/version.h>
|
||||
--
|
||||
2.31.1
|
||||
|
1
kernel-modules/intel-opae-fpga/centos/srpm_path
Normal file
1
kernel-modules/intel-opae-fpga/centos/srpm_path
Normal file
@ -0,0 +1 @@
|
||||
repo:stx/downloads/opae-intel-fpga-driver-2.0.1-10.src.rpm
|
@ -1,28 +0,0 @@
|
||||
From d9ac68c2c5704df3ebde92e0aa2484acf2436d37 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <d9ac68c2c5704df3ebde92e0aa2484acf2436d37.1594918114.git.Jim.Somerville@windriver.com>
|
||||
In-Reply-To: <3c883e04e3cb1a7483280cf43398f22602ac3062.1594918114.git.Jim.Somerville@windriver.com>
|
||||
References: <3c883e04e3cb1a7483280cf43398f22602ac3062.1594918114.git.Jim.Somerville@windriver.com>
|
||||
From: Scott Little <scott.little@windriver.com>
|
||||
Date: Fri, 22 May 2020 17:22:30 -0400
|
||||
Subject: [PATCH 2/2] add BuildRequires elfutils-libelf-devel
|
||||
|
||||
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
|
||||
---
|
||||
SPECS/mlnx-ofa_kernel.spec | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/SPECS/mlnx-ofa_kernel.spec b/SPECS/mlnx-ofa_kernel.spec
|
||||
index 547c6d0..395ca15 100644
|
||||
--- a/SPECS/mlnx-ofa_kernel.spec
|
||||
+++ b/SPECS/mlnx-ofa_kernel.spec
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
%{!?KMP: %global KMP 0}
|
||||
BuildRequires: kernel%{?bt_ext}-devel, openssl
|
||||
+BuildRequires: elfutils-libelf-devel
|
||||
%global WITH_SYSTEMD %(if ( test -d "%{_unitdir}" > /dev/null); then echo -n '1'; else echo -n '0'; fi)
|
||||
|
||||
%{!?configure_options: %global configure_options --with-core-mod --with-user_mad-mod --with-user_access-mod --with-addr_trans-mod --with-mlx4-mod --with-mlx4_en-mod --with-mlx5-mod --with-mlxfw-mod --with-ipoib-mod}
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,34 @@
|
||||
From 7b589d8176fa503b7d817692312dd394c35925e3 Mon Sep 17 00:00:00 2001
|
||||
From: Vefa Bicakci <vefa.bicakci@windriver.com>
|
||||
Date: Tue, 1 Jun 2021 13:44:23 -0400
|
||||
Subject: [PATCH] Apply a dummy patch to let "build-pkgs --edit" work
|
||||
|
||||
Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com>
|
||||
---
|
||||
SPECS/mlnx-ofa_kernel.spec | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/SPECS/mlnx-ofa_kernel.spec b/SPECS/mlnx-ofa_kernel.spec
|
||||
index d4d3f1932db6..5a2982cfaa5f 100644
|
||||
--- a/SPECS/mlnx-ofa_kernel.spec
|
||||
+++ b/SPECS/mlnx-ofa_kernel.spec
|
||||
@@ -109,6 +109,7 @@ Url: http://www.mellanox.com/
|
||||
Group: System Environment/Base
|
||||
Source: %{_basename}-%{_version}.tgz
|
||||
Source100: modules-load.conf
|
||||
+Patch01: 0001-A-dummy-change-to-let-StarlingX-build-work.patch
|
||||
BuildRoot: %{?build_root:%{build_root}}%{!?build_root:/var/tmp/OFED}
|
||||
Vendor: Mellanox Technologies
|
||||
Obsoletes: kernel-ib
|
||||
@@ -303,6 +304,8 @@ sed -s -i -e '1s|python\>|python3|' `grep -rl '^#!.*python' source/ofed_scripts`
|
||||
%endif
|
||||
mkdir obj
|
||||
|
||||
+%patch01 -p1
|
||||
+
|
||||
%build
|
||||
%if 0%{?rhel} == 7
|
||||
source scl_source enable devtoolset-8 || :
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,61 @@
|
||||
From 3a79ff9ba9c5becc19121bc628971265c93e8a2c Mon Sep 17 00:00:00 2001
|
||||
From: Jiping Ma <jiping.ma2@windriver.com>
|
||||
Date: Tue, 20 Apr 2021 21:34:25 -0400
|
||||
Subject: [PATCH] Introduce devtoolset-8
|
||||
|
||||
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
|
||||
---
|
||||
mlnx-ofa_kernel.spec | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/SPECS/mlnx-ofa_kernel.spec b/SPECS/mlnx-ofa_kernel.spec
|
||||
index e187ff5..d4d3f19 100644
|
||||
--- a/SPECS/mlnx-ofa_kernel.spec
|
||||
+++ b/SPECS/mlnx-ofa_kernel.spec
|
||||
@@ -35,6 +35,10 @@
|
||||
|
||||
%{!?KMP: %global KMP 0}
|
||||
BuildRequires: kernel%{?bt_ext}-devel, openssl
|
||||
+BuildRequires: devtoolset-8-build
|
||||
+BuildRequires: devtoolset-8-binutils
|
||||
+BuildRequires: devtoolset-8-gcc
|
||||
+BuildRequires: devtoolset-8-make
|
||||
%global WITH_SYSTEMD %(if ( test -d "%{_unitdir}" > /dev/null); then echo -n '1'; else echo -n '0'; fi)
|
||||
|
||||
%{!?configure_options: %global configure_options --with-core-mod --with-user_mad-mod --with-user_access-mod --with-addr_trans-mod --with-mlx5-mod --with-mlxfw-mod --with-ipoib-mod}
|
||||
@@ -287,6 +291,10 @@ The driver sources are located at: http://www.mellanox.com/downloads/ofed/mlnx-o
|
||||
|
||||
%prep
|
||||
%setup -n %{_basename}-%{_version}
|
||||
+%if 0%{?rhel} == 7
|
||||
+source scl_source enable devtoolset-8 || :
|
||||
+source scl_source enable llvm-toolset-7.0 || :
|
||||
+%endif
|
||||
set -- *
|
||||
mkdir source
|
||||
mv "$@" source/
|
||||
@@ -296,6 +304,10 @@ sed -s -i -e '1s|python\>|python3|' `grep -rl '^#!.*python' source/ofed_scripts`
|
||||
mkdir obj
|
||||
|
||||
%build
|
||||
+%if 0%{?rhel} == 7
|
||||
+source scl_source enable devtoolset-8 || :
|
||||
+source scl_source enable llvm-toolset-7.0 || :
|
||||
+%endif
|
||||
export EXTRA_CFLAGS='-DVERSION=\"%version\"'
|
||||
export INSTALL_MOD_DIR=%{install_mod_dir}
|
||||
export CONF_OPTIONS="%{configure_options}"
|
||||
@@ -314,6 +326,10 @@ for flavor in %flavors_to_build; do
|
||||
done
|
||||
|
||||
%install
|
||||
+%if 0%{?rhel} == 7
|
||||
+source scl_source enable devtoolset-8 || :
|
||||
+source scl_source enable llvm-toolset-7.0 || :
|
||||
+%endif
|
||||
touch ofed-files
|
||||
export RECORD_PY_FILES=1
|
||||
export INSTALL_MOD_PATH=%{buildroot}
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,2 +1,3 @@
|
||||
0001-Support-TiS-system.patch
|
||||
0002-add-BuildRequires-elfutils-libelf-devel.patch
|
||||
Support-TiS-system.patch
|
||||
Introduce-devtoolset-8.patch
|
||||
Apply-a-dummy-patch-to-let-build-pkgs-edit-work.patch
|
||||
|
@ -1,30 +1,15 @@
|
||||
From 3c883e04e3cb1a7483280cf43398f22602ac3062 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <3c883e04e3cb1a7483280cf43398f22602ac3062.1594918114.git.Jim.Somerville@windriver.com>
|
||||
From: Jim Somerville <Jim.Somerville@windriver.com>
|
||||
Date: Mon, 20 Jan 2020 11:40:06 -0500
|
||||
Subject: [PATCH 1/2] Support TiS system
|
||||
From a7bc4a9dedb707f7d89019b3662141d0b94945c4 Mon Sep 17 00:00:00 2001
|
||||
From: Jiping Ma <jiping.ma2@windriver.com>
|
||||
Date: Tue, 20 Apr 2021 21:13:43 -0400
|
||||
Subject: [PATCH] Support TiS system
|
||||
|
||||
This patch added the following to support TiS system:
|
||||
- Support package versioning for TiS format
|
||||
- Add rt support
|
||||
- Compile fix in dcbnl.h
|
||||
- Fix compile for some ks stuff
|
||||
- Fix compile to neuter some stats output
|
||||
- Disable use of kernel page pool functionality
|
||||
- Load all kernel modules
|
||||
- Sign kernel module
|
||||
|
||||
Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
|
||||
Signed-off-by: Kam Nasim <kam.nasim@windriver.com>
|
||||
Signed-off-by: eric zhang <eric.zhang@windriver.com>
|
||||
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
|
||||
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
|
||||
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
|
||||
---
|
||||
SPECS/mlnx-ofa_kernel.spec | 51 +++++++++++++++++++++++++++++++---------------
|
||||
1 file changed, 35 insertions(+), 16 deletions(-)
|
||||
mlnx-ofa_kernel.spec | 40 ++++++++++++++++++++++++----------------
|
||||
1 file changed, 24 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/SPECS/mlnx-ofa_kernel.spec b/SPECS/mlnx-ofa_kernel.spec
|
||||
index efe2abc..547c6d0 100644
|
||||
index 254dd4c..e187ff5 100644
|
||||
--- a/SPECS/mlnx-ofa_kernel.spec
|
||||
+++ b/SPECS/mlnx-ofa_kernel.spec
|
||||
@@ -27,8 +27,14 @@
|
||||
@ -42,10 +27,10 @@ index efe2abc..547c6d0 100644
|
||||
+BuildRequires: kernel%{?bt_ext}-devel, openssl
|
||||
%global WITH_SYSTEMD %(if ( test -d "%{_unitdir}" > /dev/null); then echo -n '1'; else echo -n '0'; fi)
|
||||
|
||||
%{!?configure_options: %global configure_options --with-core-mod --with-user_mad-mod --with-user_access-mod --with-addr_trans-mod --with-mlx4-mod --with-mlx4_en-mod --with-mlx5-mod --with-mlxfw-mod --with-ipoib-mod}
|
||||
@@ -55,12 +61,11 @@
|
||||
%{!?configure_options: %global configure_options --with-core-mod --with-user_mad-mod --with-user_access-mod --with-addr_trans-mod --with-mlx5-mod --with-mlxfw-mod --with-ipoib-mod}
|
||||
@@ -56,12 +62,11 @@
|
||||
|
||||
%global IS_RHEL_VENDOR "%{_vendor}" == "redhat" || ("%{_vendor}" == "bclinux")
|
||||
%global IS_RHEL_VENDOR "%{_vendor}" == "redhat" || ("%{_vendor}" == "bclinux") || ("%{_vendor}" == "openEuler")
|
||||
|
||||
-%{!?KVERSION: %global KVERSION %(uname -r)}
|
||||
+%{!?KVERSION: %global KVERSION %(rpm -q kernel%{?bt_ext}-devel | sort --version-sort | tail -1 | sed 's/kernel%{?bt_ext}-devel-//')}
|
||||
@ -58,18 +43,17 @@ index efe2abc..547c6d0 100644
|
||||
# Select packages to build
|
||||
|
||||
# Kernel module packages to be included into kernel-ib
|
||||
@@ -76,7 +81,9 @@
|
||||
@@ -75,7 +80,8 @@
|
||||
|
||||
%{!?KERNEL_SOURCES: %global KERNEL_SOURCES /lib/modules/%{KVERSION}/source}
|
||||
|
||||
-%{!?_name: %global _name mlnx-ofa_kernel}
|
||||
+
|
||||
+%define _basename mlnx-ofa_kernel
|
||||
+%define _name %{_basename}%{?bt_ext}
|
||||
%{!?_version: %global _version 5.0}
|
||||
%{!?_release: %global _release OFED.5.0.2.1.8.1.g5f67178}
|
||||
%{!?_version: %global _version 5.3}
|
||||
%{!?_release: %global _release OFED.5.3.1.0.0.1}
|
||||
%global _kmp_rel %{_release}%{?_kmp_build_num}%{?_dist}
|
||||
@@ -94,11 +101,17 @@
|
||||
@@ -93,11 +99,12 @@
|
||||
Summary: Infiniband HCA Driver
|
||||
Name: %{_name}
|
||||
Version: %{_version}
|
||||
@ -81,15 +65,10 @@ index efe2abc..547c6d0 100644
|
||||
-Source: %{_name}-%{_version}.tgz
|
||||
+Source: %{_basename}-%{_version}.tgz
|
||||
+Source100: modules-load.conf
|
||||
+Patch01: 0001-neuter-HAVE_IEEE_GETQCN.patch
|
||||
+Patch02: 0001-neuter-a-bunch-of-ks-stuff.patch
|
||||
+Patch03: 0001-neuter-some-stats-output.patch
|
||||
+Patch04: Disable-use-of-page-pool.patch
|
||||
+
|
||||
BuildRoot: %{?build_root:%{build_root}}%{!?build_root:/var/tmp/OFED}
|
||||
Vendor: Mellanox Technologies
|
||||
Obsoletes: kernel-ib
|
||||
@@ -154,7 +167,6 @@ EOF)
|
||||
@@ -154,7 +161,6 @@ EOF)
|
||||
%global kernel_release() %{KVERSION}
|
||||
%global flavors_to_build default
|
||||
%package -n %{non_kmp_pname}
|
||||
@ -97,16 +76,16 @@ index efe2abc..547c6d0 100644
|
||||
Requires: coreutils
|
||||
Requires: pciutils
|
||||
Requires: grep
|
||||
@@ -181,7 +193,7 @@ Obsoletes: mlnx-en-doc
|
||||
Obsoletes: mlnx-en-debuginfo
|
||||
@@ -182,7 +188,7 @@ Obsoletes: mlnx-en-debuginfo
|
||||
Obsoletes: mlnx-en-sources
|
||||
Obsoletes: mlnx-rdma-rxe
|
||||
Version: %{_version}
|
||||
-Release: %{_release}.kver.%{krelver}
|
||||
+Release: %{_release}%{?_tis_dist}.%{tis_patch_ver}
|
||||
Summary: Infiniband Driver and ULPs kernel modules
|
||||
Group: System Environment/Libraries
|
||||
%description -n %{non_kmp_pname}
|
||||
@@ -193,7 +205,7 @@ The driver sources are located at: http://www.mellanox.com/downloads/ofed/mlnx-o
|
||||
@@ -194,7 +200,7 @@ The driver sources are located at: http://www.mellanox.com/downloads/ofed/mlnx-o
|
||||
%package -n %{devel_pname}
|
||||
Version: %{_version}
|
||||
# build KMP rpms?
|
||||
@ -115,7 +94,7 @@ index efe2abc..547c6d0 100644
|
||||
Obsoletes: kernel-ib-devel
|
||||
Obsoletes: compat-rdma-devel
|
||||
Obsoletes: kernel-ib
|
||||
@@ -231,13 +243,12 @@ The driver sources are located at: http://www.mellanox.com/downloads/ofed/mlnx-o
|
||||
@@ -232,13 +238,12 @@ The driver sources are located at: http://www.mellanox.com/downloads/ofed/mlnx-o
|
||||
else \
|
||||
echo -n '0'; fi)
|
||||
|
||||
@ -130,7 +109,7 @@ index efe2abc..547c6d0 100644
|
||||
%global buildsubdir %{_name}-%{version}
|
||||
# Disgusting hack alert! We need to ensure we sign modules *after* all
|
||||
# invocations of strip occur, which is in __debug_install_post if
|
||||
@@ -250,7 +261,6 @@ The driver sources are located at: http://www.mellanox.com/downloads/ofed/mlnx-o
|
||||
@@ -251,7 +256,6 @@ The driver sources are located at: http://www.mellanox.com/downloads/ofed/mlnx-o
|
||||
%{__modsign_install_post} \
|
||||
%{nil}
|
||||
|
||||
@ -138,7 +117,7 @@ index efe2abc..547c6d0 100644
|
||||
#
|
||||
%if "%{_vendor}" == "suse"
|
||||
%debug_package
|
||||
@@ -281,7 +291,7 @@ The driver sources are located at: http://www.mellanox.com/downloads/ofed/mlnx-o
|
||||
@@ -282,7 +286,7 @@ The driver sources are located at: http://www.mellanox.com/downloads/ofed/mlnx-o
|
||||
%{!?install_mod_dir: %global install_mod_dir updates}
|
||||
|
||||
%prep
|
||||
@ -147,19 +126,7 @@ index efe2abc..547c6d0 100644
|
||||
set -- *
|
||||
mkdir source
|
||||
mv "$@" source/
|
||||
@@ -290,6 +300,11 @@ sed -s -i -e '1s|python\>|python3|' `grep -rl '^#!.*python' source/ofed_scripts`
|
||||
%endif
|
||||
mkdir obj
|
||||
|
||||
+%patch01 -p1
|
||||
+%patch02 -p1
|
||||
+%patch03 -p1
|
||||
+%patch04 -p1
|
||||
+
|
||||
%build
|
||||
export EXTRA_CFLAGS='-DVERSION=\"%version\"'
|
||||
export INSTALL_MOD_DIR=%{install_mod_dir}
|
||||
@@ -305,7 +320,6 @@ for flavor in %flavors_to_build; do
|
||||
@@ -306,7 +310,6 @@ for flavor in %flavors_to_build; do
|
||||
find compat -type f -exec touch -t 200012201010 '{}' \; || true
|
||||
./configure --build-dummy-mods --prefix=%{_prefix} --kernel-version $KVERSION --kernel-sources $KSRC --modules-dir $LIB_MOD_DIR $CONF_OPTIONS %{?_smp_mflags}
|
||||
make %{?_smp_mflags} kernel
|
||||
@ -167,7 +134,7 @@ index efe2abc..547c6d0 100644
|
||||
cd -
|
||||
done
|
||||
|
||||
@@ -314,9 +328,11 @@ touch ofed-files
|
||||
@@ -315,9 +318,11 @@ touch ofed-files
|
||||
export RECORD_PY_FILES=1
|
||||
export INSTALL_MOD_PATH=%{buildroot}
|
||||
export INSTALL_MOD_DIR=%{install_mod_dir}
|
||||
@ -180,7 +147,7 @@ index efe2abc..547c6d0 100644
|
||||
%{mlnx_python_env}
|
||||
for flavor in %flavors_to_build; do
|
||||
export KSRC=%{kernel_source $flavor}
|
||||
@@ -367,6 +383,8 @@ echo "override ${mod_name} * weak-updates/%{_name}${mod_path}" >> %{buildroot}%{
|
||||
@@ -367,6 +372,8 @@ echo "override ${mod_name} * weak-updates/%{_name}${mod_path}" >> %{buildroot}%{
|
||||
echo "override ${mod_name} * extra/%{_name}${mod_path}" >> %{buildroot}%{_sysconfdir}/depmod.d/zz01-%{_name}-${mod_name}.conf
|
||||
done
|
||||
%endif
|
||||
@ -189,7 +156,7 @@ index efe2abc..547c6d0 100644
|
||||
%endif
|
||||
|
||||
# copy sources
|
||||
@@ -712,6 +730,7 @@ fi
|
||||
@@ -696,6 +703,7 @@ fi
|
||||
%config(noreplace) %{_sysconfdir}/depmod.d/zz01-%{_name}-*.conf
|
||||
%endif
|
||||
%endif
|
||||
@ -198,5 +165,5 @@ index efe2abc..547c6d0 100644
|
||||
|
||||
%files -n %{devel_pname}
|
||||
--
|
||||
1.8.3.1
|
||||
2.29.2
|
||||
|
@ -1,26 +0,0 @@
|
||||
From e1b8dd12605b5654bd94011cb6c587fd0c0bc9af Mon Sep 17 00:00:00 2001
|
||||
From: Jim Somerville <Jim.Somerville@windriver.com>
|
||||
Date: Tue, 20 Dec 2016 11:58:26 -0500
|
||||
Subject: [PATCH 2/3] neuter HAVE_IEEE_GETQCN
|
||||
|
||||
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
|
||||
---
|
||||
source/include/linux/dcbnl.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/source/include/linux/dcbnl.h b/source/include/linux/dcbnl.h
|
||||
index 2c8ca62..eabf6da 100644
|
||||
--- a/source/include/linux/dcbnl.h
|
||||
+++ b/source/include/linux/dcbnl.h
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include_next <linux/dcbnl.h>
|
||||
|
||||
-#ifndef HAVE_IEEE_GETQCN
|
||||
+#if 0
|
||||
|
||||
#ifndef HAVE_STRUCT_IEEE_QCN
|
||||
enum dcbnl_cndd_states {
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,47 +0,0 @@
|
||||
From 63f73a02fd73f6a01bce1fbf65ae2a6a628f0626 Mon Sep 17 00:00:00 2001
|
||||
From: Jim Somerville <Jim.Somerville@windriver.com>
|
||||
Date: Tue, 20 Dec 2016 16:22:47 -0500
|
||||
Subject: [PATCH 1/3] neuter a bunch of ks stuff
|
||||
|
||||
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
|
||||
---
|
||||
source/include/linux/compat-3.17.h | 2 +-
|
||||
source/include/linux/compat-4.0.h | 2 ++
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/source/include/linux/compat-3.17.h b/source/include/linux/compat-3.17.h
|
||||
index 6a5ff3b..ad799f0 100644
|
||||
--- a/source/include/linux/compat-3.17.h
|
||||
+++ b/source/include/linux/compat-3.17.h
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0))
|
||||
|
||||
-#ifndef HAVE_KTIME_GET_REAL_NS
|
||||
+#if 0
|
||||
#include <linux/hrtimer.h>
|
||||
#include <linux/ktime.h>
|
||||
static inline u64 ktime_get_real_ns(void) {
|
||||
diff --git a/source/include/linux/compat-4.0.h b/source/include/linux/compat-4.0.h
|
||||
index b3c37aa..900d49a 100644
|
||||
--- a/source/include/linux/compat-4.0.h
|
||||
+++ b/source/include/linux/compat-4.0.h
|
||||
@@ -6,6 +6,7 @@
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0))
|
||||
#include <linux/string.h>
|
||||
|
||||
+#if 0
|
||||
#define kstrdup_const LINUX_BACKPORT(kstrdup_const)
|
||||
static inline const char *kstrdup_const(const char *s, gfp_t gfp)
|
||||
{
|
||||
@@ -21,6 +22,7 @@ static inline void kfree_const(const void *x)
|
||||
kfree(x);
|
||||
}
|
||||
#endif
|
||||
+#endif
|
||||
#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)) */
|
||||
|
||||
#endif /* LINUX_4_0_COMPAT_H */
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,31 +0,0 @@
|
||||
From 12de070f8f73794e45ee6956c9957d0ff0c5133f Mon Sep 17 00:00:00 2001
|
||||
From: Jim Somerville <Jim.Somerville@windriver.com>
|
||||
Date: Tue, 20 Dec 2016 16:56:01 -0500
|
||||
Subject: [PATCH 3/3] neuter some stats output
|
||||
|
||||
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
|
||||
---
|
||||
source/drivers/net/ethernet/mellanox/mlx4/en_sysfs.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/source/drivers/net/ethernet/mellanox/mlx4/en_sysfs.c b/source/drivers/net/ethernet/mellanox/mlx4/en_sysfs.c
|
||||
index cb7c829..21f5fc6 100644
|
||||
--- a/source/drivers/net/ethernet/mellanox/mlx4/en_sysfs.c
|
||||
+++ b/source/drivers/net/ethernet/mellanox/mlx4/en_sysfs.c
|
||||
@@ -186,11 +186,13 @@ static ssize_t mlx4_en_show_qcnstats(struct device *d,
|
||||
len += sprintf(buf + len, "%s %d %s", "priority", i, ": ");
|
||||
len += sprintf(buf + len, "%lld ", qcn_stats.rppp_rp_centiseconds[i]);
|
||||
len += sprintf(buf + len, "%u ", qcn_stats.rppp_created_rps[i]);
|
||||
+#if 0
|
||||
len += sprintf(buf + len, "%u ", qcn_stats.ignored_cnm[i]);
|
||||
len += sprintf(buf + len, "%u ", qcn_stats.estimated_total_rate[i]);
|
||||
len += sprintf(buf + len, "%u ", qcn_stats.cnms_handled_successfully[i]);
|
||||
len += sprintf(buf + len, "%u ", qcn_stats.min_total_limiters_rate[i]);
|
||||
len += sprintf(buf + len, "%u ", qcn_stats.max_total_limiters_rate[i]);
|
||||
+#endif
|
||||
len += sprintf(buf + len, "%s", "|");
|
||||
}
|
||||
len += sprintf(buf + len, "\n");
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,77 +0,0 @@
|
||||
From 470e37909b707b2209ae3ed1a9d82758b114691c Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <470e37909b707b2209ae3ed1a9d82758b114691c.1579638263.git.Jim.Somerville@windriver.com>
|
||||
From: Jim Somerville <Jim.Somerville@windriver.com>
|
||||
Date: Tue, 21 Jan 2020 14:42:03 -0500
|
||||
Subject: [PATCH 1/1] Disable use of page pool
|
||||
|
||||
Don't use it until they are configured on by default
|
||||
in the kernel, else you may get undefined symbols and
|
||||
some of the mlx5 related modules fail to load.
|
||||
|
||||
The header file is there in CentOS 7.7, but the
|
||||
CONFIG_PAGE_POOL option isn't enabled. So the simplistic
|
||||
configure test passes here but the kernel doesn't have the
|
||||
required procedures.
|
||||
|
||||
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
|
||||
---
|
||||
source/compat/aclocal.m4 | 4 +---
|
||||
source/compat/config/rdma.m4 | 4 +---
|
||||
source/compat/configure | 4 ++--
|
||||
3 files changed, 4 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/source/compat/aclocal.m4 b/source/compat/aclocal.m4
|
||||
index 192f6a0..31520d4 100644
|
||||
--- a/source/compat/aclocal.m4
|
||||
+++ b/source/compat/aclocal.m4
|
||||
@@ -12330,9 +12330,7 @@ AC_DEFUN([LINUX_CONFIG_COMPAT],
|
||||
],[
|
||||
return 0;
|
||||
],[
|
||||
- AC_MSG_RESULT(yes)
|
||||
- MLNX_AC_DEFINE(HAVE_NET_PAGE_POOL_H, 1,
|
||||
- [net/page_pool.h is defined])
|
||||
+ AC_MSG_RESULT(no)
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
diff --git a/source/compat/config/rdma.m4 b/source/compat/config/rdma.m4
|
||||
index 5fbe4f7..e502f8d 100644
|
||||
--- a/source/compat/config/rdma.m4
|
||||
+++ b/source/compat/config/rdma.m4
|
||||
@@ -10226,9 +10226,7 @@ AC_DEFUN([LINUX_CONFIG_COMPAT],
|
||||
],[
|
||||
return 0;
|
||||
],[
|
||||
- AC_MSG_RESULT(yes)
|
||||
- MLNX_AC_DEFINE(HAVE_NET_PAGE_POOL_H, 1,
|
||||
- [net/page_pool.h is defined])
|
||||
+ AC_MSG_RESULT(no)
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
diff --git a/source/compat/configure b/source/compat/configure
|
||||
index 68ceff5..2e955b3 100755
|
||||
--- a/source/compat/configure
|
||||
+++ b/source/compat/configure
|
||||
@@ -102487,7 +102487,7 @@ if { ac_try='env $CROSS_VARS $MAKE -d modules ${LD:+"LD=$CROSS_COMPILE$LD"} CC="
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
cat >>CONFDEFS_H_DIR/confdefs.h.${CONFDEFS_H_INDEX} <<\_ACEOF
|
||||
-#define HAVE_NET_PAGE_POOL_H 1
|
||||
+/* Intentionally removed #define HAVE_NET_PAGE_POOL_H 1 */
|
||||
_ACEOF
|
||||
|
||||
|
||||
@@ -102546,7 +102546,7 @@ if { ac_try='env $CROSS_VARS $MAKE -d modules ${LD:+"LD=$CROSS_COMPILE$LD"} CC="
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
cat >>CONFDEFS_H_DIR/confdefs.h.${CONFDEFS_H_INDEX} <<\_ACEOF
|
||||
-#define HAVE_NET_PAGE_POOL_H 1
|
||||
+/* Intentionally removed #define HAVE_NET_PAGE_POOL_H 1 */
|
||||
_ACEOF
|
||||
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1 +1 @@
|
||||
repo:stx/downloads/mlnx-ofa_kernel-5.0-OFED.5.0.2.1.8.1.g5f67178.src.rpm
|
||||
mirror:Source/mlnx-ofa_kernel-5.3-OFED.5.3.1.0.0.1.src.rpm
|
||||
|
@ -1,6 +1,6 @@
|
||||
COPY_LIST=" \
|
||||
$PKG_BASE/files/* \
|
||||
$STX_BASE/downloads/qat1.7.l.4.5.0-00034.tar.gz \
|
||||
$STX_BASE/downloads/QAT1.7.L.4.14.0-00031.tar.gz \
|
||||
"
|
||||
OPT_DEP_LIST_FOR_BUILD_TYPE[std]=$GIT_BASE/kernel-std
|
||||
OPT_DEP_LIST_FOR_BUILD_TYPE[rt]=$GIT_BASE/kernel-rt
|
||||
|
@ -7,8 +7,8 @@
|
||||
Summary: Intel(r) QuickAssist Technology API
|
||||
%define pkgname qat17
|
||||
Name: %{pkgname}%{?bt_ext}
|
||||
Version: 4.5.0
|
||||
%define upstream_release 00034
|
||||
Version: 4.14.0
|
||||
%define upstream_release 00031
|
||||
Release: %{upstream_release}%{?_tis_dist}.%{tis_patch_ver}
|
||||
License: GPLv2
|
||||
Group: base
|
||||
@ -24,6 +24,13 @@ BuildRequires: boost-devel
|
||||
BuildRequires: perl
|
||||
BuildRequires: openssl
|
||||
BuildRequires: elfutils-libelf-devel
|
||||
BuildRequires: yasm
|
||||
%if 0%{?rhel} == 7
|
||||
BuildRequires: devtoolset-8-build
|
||||
BuildRequires: devtoolset-8-binutils
|
||||
BuildRequires: devtoolset-8-gcc
|
||||
BuildRequires: devtoolset-8-make
|
||||
%endif
|
||||
|
||||
%define icp_tools accelcomp
|
||||
%define kernel_version %(rpm -q kernel%{?bt_ext}-devel | sed 's/kernel%{?bt_ext}-devel-//')
|
||||
@ -31,33 +38,39 @@ BuildRequires: elfutils-libelf-devel
|
||||
%define qat_unpack_dir %{_builddir}/%{name}-%{version}
|
||||
%define qat_src_dir %{qat_unpack_dir}
|
||||
|
||||
Source: qat1.7.l.%{version}-%{upstream_release}.tar.gz
|
||||
Source: QAT1.7.L.%{version}-%{upstream_release}.tar.gz
|
||||
Source1: qat
|
||||
# Use our own service script rather than massively patching theirs
|
||||
Source2: qat_service
|
||||
|
||||
#Patch1: 0001-Install-config-file-for-each-VF.patch
|
||||
Patch2: Get-and-report-the-return-code-on-firmware-load-fail.patch
|
||||
Patch3: crypto-qat-Silence-smp_processor_id-warning.patch
|
||||
Patch1: crypto-qat-Silence-smp_processor_id-warning.patch
|
||||
Patch2: qat17-build-Do-not-override-KERNELVERSION-with-build-machi.patch
|
||||
|
||||
%description
|
||||
Intel(r) QuickAssist Technology API
|
||||
|
||||
%prep
|
||||
%if 0%{?rhel} == 7
|
||||
source scl_source enable devtoolset-8 || :
|
||||
source scl_source enable llvm-toolset-7.0 || :
|
||||
%endif
|
||||
rm -rf %{qat_unpack_dir}
|
||||
mkdir -p %{qat_unpack_dir}
|
||||
cd %{qat_unpack_dir}
|
||||
|
||||
gzip -dc %{_sourcedir}/qat1.7.l.%{version}-%{upstream_release}.tar.gz | tar -xvvf -
|
||||
gzip -dc %{_sourcedir}/QAT1.7.L.%{version}-%{upstream_release}.tar.gz | tar -xvvf -
|
||||
if [ $? -ne 0 ]; then
|
||||
exit $?
|
||||
fi
|
||||
|
||||
#%patch1 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
%build
|
||||
%if 0%{?rhel} == 7
|
||||
source scl_source enable devtoolset-8 || :
|
||||
source scl_source enable llvm-toolset-7.0 || :
|
||||
%endif
|
||||
|
||||
ICP_ROOT=%{qat_src_dir}
|
||||
KERNEL_SOURCE_ROOT=%{staging_kernel_dir}
|
||||
@ -74,6 +87,10 @@ make -C %{qat_src_dir}/
|
||||
make -C %{qat_src_dir}/ sample-all
|
||||
|
||||
%install
|
||||
%if 0%{?rhel} == 7
|
||||
source scl_source enable devtoolset-8 || :
|
||||
source scl_source enable llvm-toolset-7.0 || :
|
||||
%endif
|
||||
|
||||
%{__install} -d %{buildroot}%{_sysconfdir}/default
|
||||
%{__install} -m 750 %SOURCE1 %{buildroot}%{_sysconfdir}/default
|
||||
|
@ -1,42 +0,0 @@
|
||||
From 996bdb87cbaab4d8f498ec7897c38bc9d19e29e7 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <996bdb87cbaab4d8f498ec7897c38bc9d19e29e7.1511969785.git.Jim.Somerville@windriver.com>
|
||||
From: Jim Somerville <Jim.Somerville@windriver.com>
|
||||
Date: Wed, 29 Nov 2017 10:36:12 -0500
|
||||
Subject: [PATCH 1/1] Get and report the return code on firmware load failure
|
||||
|
||||
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
|
||||
---
|
||||
.../qat/drivers/crypto/qat/qat_common/adf_accel_engine.c | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/quickassist/qat/drivers/crypto/qat/qat_common/adf_accel_engine.c b/quickassist/qat/drivers/crypto/qat/qat_common/adf_accel_engine.c
|
||||
index 5a5d42b..9c109e3 100755
|
||||
--- a/quickassist/qat/drivers/crypto/qat/qat_common/adf_accel_engine.c
|
||||
+++ b/quickassist/qat/drivers/crypto/qat/qat_common/adf_accel_engine.c
|
||||
@@ -64,6 +64,7 @@ int adf_ae_fw_load(struct adf_accel_dev *accel_dev)
|
||||
struct adf_hw_device_data *hw_device = accel_dev->hw_device;
|
||||
void *uof_addr, *mmp_addr;
|
||||
u32 uof_size, mmp_size;
|
||||
+ int rc;
|
||||
char uofname[ADF_CFG_MAX_VAL_LEN_IN_BYTES];
|
||||
struct adf_accel_pci *pci_info = &accel_dev->accel_pci_dev;
|
||||
struct adf_mmp_version_s mmp_ver = { {0} };
|
||||
@@ -77,10 +78,11 @@ int adf_ae_fw_load(struct adf_accel_dev *accel_dev)
|
||||
if (!hw_device->fw_name)
|
||||
return 0;
|
||||
|
||||
- if (request_firmware(&loader_data->mmp_fw, hw_device->fw_mmp_name,
|
||||
- &accel_dev->accel_pci_dev.pci_dev->dev)) {
|
||||
- dev_err(&GET_DEV(accel_dev), "Failed to load MMP firmware %s\n",
|
||||
- hw_device->fw_mmp_name);
|
||||
+ rc = request_firmware(&loader_data->mmp_fw, hw_device->fw_mmp_name,
|
||||
+ &accel_dev->accel_pci_dev.pci_dev->dev);
|
||||
+ if (rc) {
|
||||
+ dev_err(&GET_DEV(accel_dev), "Failed to load MMP firmware %s rc=%d\n",
|
||||
+ hw_device->fw_mmp_name, rc);
|
||||
return -EFAULT;
|
||||
}
|
||||
if (request_firmware(&loader_data->uof_fw, hw_device->fw_name,
|
||||
--
|
||||
2.7.4
|
||||
|
@ -0,0 +1,70 @@
|
||||
From 87f6c5a8e843461df50229f2b07ba69bc98b7e04 Mon Sep 17 00:00:00 2001
|
||||
From: "M. Vefa Bicakci" <vefa.bicakci@windriver.com>
|
||||
Date: Fri, 2 Jul 2021 13:08:50 -0400
|
||||
Subject: [PATCH] build: Do not override KERNELVERSION with build machine's
|
||||
kernel version
|
||||
|
||||
Prior to this commit, the build system would fail with the following
|
||||
error message when building the qat kernel modules on a host with a
|
||||
3.10.y-based kernel, targeting kernel version 5.10.y:
|
||||
|
||||
ld -m elf_x86_64 -whole-archive -whole-archive -r \
|
||||
-o .../quickassist/.../performance/cpa_sample_code.o
|
||||
ld: no input files
|
||||
|
||||
This occurs because the Makefile in question uses the major kernel
|
||||
version of the build host's running kernel, as opposed to the target
|
||||
kernel's version.
|
||||
|
||||
This commit fixes this issue as follows:
|
||||
|
||||
* Do not redefine KERNELVERSION; use a new make variable named
|
||||
KVER_MAJOR instead.
|
||||
|
||||
* Use the target kernel's version from the KERNELVERSION variable to
|
||||
define the KVER_MAJOR variable's value.
|
||||
|
||||
* Add helpful debugging output.
|
||||
|
||||
Note: This patch is for qat17-4.13.0, and even though qat17-4.14.0 has
|
||||
slightly improved this Makefile to check for kernel major versions
|
||||
greater than '5' as well, the same fix is necessary there too.
|
||||
|
||||
Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com>
|
||||
---
|
||||
.../src/sample_code/performance/Makefile | 12 ++++++++++--
|
||||
1 file changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/quickassist/lookaside/access_layer/src/sample_code/performance/Makefile b/quickassist/lookaside/access_layer/src/sample_code/performance/Makefile
|
||||
index 9ac31dd..0468892 100644
|
||||
--- a/quickassist/lookaside/access_layer/src/sample_code/performance/Makefile
|
||||
+++ b/quickassist/lookaside/access_layer/src/sample_code/performance/Makefile
|
||||
@@ -310,7 +310,15 @@ endif
|
||||
ifeq ($(ICP_OS_LEVEL),kernel_space)
|
||||
SOURCES += qae/$(OS)/$(ICP_OS_LEVEL)/qae_mem_utils.c
|
||||
ifeq ($(OS),linux)
|
||||
- KERNELVERSION=$(shell uname -r | cut -d'.' -f1)
|
||||
+ ifeq ($(KERNELVERSION),)
|
||||
+ KVER_MAJOR=$(shell uname -r | cut -d'.' -f1)
|
||||
+ else
|
||||
+ KVER_MAJOR=$(shell echo "$(KERNELVERSION)" | cut -d'.' -f1)
|
||||
+ endif
|
||||
+ $(info Debug: KERNELRELEASE=$(KERNELRELEASE))
|
||||
+ $(info Debug: KERNELVERSION=$(KERNELVERSION))
|
||||
+ $(info Debug: VERSION=$(VERSION) PATCHLEVEL=$(PATCHLEVEL))
|
||||
+ $(info Debug: KVER_MAJOR=$(KVER_MAJOR))
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -390,7 +398,7 @@ endif
|
||||
RM=rm -f
|
||||
ifeq ($(OS),linux)
|
||||
ifeq ($(ICP_OS_LEVEL),kernel_space)
|
||||
- ifeq ($(shell test $(KERNELVERSION) -ge 5; echo $$?), 0)
|
||||
+ ifeq ($(shell test $(KVER_MAJOR) -ge 5; echo $$?), 0)
|
||||
ADDITIONAL_KERNEL_LIBS=$(patsubst %.c, %.o, $(SOURCES))
|
||||
endif
|
||||
endif
|
||||
--
|
||||
2.31.1
|
||||
|
Loading…
Reference in New Issue
Block a user