You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@teaclave.apache.org by GitBox <gi...@apache.org> on 2022/01/10 09:06:10 UTC

[GitHub] [incubator-teaclave-trustzone-sdk] gaojunjie03 commented on issue #55: Could not find specification for target "aarch64-unknown-optee-trustzone"

gaojunjie03 commented on issue #55:
URL: https://github.com/apache/incubator-teaclave-trustzone-sdk/issues/55#issuecomment-1008666889


   我是全程使用dockerfile文件进行编译此项目的
   platform:aarch64
   (1)basedockerfile:
   FROM ubuntu:20.04
   MAINTAINER Teaclave Contributors <de...@teaclave.apache.org>
   ENV DEBIAN_FRONTEND=noninteractive
   
   # Install dependencies for building OP-TEE
   RUN apt-get update && \
       apt-get install -y \
       git \
       android-tools-adb \
       android-tools-fastboot \
       autoconf \
       automake \
       bc \
       bison \
       build-essential \
       ccache \
       cscope \
       curl \
       device-tree-compiler \
       expect \
       flex \
       ftp-upload \
       gdisk \
       iasl \
       libattr1-dev \
       libcap-dev \
       libfdt-dev \
       libftdi-dev \
       libglib2.0-dev \
       libgmp-dev \
       libhidapi-dev \
       libmpc-dev \
       libncurses5-dev \
       libpixman-1-dev \
       libssl-dev \
       libtool \
       make \
       mtools \
       netcat \
       ninja-build \
       python \
       python-crypto \
       python3-crypto \
       python-pyelftools \
       python3-pycryptodome \
       python3-pyelftools \
       python3-serial \
       rsync \
       unzip \
       uuid-dev \
       xdg-utils \
       xterm \
       xz-utils \
       zlib1g-dev \
       wget \
       cpio \
       libcap-ng-dev \
       screen \
       libvdeplug-dev \
       libsdl2-dev \
       pip \
       ca-certificates
   
   
   
   RUN pip install cryptography -i https://mirrors.aliyun.com/pypi/simple/
   RUN apt-get install -y software-properties-common
   COPY lib/* /usr/lib/aarch64-linux-gnu/
   RUN ls /usr/lib/aarch64-linux-gnu/
   #COPY libpng12-0_1.2.54-1ubuntu1_arm64.deb .
   #RUN dpkg -i libpng12-0_1.2.54-1ubuntu1_arm64.deb
   
   
   #RUN add-apt-repository ppa:linuxuprising/libpng12
   #RUN apt-get update
   #RUN apt-get install -y libpng12-0
   
   # Install Rust
   RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \
     . $HOME/.cargo/env && \
     rustup default nightly-2021-09-20 && \
     rustup component add rust-src && \
     rustup target install aarch64-unknown-linux-gnu && \
     rustup default 1.44.0 && cargo +1.44.0 install xargo && \
     rustup default nightly-2021-09-20
   
   ENV PATH="/root/.cargo/bin:$PATH"
   
   (2)这个基础依赖镜像打包好镜像之后,就根据该基础镜像制作上层镜像就是这个操作
   ![image](https://user-images.githubusercontent.com/30582212/148739532-f949229e-9456-4a9f-bb98-3c2fa210299d.png)
   这里也制作了个镜像
   (3)完了之后,根据(2)得到的镜像就开始git submodule update --init -- optee 然后make toolchains(这里我把make optee 拆成了make toolchains、make optee-os、make optee-client三步完成),然后在编译toolchains的时候,一直/optee目录下报找不到buildroot文件夹,后来我查询了optee的相关资料在/optee下克隆了buildroot(分支是2021.08,克隆深度为1的项目下来,跟build optee-os optee-client同级),这样之后就可以继续编译下去了。该步也同样制作一个镜像
   (4)在(3)得到的镜像之后,就开始make optee-os,制作该层镜像
   (5)在(4)之后,紧接着make optee-client,这里一开始报了找不到aarch64-linux-gnu-gcc、aarch64-linux-gnu-gcc.br_real等各种文件,我查看到/incubator-teaclave-trustzone-sdk/optee/toolchains/aarch64/bin文件夹是有aarch64-buildroot相关文件的,所以我拷贝了一份改名称aarch64-linux-gnu-gcc....等就可以继续编译,然后在make examples上,报了这个错“Provided allocation has wrong size for slot count 131072", "the compiler unexpectedly panicked. this is a bug”,查阅相关资料后执行该命令后可以继续下去 rustup override set nightly-2021-09-22,然后又报了这个错“/usr/bin/ld can not find -lteec”,我执行了这个:cp ./optee/optee_client/out/export/usr/lib/libteec.so /usr/lib/。 就可以了,最终就报了
   Could not find specification for target "aarch64-unknown-optee-trustzone" 该错误
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org
For additional commands, e-mail: dev-help@teaclave.apache.org