Installation Using RPM Packages (KAE 1.0)
KAE 1.0 RPM software packages include hisi_hpre, hisi_sec2, hisi_zip, libkaezip, libkae, UACCE, and libwd. UACCE and libwd are required, and the others are optional.
Prerequisites
Procedure
The hisi_zip driver package depends on the UACCE package, and the libkaezip package depends on the libwd package.
If only the zlib library compression algorithm needs to be accelerated, install only the UACCE, hisi_zip, libwd, and libkaezip packages.
- Use an SSH tool to remotely log in to the Linux CLI as the root user.
- Copy the KAE RPM software packages to a custom directory.
- Install the accelerator driver software packages.
- Method 1: Run the rpm -ivh *.rpm command to install all KAE RPM software packages.
1rpm -ivh *.rpm
Command output:1 2 3 4 5 6 7 8 9 10
Preparing... ################################# [100%] checking installed modules Updating / installing... 1:uacce-1.0.1-1.centos7.6 ################################# [ 14%] modules installed 2:libwd-1.0.1-1.centos7.6 ################################# [ 29%] 3:libkae-1.0.1-1.centos7.6 ################################# [ 43%] checking installed modules 7:hisi_zip-1.0.1-1.centos7.6 ################################# [100%] modules installed
- Method 2: Install the RPM packages in sequence. See the following example to install the uacce-1.0.1 software package.
1rpm -ivh uacce-1.0.1-1.centos7.6.aarch64.rpm
Command output:1 2 3 4 5
Preparing... ################################# [100%] checking installed modules Updating / installing... 1:uacce-1.0.1-1.centos7.6 ################################# [100%] modules installed
Similarly, install the hisi_zip driver package and libwd engine package in sequence.
- Method 1: Run the rpm -ivh *.rpm command to install all KAE RPM software packages.
- Check whether the RPM packages are installed in the system.
- Check whether UACCE is installed.
1rpm -ql uacce
Command output:
1 2
/lib/modules/4.14.0-115.el7a.0.1.aarch64/extra/hisi_qm.ko /lib/modules/4.14.0-115.el7a.0.1.aarch64/extra/uacce.ko
- Check whether hisi_zip is installed.
1rpm -ql hisi_zip
Command output:
1 2
/lib/modules/4.14.0-115.el7a.0.1.aarch64/extra/hisi_zip.ko /etc/modproe.d/hisi_zip.conf
- Check whether the corresponding modules are generated in the installation directory.
1ls -al /lib/modules/`uname -r`/extra
Command output:
1 2 3 4 5
total 3672 drwxr-xr-x. 2 root root 118 Nov 17 21:56 . drwxr-xr-x. 7 root root 4096 Nov 17 21:56 .. -rw-r--r--. 1 root root 396784 Nov 12 17:32 hisi_zip.ko -rw-r--r--. 1 root root 467160 Nov 12 17:32 uacce.ko
- Check whether the corresponding configuration files are generated in /etc/modprobe.d/.
1ls -al /etc/modprobe.d/
Command output:
1 2 3 4 5 6
total 36 drwxr-xr-x. 2 root root 140 Nov 17 21:56 . drwxr-xr-x. 127 root root 8192 Nov 17 22:14 .. -rw-r--r--. 1 root root 166 Oct 30 2018 firewalld-sysctls.conf -rw-r--r--. 1 root root 43 Nov 17 21:56 hisi_zip.conf -rw-r--r--. 1 root root 674 Jul 4 2018 tuned.conf
- Check whether UACCE is installed.
- (Optional) If a SUSE OS is used, set allow_unsupported_modules in the /etc/modprobe.d/10-unsupported-modules.conf configuration file to 1 before loading external drivers.
- Load the accelerator drivers to the kernel.
- Method 1: Restart the system.
- Method 2: Manually load the drivers in sequence in the CLI and check whether the loading is successful.
- Query UACCE driver modules that have been loaded to the kernel.
1lsmod | grep uacce
If no command output is displayed, perform 6.b to 6.c to load the corresponding modules to the kernel.
- Load the UACCE driver.
1modprobe uacce - Load the hisi_zip driver to the kernel based on the configuration file in /etc/modprobe.d/hisi_zip.conf.
1modprobe hisi_zip - Query UACCE driver modules that have been loaded to the kernel again.
1lsmod | grep uacce
If the following information is displayed, the loading is successful.1uacce 36864 3 hisi_zip
- Query UACCE driver modules that have been loaded to the kernel.
Verifying the Installation
- View the KAE RPM software packages.
1rpm -qa uacce hisi_zip
If the following information is displayed, the installation is successful:1 2
uacce-1.0.1-1.centos7.6.aarch64 hisi_zip-1.0.1-1.centos7.6.aarch64
- Check the accelerator devices in the virtual file system.
1ls -al /sys/class/uacce/
Command output:1 2 3
total 0 lrwxrwxrwx. 1 root root 0 Nov 17 22:09 hisi_zip-6 -> ../../devices/pci0000:74/0000:74:00.0/0000:75:00.0/uacce/hisi_zip-6 lrwxrwxrwx. 1 root root 0 Nov 17 22:09 hisi_zip-7 -> ../../devices/pci0000:b4/0000:b4:00.0/0000:b5:00.0/uacce/hisi_zip-7
- Check whether the accelerator engines of the zlib library take effect.Run the ldd command to check whether the zlib library is linked to libwd and libkaezip.
1ldd /usr/local/kaezip/lib/libz.so.1.2.11If the following information is displayed, the zlib library has been installed. You can also run the ldd command to check whether libwd and libkaezip are used.1 2 3 4 5
linux-vdso.so.1 => (0x0000ffff80280000) libc.so.6 => /lib64/libc.so.6 (0x0000ffff80080000) libwd.so.1 => /lib64/libwd.so.1 (0x0000ffff80040000) /lib/ld-linux-aarch64.so.1 (0x0000ffff80290000) libkaezip.so => /usr/local/kaezip/lib/libkaezip.so (0x0000ffff80830000)
Parent topic: Installing KAE Using RPM Packages