Linux平台 SGX 技术包括:SGX 驱动程序、SGX SDK 以及 SGX 平台软件 (PSW) ,其 SDK 和 PSW 均托管在 linux-sgx 项目中。

搭建 SGX 环境步骤如下:

1、安装相关依赖

  $ sudo apt-get install build-essential ocaml ocamlbuild automake autoconf libtool wget python-is-python3 libssl-dev git cmake perl

 

2、下载 linux-sgx 代码:

$ git clone https://github.com/intel/linux-sgx.git
$ cd linux-sgx && make preparation

这里,make preparation 中会执行 ./download_prebuilt.sh 脚本,下载 external/toolset 目录下的相关工具。

 

3、编译 sdk 及 sdk 安装器

$ make sdk
$ make sdk_install_pkg

之后,会在 linux/installer/bin/ 目录下看到 sgx_linux_x64_sdk_${version}.bin 类似的文件,执行该文件即可安装 SGX sdk

 

4、编译 psw 及 psw 安装器

$ make psw
$ make deb_psw_pkg

完成之后,就可以在 linux/installer/deb/libsgx-urts, linux/installer/deb/libsgx-enclave-common, linux/installer/deb/libsgx-uae-service, linux/installer/deb/libsgx-epid, linux/installer/deb/libsgx-launch, linux/installer/deb/libsgx-quote-ex and linux/installer/deb/sgx-aesm-service 目录下找到安装文件

sgx环境搭建

 

 

 

5、编译 debian 安装包

$ make deb_local_repo

这样即可在类似 linux/installer/deb/sgx_debian_local_repo 的目录下找到 deb 文件

sgx环境搭建

 

 

 

6、更新软件源,修改 /etc/apt/sources.list 文件

对于 ubuntu 21.04 版本,添加:

deb [trusted=yes arch=amd64] file:/PATH_TO_LOCAL_REPO hirsute main

保存后,再执行 apt-get update 命令,之后即可安装:

sgx环境搭建

 

相关文章:

  • 2022-12-23
  • 2021-08-01
  • 2022-12-23
  • 2022-12-23
  • 2021-09-27
  • 2022-01-17
  • 2021-12-05
  • 2021-08-19
猜你喜欢
  • 2021-11-28
  • 2021-04-27
  • 2021-06-25
  • 2021-10-08
  • 2021-04-14
  • 2021-10-11
  • 2021-11-12
相关资源
相似解决方案