Procedure
The patch in the TEE is required by a CA to communicate with a TA. This document uses openEuler 20.03 LTS-SP1 as an example to describe how to compile and deploy the patch.
Installing the SEC Driver License
Please contact the Huawei service owner to apply for the TaiShan server license (model: iBMCV2-02-KAE-01). After obtaining the server license, install it by performing the following steps:
- Log in to the iBMC and choose .

- Click Install to upload the KAE license that you have obtained.
After the installation is complete, the SEC feature is enabled on the iBMC.

Setting the BIOS
Restart the server. In the BIOS, enable the TrustZone feature and configure the TEE secure memory size.
- Restart the server and go to the BIOS.

- Choose .

- Enable Support TEE and set TEE Memory Size.

- Save the BIOS settings and restart the server to go to the OS in the REE.
Obtaining the iTrustee Patch Package
- Download the itrustee_client source code.
git clone -b v1.0.0 https://gitee.com/openeuler/itrustee_client.git
- Download the itrustee_tzdriver source code.
git clone -b v1.0.0 https://gitee.com/openeuler/itrustee_tzdriver.git
- Download the libboundscheck source code.
git clone https://gitee.com/openeuler/libboundscheck.git
- Save the libboundscheck source code to the itrustee_client/ and itrustee_tzdriver/ directories and rename the folders to libboundscheck. The following figure shows the directory structure:


- Install the dependencies.
1yum install openssl-devel zlib-devel
- Compile itrustee_tzdriver.
1cd itrustee_tzdriver && make
After the compilation is complete, a tzdriver.ko kernel module is generated.

- Modify the Makefile file of itrustee_client.
- Compile itrustee_client.
1cd itrustee_client && make
After the compilation is complete, a dist directory is generated for storing the generated executable binary and dynamic libraries.


- Deploy itrustee_client.
1 2 3
cp -rf dist/*.so /usr/lib64 && ldconfig cp -rf dist/teecd /usr/bin cp -rf dist/tlogcat /usr/bin
Save the patch driver dependencies, libboundscheck.so and libteec.so, to /usr/lib64. The tlogcat process provides the capability of viewing TEE logs on the REE side. The teecd process is the user-mode daemon in the REE. The two processes must be stored in the specified directory /usr/bin.
Loading the REE Driver
- Load the tzdriver.ko kernel module.
1 2
cd itrustee_tzdriver/ insmod tzdriver.ko && lsmod | grep tzdriver

- Load the teecd daemon process.
1 2
/usr/bin/teecd & ps aux | grep teecd

The teecd process must run in an absolute path, that is, /usr/bin/teecd. The ampersand sign (&) indicates that the process is executed in the background.
- View TEE logs and verify that the REE can communicate with the TEE.
1tlogcat


