dist: not integrate mlnx commercial drivers in oc9

Some oc9 partners have nic driver, and the driver support RDMA and
the driver only compatble with kernel native infiniband.

If integrate mlnx driver, oc9 partners RDMA nic driver cloud not run.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
This commit is contained in:
Jianping Liu 2024-08-27 19:01:43 +08:00
parent 3db1e8157b
commit 4eb6f1908f
2 changed files with 19 additions and 10 deletions

2
dist/Makefile vendored
View File

@ -159,7 +159,9 @@ dist-tarball:
dist-drivers: dist-drivers:
@echo "Preparing thirdparty drivers." @echo "Preparing thirdparty drivers."
ifneq ($(KDIST),oc9)
@cd $(TOPDIR)/dist/sources/ ; ./download-and-copy-drivers.sh ; cd $(TOPDIR) @cd $(TOPDIR)/dist/sources/ ; ./download-and-copy-drivers.sh ; cd $(TOPDIR)
endif
$(CONFIGFILE): $(DISTFILES) $(CONFIGFILE): $(DISTFILES)
@echo "Generating kernel config style '$(CONFIG)'" @echo "Generating kernel config style '$(CONFIG)'"

View File

@ -472,7 +472,12 @@ This package provides debug information for the bpftool package.
# To avoid compile error, do not integrate mlnx commercial quality drivers if not tencentos release. # To avoid compile error, do not integrate mlnx commercial quality drivers if not tencentos release.
# Users could compile and install MLNX_OFED_LINUX-* manually. # Users could compile and install MLNX_OFED_LINUX-* manually.
%if "%{?dist}" != ".tl4" && "%{?dist}" != ".oc9" && "%{?dist}" != ".tl3" #
# Some oc9 partners have nic driver, and the driver support RDMA and only compatble with kernel native infiniband.
# If integrate mlnx driver, oc9 partners RDMA nic driver cloud not run.
#
# %if "%{?dist}" != ".tl4" && "%{?dist}" != ".oc9" && "%{?dist}" != ".tl3"
%if "%{?dist}" != ".tl4" && "%{?dist}" != ".tl3"
%define with_ofed 0 %define with_ofed 0
%endif %endif
@ -628,15 +633,17 @@ case $KernUnameR in
# Prepare Kernel config # Prepare Kernel config
BuildConfig() { BuildConfig() {
# Prepare git sub-module, copy thirdparty drivers to override kernel native drivers # Copy mlnx drivers to drivers/thirdparty/release-drivers/mlnx/ dir
pushd ${_KernSrc}/drivers/thirdparty %if %{with_ofed}
rm -f download-and-copy-drivers.sh; cp -a %{SOURCE3000} ./ pushd ${_KernSrc}/drivers/thirdparty
if [ -e ../../dist/sources ]; then rm -f download-and-copy-drivers.sh; cp -a %{SOURCE3000} ./
./copy-drivers.sh if [ -e ../../dist/sources ]; then
else ./copy-drivers.sh
cp -a %{SOURCE3001} release-drivers/mlnx/ else
fi cp -a %{SOURCE3001} release-drivers/mlnx/
popd fi
popd
%endif
mkdir -p $_KernBuild mkdir -p $_KernBuild
pushd $_KernBuild pushd $_KernBuild