diff --git a/README.md b/README.md deleted file mode 100644 index 95957d3676cd175e743748d179238be61f1bbd1d..0000000000000000000000000000000000000000 --- a/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# kae_driver - -#### 介绍 -{**以下是码云平台说明,您可以替换此简介** -码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 -无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 码云特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 -5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/kae_driver-1.1.10.tar.gz b/kae_driver-1.1.10.tar.gz deleted file mode 100644 index 84093c57d316375b53259bfc2ca1dde4375274cb..0000000000000000000000000000000000000000 Binary files a/kae_driver-1.1.10.tar.gz and /dev/null differ diff --git a/kae_driver-1.2.8.tar.gz b/kae_driver-1.2.8.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..c1a687e7719a793e05e195bdc24dff9ef9cd4b57 Binary files /dev/null and b/kae_driver-1.2.8.tar.gz differ diff --git a/kae_driver.spec b/kae_driver.spec index 0b8f83d8f5e42e12e8a667f78f8ab13d0a861a09..437fa49eb883afed7e511bab30256fa86594e4ff 100644 --- a/kae_driver.spec +++ b/kae_driver.spec @@ -1,81 +1,236 @@ -Name: kae_driver -Summary: Kunpeng Accelerator Engine Kernel Driver -Version: 1.1.10 -Release: 1 -Source: %{name}-%{version}.tar.gz -Vendor: Huawei Corporation -License: GPL-2.0 -ExclusiveOS: linux -ExclusiveArch: aarch64 -Group: System Environment/Kernel -Provides: %{name} = %{version} -URL:https://support.huawei.com -BuildRoot: %{_tmppath}/%{name}-%{version}-root - -Conflicts: %{name} < %{version} -BuildRequires: kernel-devel, gcc, make - %define kernel_version %(uname -r) +%define kae_driver_path %{_builddir}/%{name}-%{version} + +%global debug_package %{nil} + +Name: kae_driver +Summary: Kunpeng Accelerator Engine Kernel Driver +Version: 1.2.8 +Release: 2 +License: GPL-2.0 +Source: %{name}-%{version}.tar.gz +Vendor: Huawei Corporation +ExclusiveOS: linux +URL: https://support.huawei.com +BuildRoot: %{_tmppath}/%{name}-%{version}-root +Conflicts: %{name} < %{version}-%{release} +Provides: %{name} = %{version}-%{release} +BuildRequires: kernel-devel, gcc, make %description This package contains the Kunpeng Accelerator Engine Kernel Driver +%package -n uacce +Summary: Unified/User-space-access-intended Accelerator Framework +Conflicts: %{name} < %{version}-%{release} +Provides: %{name} = %{version}-%{release} + +%description -n uacce +This package contains the Unified/User-space-access-intended Accelerator Framework. + +%package -n hisi_sec2 +Summary: Huawei Hisilicon SEC Accelerator Driver +Requires: uacce >= %{version}-%{release} +Conflicts: %{name} < %{version}-%{release} +Provides: %{name} = %{version}-%{release} + +%description -n hisi_sec2 +This package contains the Huawei Hisilicon SEC Accelerator Driver. + +%package -n hisi_hpre +Summary: Huawei Hisilicon HPRE Accelerator Driver +Requires: uacce >= %{version}-%{release} +Conflicts: %{name} < %{version}-%{release} +Provides: %{name} = %{version}-%{release} + +%description -n hisi_hpre +This package contains the Huawei Hisilicon HPRE Accelerator Driver. + +%package -n hisi_zip +Summary: Huawei Hisilicon ZIP Accelerator Driver +Requires: uacce >= %{version}-%{release} +Conflicts: %{name} < %{version}-%{release} +Provides: %{name} = %{version}-%{release} + +%description -n hisi_zip +This package contains the Huawei Hisilicon ZIP Accelerator Driver. + +%package -n hisi_rde +Summary: Huawei Hisilicon RDE Accelerator Driver +Requires: uacce >= %{version}-%{release} +Conflicts: %{name} < %{version}-%{release} +Provides: %{name} = %{version}-%{release} + +%description -n hisi_rde +This package contains the Huawei Hisilicon RDE Accelerator Driver. + %prep -%global debug_package %{nil} -%setup -c -n %{name}-%{version} +%setup -n %{name}-%{version} %build -cd kmodules make - %install mkdir -p ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra -install -p -m 0644 kmodules/uacce/uacce.ko ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra -install -p -m 0644 kmodules/hisilicon/hisi_qm.ko ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra -install -p -m 0644 kmodules/hisilicon/sec2/hisi_sec2.ko ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra -install -p -m 0644 kmodules/hisilicon/hpre/hisi_hpre.ko ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra mkdir -p ${RPM_BUILD_ROOT}/etc/modprobe.d -install -p -m 0644 kmodules/conf/hisi_sec2.conf ${RPM_BUILD_ROOT}/etc/modprobe.d -install -p -m 0644 kmodules/conf/hisi_hpre.conf ${RPM_BUILD_ROOT}/etc/modprobe.d +install -b -m -644 %{kae_driver_path}/uacce/uacce.ko ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra +install -b -m -644 %{kae_driver_path}/hisilicon/hisi_qm.ko ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra +install -b -m -644 %{kae_driver_path}/hisilicon/sec2/hisi_sec2.ko ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra +install -b -m -644 %{kae_driver_path}/conf/hisi_sec2.conf ${RPM_BUILD_ROOT}/etc/modprobe.d/hisi_sec2.conf +install -b -m -644 %{kae_driver_path}/hisilicon/hpre/hisi_hpre.ko ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra +install -b -m -644 %{kae_driver_path}/conf/hisi_hpre.conf ${RPM_BUILD_ROOT}/etc/modprobe.d/hisi_hpre.conf +install -b -m -644 %{kae_driver_path}/hisilicon/zip/hisi_zip.ko ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra +install -b -m -644 %{kae_driver_path}/conf/hisi_zip.conf ${RPM_BUILD_ROOT}/etc/modprobe.d/hisi_zip.conf +install -b -m -644 %{kae_driver_path}/hisilicon/rde/hisi_rde.ko ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra +install -b -m -644 %{kae_driver_path}/conf/hisi_rde.conf ${RPM_BUILD_ROOT}/etc/modprobe.d/hisi_rde.conf %clean rm -rf ${RPM_BUILD_ROOT} +%pre -n uacce +echo "checking installed modules" +if [[ "$1" = "1" || "$1" = "2" ]] ; then #1: install 2: update + echo "uacce modules start to install" +fi -%files -%defattr(644,root,root) -/lib/modules/%{kernel_version}/extra/uacce.ko -/lib/modules/%{kernel_version}/extra/hisi_qm.ko -/lib/modules/%{kernel_version}/extra/hisi_sec2.ko -/lib/modules/%{kernel_version}/extra/hisi_hpre.ko +%pre -n hisi_sec2 +echo "checking installed modules" +if [[ "$1" = "1" || "$1" = "2" ]] ; then #1: install 2: update + echo "hisi_sec2 modules start to install" +fi -%config(noreplace) /etc/modprobe.d/hisi_sec2.conf -%config(noreplace) /etc/modprobe.d/hisi_hpre.conf +%pre -n hisi_hpre +echo "checking installed modules" +if [[ "$1" = "1" || "$1" = "2" ]] ; then #1: install 2: update + echo "hisi_hpre modules start to install" +fi + +%pre -n hisi_zip +echo "checking installed modules" +if [[ "$1" = "1" || "$1" = "2" ]] ; then #1: install 2: update + echo "hisi_zip modules start to install" +fi -%pre +%pre -n hisi_rde echo "checking installed modules" if [[ "$1" = "1" || "$1" = "2" ]] ; then #1: install 2: update - echo "%{name} modules start to install" + echo "hisi_rde modules start to install" +fi + +%post -n uacce +if [[ "$1" = "1" || "$1" = "2" ]] ; then #1: install 2: update + /sbin/depmod -a > /dev/null 2>&1 || true +fi +echo "uacce modules installed" + +%post -n hisi_sec2 +if [[ "$1" = "1" || "$1" = "2" ]] ; then #1: install 2: update + /sbin/depmod -a > /dev/null 2>&1 || true +fi +echo "hisi_sec2 modules installed" + +%post -n hisi_hpre +if [[ "$1" = "1" || "$1" = "2" ]] ; then #1: install 2: update + /sbin/depmod -a > /dev/null 2>&1 || true +fi +echo "hisi_hpre modules installed" + +%post -n hisi_zip +if [[ "$1" = "1" || "$1" = "2" ]] ; then #1: install 2: update + /sbin/depmod -a > /dev/null 2>&1 || true fi +echo "hisi_zip modules installed" -%post +%post -n hisi_rde if [[ "$1" = "1" || "$1" = "2" ]] ; then #1: install 2: update /sbin/depmod -a > /dev/null 2>&1 || true fi -echo "%{name} modules installed" +echo "hisi_rde modules installed" + +%preun -n uacce +if [ "$1" = "0" ] ; then #0: uninstall + echo "uacce modules uninstalling" +fi + +%preun -n hisi_sec2 +if [ "$1" = "0" ] ; then #0: uninstall + echo "hisi_sec2 modules uninstalling" +fi + +%preun -n hisi_hpre +if [ "$1" = "0" ] ; then #0: uninstall + echo "hisi_hpre modules uninstalling" +fi -%preun +%preun -n hisi_zip if [ "$1" = "0" ] ; then #0: uninstall - echo "%{name} modules uninstalling" + echo "hisi_zip modules uninstalling" fi -%postun +%preun -n hisi_rde +if [ "$1" = "0" ] ; then #0: uninstall + echo "hisi_rde modules uninstalling" +fi + +%postun -n uacce if [ "$1" = "0" ] ; then #0: uninstall /sbin/depmod -a > /dev/null 2>&1 || true fi -echo "%{name} modules uninstalled" +echo "uacce modules uninstalled" -%changelog +%postun -n hisi_sec2 +if [ "$1" = "0" ] ; then #0: uninstall + /sbin/depmod -a > /dev/null 2>&1 || true +fi +echo "hisi_sec2 modules uninstalled" + +%postun -n hisi_hpre +if [ "$1" = "0" ] ; then #0: uninstall + /sbin/depmod -a > /dev/null 2>&1 || true +fi +echo "hisi_hpre modules uninstalled" + +%postun -n hisi_zip +if [ "$1" = "0" ] ; then #0: uninstall + /sbin/depmod -a > /dev/null 2>&1 || true +fi +echo "hisi_zip modules uninstalled" + +%postun -n hisi_rde +if [ "$1" = "0" ] ; then #0: uninstall + /sbin/depmod -a > /dev/null 2>&1 || true +fi +echo "hisi_rde modules uninstalled" +%files -n uacce +%defattr(644,root,root) +/lib/modules/%{kernel_version}/extra/uacce.ko +/lib/modules/%{kernel_version}/extra/hisi_qm.ko + + +%files -n hisi_sec2 +%defattr(644,root,root) +/lib/modules/%{kernel_version}/extra/hisi_sec2.ko +%config(noreplace) /etc/modprobe.d/hisi_sec2.conf + +%files -n hisi_hpre +%defattr(644,root,root) +/lib/modules/%{kernel_version}/extra/hisi_hpre.ko +%config(noreplace) /etc/modprobe.d/hisi_hpre.conf + +%files -n hisi_zip +%defattr(644,root,root) +/lib/modules/%{kernel_version}/extra/hisi_zip.ko +%config(noreplace) /etc/modprobe.d/hisi_zip.conf + +%files -n hisi_rde +%defattr(644,root,root) +/lib/modules/%{kernel_version}/extra/hisi_rde.ko +%config(noreplace) /etc/modprobe.d/hisi_rde.conf + +%changelog +* Mon Jan 20 2020 catastrowings 1.2.7-2 +- compatible with openEuler +* Tue Jan 07 2020 jinbinhua 1.2.7-1 +- First Spec Version Include all Kunpeng Accelerator Engine Kernel Driver Code