1.本地
tar xzvf Ascend_DDK-接口版本-硬件架构.操作系统
python ddk_setup.py install /home/user /usr1 /home/user/Ascend_lib.zip
/home/user:ddk安装的绝对路径,由用户指定。为了便于后面理解,假设ddk安装路径为$DDK_DIR
/home/user/Ascend_lib.zip:Ascend_lib_xxx.zip(上图中ddk安装包)绝对路径
2.交叉
在Euler_compile_env_cross.tar.gz交叉编译环境下编译二进制文件能用于EulerOS2.0SP8系统下。拷贝目前Ascend_DDK-1.32.0.B080-1.1.1-x86_64.centOS7.4.tar.gz和Ascend_lib-1.32.0.B080-x86_64.centOS7.4-aarch64.miniOS.zip到ddk_x86_64_B080目录,解压DDK,执行安装命令python3 ddk_setup.py install /home/ddk_x86_64_B083/ Ascend_lib-1.32.0.B082-x86_64.centOS7.4-aarch64.miniOS.zip,看到Success表示device侧库安装成功,接下来从找到对应硬件架构和操作系统的ddk(Ascend_lib-1.32.0.B080-aarch64.eulerOS-aarch64.miniOS)将host_lib拷贝出来作为交叉编译的host库。