Rate This Document
Findability
Accuracy
Completeness
Readability

Installation Using RPM Packages (KAE 2.0)

KAE 2.0 RPM software packages include kae-driver, kae-openssl, and kae-zip. To use KAEzip-related algorithms, you need to install kae-zip. You can install the other software packages as required to use corresponding modules and algorithms.

  • Currently, the RPM package of KAE 2.0 is built on a specified tag. It is dedicated to specific OSs and does not offer the latest features of KAE 2.0.
  • You are advised to install KAE 2.0 using the source code. To install KAE 2.0 using an RPM package on other OSs, perform the following steps to build an RPM package:
    1. Download the KAE 2.0 source package from https://gitee.com/kunpengcompute/KAE/tree/kae2/ or by running git clone https://gitee.com/kunpengcompute/KAE.git -b kae2.
    2. Run the yum install -y make kernel-devel libtool numactl-devel openssl-devel chrpath lz4-devel command to install dependencies.
    3. Run the sh build.sh rpmpack command in the KAE source code directory to build an RPM package.

Prerequisites

  • You have downloaded the RPM packages matching the OS. For KAE 2.0, download RPM packages of version v2.x.x from https://gitee.com/kunpengcompute/KAE/releases.
  • The RPM tool is available.
  • Run the yum install -y make kernel-devel libtool numactl-devel openssl-devel chrpath command to install dependencies.

Procedure

  1. Use an SSH tool to remotely log in to the Linux CLI as the root user.
  2. Copy the KAE 2.0 RPM software packages to a custom directory.
  3. Install the accelerator driver RPM package kae-driver.
    1
    rpm -ivh kae-driver-2.0.1-1.aarch64.rpm
    
    If the following information is displayed, the installation is successful:
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    Verifying...                          ################################# [100%]
    Preparing...                          ################################# [100%]
    Preprocessing before installing the driver
    checking installed modules
    uacce modules start to install
    checking installed modules
    hisi_sec2 modules start to install
    checking installed modules
    hisi_hpre modules start to install
    checking installed modules
    hisi_zip modules start to install
    Updating / installing...
       1:kae-driver-2.0.1-1               ################################# [100%]
    installing driver...
    uacce modules installed
    hisi_sec2 modules installed
    hisi_hpre modules installed
    hisi_zip modules installed
    
  4. Install the engine library RPM package kae-openssl.
    1
    rpm -ivh kae-openssl-2.0.1-1.aarch64.rpm
    
    If the following information is displayed, the installation is successful:
    1
    2
    3
    4
    5
    Verifying...                          ################################# [100%]
    Preparing...                          ################################# [100%]
    Updating / installing...
       1:kae-openssl-2.0.1-1              ################################# [100%]
    installing openssl engine...
    
  5. Install the KAEZip RPM package kae-zip.
    1
    rpm -ivh kae-zip-2.0.1-1.aarch64.rpm
    

    If the following information is displayed, the installation is successful:

    1
    2
    3
    4
    5
    6
    Verifying...                          ################################# [100%]
    Preparing...                          ################################# [100%]
    installing pre zip...
    Updating / installing...
       1:kae-zip-2.0.1-1                  ################################# [100%]
    installing post zip...
    
  6. Check whether related software has been installed in the system.
    1. Check whether the drivers are installed.
      • Check whether the accelerator engine file system exists in /sys/class/uacce.
        1
        ll /sys/class/uacce/
        
        If the following information is displayed, the drivers have been installed:
        1
        2
        3
        4
        5
        6
        lrwxrwxrwx. 1 root root 0 Aug 22 17:14 hisi_hpre-2 -> ../../devices/pci0000:78/0000:78:00.0/0000:79:00.0/uacce/hisi_hpre-2
        lrwxrwxrwx. 1 root root 0 Aug 22 17:14 hisi_hpre-3 -> ../../devices/pci0000:b8/0000:b8:00.0/0000:b9:00.0/uacce/hisi_hpre-3
        lrwxrwxrwx. 1 root root 0 Aug 22 17:14 hisi_sec2-0 -> ../../devices/pci0000:74/0000:74:01.0/0000:76:00.0/uacce/hisi_sec2-0
        lrwxrwxrwx. 1 root root 0 Aug 22 17:14 hisi_sec2-1 -> ../../devices/pci0000:b4/0000:b4:01.0/0000:b6:00.0/uacce/hisi_sec2-1
        lrwxrwxrwx. 1 root root 0 Aug 22 17:14 hisi_zip-4 -> ../../devices/pci0000:74/0000:74:00.0/0000:75:00.0/uacce/hisi_zip-4
        lrwxrwxrwx. 1 root root 0 Aug 22 17:14 hisi_zip-5 -> ../../devices/pci0000:b4/0000:b4:00.0/0000:b5:00.0/uacce/hisi_zip-5
        
      • Use lsmod to check whether the drivers are successfully installed.
        1
        lsmod | grep uacce
        
        If the following information is displayed, the drivers have been installed:
        1
        uacce                  32768  3 hisi_sec2,hisi_qm,hisi_zip
        
    2. Check whether the UADK framework is installed.
      1
      ll /usr/local/lib/libwd*
      
      The installation is successful if the following information is displayed:
       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      11
      12
      -rwxr-xr-x. 1 root root     961 Aug 22 17:23 /usr/local/lib/libwd_comp.la
      lrwxrwxrwx. 1 root root      19 Aug 22 17:23 /usr/local/lib/libwd_comp.so -> libwd_comp.so.2.5.0
      lrwxrwxrwx. 1 root root      19 Aug 22 17:23 /usr/local/lib/libwd_comp.so.2 -> libwd_comp.so.2.5.0
      -rwxr-xr-x. 1 root root  377872 Aug 22 17:23 /usr/local/lib/libwd_comp.so.2.5.0
      -rwxr-xr-x. 1 root root     973 Aug 22 17:23 /usr/local/lib/libwd_crypto.la
      lrwxrwxrwx. 1 root root      21 Aug 22 17:23 /usr/local/lib/libwd_crypto.so -> libwd_crypto.so.2.5.0
      lrwxrwxrwx. 1 root root      21 Aug 22 17:23 /usr/local/lib/libwd_crypto.so.2 -> libwd_crypto.so.2.5.0
      -rwxr-xr-x. 1 root root  715616 Aug 22 17:23 /usr/local/lib/libwd_crypto.so.2.5.0
      -rwxr-xr-x. 1 root root     907 Aug 22 17:23 /usr/local/lib/libwd.la
      lrwxrwxrwx. 1 root root      14 Aug 22 17:23 /usr/local/lib/libwd.so -> libwd.so.2.5.0
      lrwxrwxrwx. 1 root root      14 Aug 22 17:23 /usr/local/lib/libwd.so.2 -> libwd.so.2.5.0
      -rwxr-xr-x. 1 root root 1342080 Aug 22 17:23 /usr/local/lib/libwd.so.2.5.0
      
    3. Check whether KAE is successfully installed.
      1
       ll /usr/local/lib/engines-1.1
      

      The installation is successful if the following information is displayed:

      1
      2
      3
      4
      5
      6
      total 5644
      -rw-r--r--. 1 root root 3846524 Aug 22 17:28 kae.a
      -rwxr-xr-x. 1 root root     995 Aug 22 17:28 kae.la
      lrwxrwxrwx. 1 root root      12 Aug 22 17:28 kae.so -> kae.so.2.0.0
      lrwxrwxrwx. 1 root root      12 Aug 22 17:28 kae.so.2 -> kae.so.2.0.0
      -rwxr-xr-x. 1 root root 1967736 Aug 22 17:28 kae.so.2.0.0
      
    1. Check whether the KAEZlib decompression module is successfully installed.
      1
      ll /usr/local/kaezip/lib
      

      The installation is successful if the following information is displayed:

      1
      2
      3
      4
      5
      6
      7
      8
      9
      total 440
      lrwxrwxrwx. 1 root root     40 Jan 12  2024 libkaezip.so -> /usr/local/kaezip/lib/libkaezip.so.2.0.1
      lrwxrwxrwx. 1 root root     40 Jan 12  2024 libkaezip.so.0 -> /usr/local/kaezip/lib/libkaezip.so.2.0.1
      -rwxr-xr-x. 1 root root 148096 Jan 12  2024 libkaezip.so.2.0.1
      -rwxr-xr-x. 1 root root 146306 Jan 12  2024 libz.a
      lrwxrwxrwx. 1 root root     14 Jan 12  2024 libz.so -> libz.so.1.2.11
      lrwxrwxrwx. 1 root root     14 Jan 12  2024 libz.so.1 -> libz.so.1.2.11
      -rwxr-xr-x. 1 root root 143656 Jan 12  2024 libz.so.1.2.11
      drwxr-xr-x. 2 root root   4096 Dec  5 18:48 pkgconfig
      

Verifying the Installation

  1. View the KAE RPM software packages.
    1
    rpm -qa kae-driver kae-openssl kae-zip
    
    If the following information is displayed, the installation is successful:
    1
    2
    3
    kae-openssl-2.0.1-1.aarch64
    kae-driver-2.0.1-1.aarch64
    kae-zip-2.0.1-1.aarch64
    
  2. Check the accelerator devices in the virtual file system.
    1
    ls -al /sys/class/uacce/
    
    Command output:
    1
    2
    3
    4
    5
    6
    7
    total 0
    lrwxrwxrwx. 1 root root 0 Nov 14 03:45 hisi_hpre-2 -> ../../devices/pci0000:78/0000:78:00.0/0000:79:00.0/uacce/hisi_hpre-2
    lrwxrwxrwx. 1 root root 0 Nov 14 03:45 hisi_hpre-3 -> ../../devices/pci0000:b8/0000:b8:00.0/0000:b9:00.0/uacce/hisi_hpre-3
    lrwxrwxrwx. 1 root root 0 Nov 14 08:39 hisi_sec-0 -> ../../devices/pci0000:74/0000:74:01.0/0000:76:00.0/uacce/hisi_sec-0
    lrwxrwxrwx. 1 root root 0 Nov 14 08:39 hisi_sec-1 -> ../../devices/pci0000:b4/0000:b4:01.0/0000:b6:00.0/uacce/hisi_sec-1
    lrwxrwxrwx.  1 root root 0 Dec  5 18:59 hisi_zip-4 -> ../../devices/pci0000:74/0000:74:00.0/0000:75:00.0/uacce/hisi_zip-4
    lrwxrwxrwx.  1 root root 0 Dec  5 18:59 hisi_zip-5 -> ../../devices/pci0000:b4/0000:b4:00.0/0000:b5:00.0/uacce/hisi_zip-5