diff --git a/kmod-dinghai.spec b/kmod-dinghai.spec index 67901bf778d1ed8f8dda65c4adac689b5bd52b76..1b1a57f49174eebe3e901d0d435caeb4c760b1a1 100644 --- a/kmod-dinghai.spec +++ b/kmod-dinghai.spec @@ -1,6 +1,6 @@ %global pkg dinghai %define pkg_version 2.24.20.02 -%define release 1 +%define release 2 %global debug_package %{nil} @@ -9,7 +9,7 @@ Version: %{pkg_version} Release: %{release}%{?dist} Summary: ZTE SmartNIC and DPU driver License: GPLv2 -URL: https://gitee.com/anolis/kmod-dinghai +URL: https://gitee.com/src-openeuler/kmod-dinghai Source0: kmod-%{pkg}.tar.gz Epoch: 1 @@ -42,16 +42,34 @@ RPM Package for ZXDH Driver %setup -q -n kmod-%{pkg} %build +cat /usr/include/linux/version.h echo "kernel_version:%{kernel_version}" pushd crypto/zsda %{__make} %{?_smp_mflags} -C %{kernel_source} M=$PWD modules CONFIG_ACC_ZSDA_COMMON=m CONFIG_ACC_ZSDA_PF=m CONFIG_ACC_ZSDA_VF=m popd +pushd net/build + ./build.pl -t clean --ksrc %{kernel_source} + ./build.pl -t kernel -m CONFIG_DINGHAI_ETH -m CONFIG_ZXDH_AUXILIARY -m CONFIG_DINGHAI_PF -m CONFIG_ZXDH_SF -m CONFIG_DINGHAI_EN_AUX -m HAVE_DEV_PM_DOMAIN_ATTACH\ + -m HAVE_BUS_FIND_DEVICE_GET_CONST -m CONFIG_DINGHAI_DH_CMD -m CONFIG_DINGHAI_NP -m CONFIG_DINGHAI_PTP -m CONFIG_DINGHAI_TSN\ + -m CONFIG_ZXDH_MSGQ -m CONFIG_ZXDH_HARDWARE_BOND --ksrc %{kernel_source} -j 7 +popd +pushd rdma + ./build.sh --ksrc %{kernel_source} --use_rel_net_path +popd + + %install -mkdir -p %{buildroot}/lib/modules/%{kernel_version}/extra/drivers/dinghai/crypto/zsda/ -for ko in $(find crypto/zsda/accdevice/ -name '*.ko'); do +mkdir -p %{buildroot}/lib/modules/%{kernel_version}/extra/drivers/dinghai/crypto/ +mkdir -p %{buildroot}/lib/modules/%{kernel_version}/extra/drivers/dinghai/net/ +mkdir -p %{buildroot}/lib/modules/%{kernel_version}/extra/drivers/dinghai/rdma +for ko in $(find crypto/zsda/accdevice/ net/drivers/ rdma/ -name '*.ko'); do if [[ $ko == crypto/zsda/accdevice/* ]]; then - target_dir=%{buildroot}/lib/modules/%{kernel_version}/extra/drivers/dinghai/crypto/zsda/ + target_dir=%{buildroot}/lib/modules/%{kernel_version}/extra/drivers/dinghai/crypto/ + elif [[ $ko == net/drivers/* ]]; then + target_dir=%{buildroot}/lib/modules/%{kernel_version}/extra/drivers/dinghai/net/ + elif [[ $ko == rdma/* ]]; then + target_dir=%{buildroot}/lib/modules/%{kernel_version}/extra/drivers/dinghai/rdma/ fi %{__install} -D -t $target_dir $ko done @@ -80,8 +98,8 @@ depmod -a > /dev/null 2>&1 %preun list_file="/var/run/rpm-%{pkg}-modules.list" mkdir -p /var/run -for ko in $(find %{buildroot}/lib/modules/%{kernel_version}/extra/drivers/dinghai/crypto/zsda/ -name '*.ko'); do - echo "${ko#%{buildroot}}" >> $list_file +for ko in $(find /lib/modules/%{kernel_version}/extra/drivers/dinghai/ -name '*.ko'); do + echo "${ko}" >> $list_file done %postun @@ -99,6 +117,9 @@ rm /var/run/rpm-%{pkg}-modules.list %config(noreplace) %{_sysconfdir}/depmod.d/%{pkg}.conf %changelog +* Wed Sep 25 2024 hcf - 1:2.24.20.02-2 +- Add net and rdma code + * Wed Aug 28 2024 hcf - 1:2.24.20.02-1 - Dinghai driver init diff --git a/kmod-dinghai.tar.gz b/kmod-dinghai.tar.gz index 6b12511680f820ce630022dc7ee5bd76750e6181..a5c063a7fd6fba9f6c22c489bffa69062ffe7b19 100644 Binary files a/kmod-dinghai.tar.gz and b/kmod-dinghai.tar.gz differ