diff --git a/README.en.md b/README.en.md index 95f896fe518efcda76e99de344c36d5efc96dee4..e3b6bdbb4dccc82a1081325137c9fd31f7d8a060 100644 --- a/README.en.md +++ b/README.en.md @@ -2,6 +2,10 @@ #### Description provide Montage Trust & Security System Extension driver for openEuler LTS version. +TSSE driver suports: +1. LKCF(SM2/SM3/SM4 and AES/SHA etc.) +2. SRIOV +3. PF/VF mailbox #### Software Architecture Software architecture description diff --git a/README.md b/README.md index 1c96f912386476fbf9e7a214cb8a95e7c9ba7078..2d6cf336bd86270653cbcf1030cda5fd3984575f 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ #### 介绍 provide Montage Trust & Security System Extension driver for openEuler LTS version. +TSSE driver suports: +1. LKCF(SM2/SM3/SM4 and AES/SHA etc.) +2. SRIOV +3. PF/VF mailbox #### 软件架构 软件架构说明 diff --git a/TSSE-driver.spec b/TSSE-driver.spec new file mode 100644 index 0000000000000000000000000000000000000000..47ee180b02417234a697d92f6869218c92da00a6 --- /dev/null +++ b/TSSE-driver.spec @@ -0,0 +1,79 @@ +%define vendor Montage Technology. +%define driver_name tsse +%define version 0.5.0 +%define release 1 +%define kernel_version %(uname -r) +%define compile_flag TSSE_RX_TIMEOUT=y + +Name: %{driver_name} +Version: %{version} +Release: %{release} +Summary: Montage TSSE Driver Program package +Group: System/Kernel +License: GPLv2 +Vendor: %{vendor} +Packager: %{vendor} + +URL: https://gitee.com/openeuler/TSSE-driver + +Source0: %{name}-%{version}.tar.gz +Source1: tsse.conf +Source2: load_tsse.conf + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +BuildRequires: gcc +BuildRequires: make + + +%global debug_package %{nil} + +%description +Montage TSSE module driver. + +%prep +%setup -n %{name}-%{version} + +%build +make %{compile_flag} + +%install +rm -rf ${RPM_BUILD_ROOT} + +dest_dir=${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/updates/%{name}/ +mkdir -p $dest_dir + +install -m 444 %{_builddir}/%{name}-%{version}/tsse_common/tsse_common.ko $dest_dir +install -m 444 %{_builddir}/%{name}-%{version}/tsse_pf/tsse_pf.ko $dest_dir +install -m 444 %{_builddir}/%{name}-%{version}/tsse_vf/tsse_vf.ko $dest_dir + +mkdir -p ${RPM_BUILD_ROOT}/etc/dracut.conf.d +install -m 755 %{S:1} ${RPM_BUILD_ROOT}/etc/dracut.conf.d/tsse.conf + +mkdir -p ${RPM_BUILD_ROOT}/etc/modules-load.d +install -m 755 %{S:2} ${RPM_BUILD_ROOT}/etc/modules-load.d/load_tsse.conf + + +%post +depmod +dracut --force + +%postun +depmod +dracut --force + + +%files +%defattr(644, root, root) +/lib/modules/%{kernel_version}/updates/%{name}/tsse_common.ko +/lib/modules/%{kernel_version}/updates/%{name}/tsse_pf.ko +/lib/modules/%{kernel_version}/updates/%{name}/tsse_vf.ko +/etc/dracut.conf.d/tsse.conf +/etc/modules-load.d/load_tsse.conf + +%clean +rm -rf $RPM_BUILD_ROOT + +%changelog +* Sun Nov 19 2023 Montage Technology - 0.5.0-1. +- DESC: First TSSE package for OE community. + diff --git a/load_tsse.conf b/load_tsse.conf new file mode 100644 index 0000000000000000000000000000000000000000..16ee08b4c1b7d0f9c489ce98a66107b2eac4297f --- /dev/null +++ b/load_tsse.conf @@ -0,0 +1,3 @@ +tsse_common +tsse_pf +tsse_vf diff --git a/tsse-0.5.0.tar.gz b/tsse-0.5.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..204e2cf303f82d7c4ab6153b60a621f8690d5a2f Binary files /dev/null and b/tsse-0.5.0.tar.gz differ diff --git a/tsse.conf b/tsse.conf new file mode 100644 index 0000000000000000000000000000000000000000..1892d94fc4ab931cee52ed7c16a6bcc507f0e9ff --- /dev/null +++ b/tsse.conf @@ -0,0 +1,3 @@ +add_drivers+=" tsse_common " +add_drivers+=" tsse_pf " +add_drivers+=" tsse_vf "