drivers/thirdparty: add copy-drivers.sh to using thirdparty drivers

copy-drivers.sh is used for:
1, Prepare git sub-module;
2, Copy thirdparty drivers to override kernel native drivers.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
This commit is contained in:
Jianping Liu 2024-07-19 17:24:41 +08:00
parent 4289221dd2
commit dd05b94243
6 changed files with 27 additions and 1 deletions

View File

@ -597,6 +597,11 @@ case $KernUnameR in
# Prepare Kernel config
BuildConfig() {
# Prepare git sub-module, copy thirdparty drivers to override kernel native drivers
pushd $_KernSrc/drivers/thirdparty
./copy-drivers.sh
popd
mkdir -p $_KernBuild
pushd $_KernBuild
cp $1 .config

View File

@ -243,4 +243,6 @@ source "drivers/hte/Kconfig"
source "drivers/cdx/Kconfig"
source "drivers/thirdparty/Kconfig"
endmenu

View File

@ -3,6 +3,7 @@ config INFINIBAND_BNXT_RE
tristate "Broadcom Netxtreme HCA support"
depends on 64BIT
depends on INET && DCB && BNXT
depends on !THIRDPARTY_BNXT
help
This driver supports Broadcom NetXtreme-E 10/25/40/50 gigabit
RoCE HCAs. To compile this driver as a module, choose M here:

8
drivers/thirdparty/Kconfig vendored Normal file
View File

@ -0,0 +1,8 @@
# SPDX-License-Identifier: GPL-2.0
menu "Thirdparty Drivers"
config THIRDPARTY_BNXT
bool
default y
endmenu

10
drivers/thirdparty/copy-drivers.sh vendored Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
if [ ! -e release-drivers/.git ] ; then
timeout 300 git clone https://gitee.com/OpenCloudOS/release-drivers.git release-drivers/
fi
if [ -e release-drivers/bnxt ]; then
rm -rf ../../drivers/net/ethernet/broadcom/bnxt
cp -a release-drivers/bnxt ../../drivers/net/ethernet/broadcom/
fi

@ -1 +1 @@
Subproject commit 19cd069eab785765ddde4d8b35e9c329c609c5d7
Subproject commit 9d8f838a01628124590fbea985b120ecfaef9982