Skip to content

Commit

Permalink
Update to OP-TEE 3.20.0 (#104)
Browse files Browse the repository at this point in the history
* Fix optee_client building error
* Update to OP-TEE 3.20.0
* ci: 
- add building dependency for qemu
- pin OP-TEE repo to 3.20.0
  • Loading branch information
DemesneGH authored Mar 8, 2023
1 parent 0c7d3a6 commit ae006b2
Show file tree
Hide file tree
Showing 23 changed files with 65 additions and 63 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
ln -sf /root/.cargo ~/.cargo
- name: Building
run: |
apt update && apt install libslirp-dev -y
export CARGO_NET_GIT_FETCH_WITH_CLI=true &&
./setup.sh &&
source environment &&
Expand Down Expand Up @@ -89,18 +90,18 @@ jobs:
curl https://storage.googleapis.com/git-repo-downloads/repo-1 > ~/bin/repo && chmod a+x ~/bin/repo
export PATH=~/bin:$PATH
mkdir -p ~/optee-qemuv8 && cd ~/optee-qemuv8 &&
repo init -u https://github.com/OP-TEE/manifest.git -m qemu_v8.xml &&
repo init -u https://github.com/OP-TEE/manifest.git -m qemu_v8.xml -b 3.20.0 &&
repo sync -j4 --no-clone-bundle
- name: Build images and run tests
run: |
apt update && apt install libslirp-dev -y
cd ~/optee-qemuv8
rm -rf optee_rust/ &&
mv $GITHUB_WORKSPACE/incubator-teaclave-trustzone-sdk optee_rust/
export OPTEE_DIR=$(pwd)
cd build &&
make -j2 toolchains &&
make CFG_TEE_CORE_LOG_LEVEL=0 OPTEE_RUST_ENABLE=y CFG_TEE_RAM_VA_SIZE=0x00300000
make check-only-rust
make CFG_TEE_CORE_LOG_LEVEL=0 OPTEE_RUST_ENABLE=y CFG_TEE_RAM_VA_SIZE=0x00300000 check-rust
license:
runs-on: ubuntu-20.04
steps:
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ optee-os:

OPTEE_CLIENT_FLAGS ?= CROSS_COMPILE="$(CCACHE) $(AARCH_CROSS_COMPILE)" \
CFG_TEE_BENCHMARK=n \
CFG_TA_TEST_PATH=y
CFG_TA_TEST_PATH=y \
WITH_TEEACL=0

optee-client:
make -C $(OPTEE_CLIENT_PATH) $(OPTEE_CLIENT_FLAGS)
Expand Down
2 changes: 1 addition & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ rustup default nightly-2021-09-20

########################################################
# initialize submodules: optee_os / optee_client / build
OPTEE_RELEASE_VERSION=3.18.0
OPTEE_RELEASE_VERSION=3.20.0

if [[ -z $OPTEE_DIR ]] || [[ $OPTEE_DIR == $PWD/optee ]]
then
Expand Down
2 changes: 1 addition & 1 deletion tests/optee-qemuv8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# specific language governing permissions and limitations
# under the License.

cd optee-qemuv8-3.18.0-ubuntu-20.04 && ./qemu-system-aarch64 \
cd optee-qemuv8-3.20.0-ubuntu-20.04 && ./qemu-system-aarch64 \
-nodefaults \
-nographic \
-serial stdio -serial file:/tmp/serial.log \
Expand Down
6 changes: 3 additions & 3 deletions tests/test_acipher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
set -xe

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared

curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.18.0-ubuntu-20.04.tar.gz | tar zxv
curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.20.0-ubuntu-20.04.tar.gz | tar zxv
mkdir shared
cp ../examples/acipher-rs/ta/target/aarch64-unknown-optee-trustzone/release/*.ta shared
cp ../examples/acipher-rs/host/target/aarch64-unknown-linux-gnu/release/acipher-rs shared
Expand Down Expand Up @@ -51,5 +51,5 @@ sleep 5
}

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared
6 changes: 3 additions & 3 deletions tests/test_aes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
set -xe

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared

curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.18.0-ubuntu-20.04.tar.gz | tar zxv
curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.20.0-ubuntu-20.04.tar.gz | tar zxv
mkdir shared
cp ../examples/aes-rs/ta/target/aarch64-unknown-optee-trustzone/release/*.ta shared
cp ../examples/aes-rs/host/target/aarch64-unknown-linux-gnu/release/aes-rs shared
Expand Down Expand Up @@ -55,5 +55,5 @@ sleep 5
}

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared
6 changes: 3 additions & 3 deletions tests/test_authentication.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
set -xe

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared

curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.18.0-ubuntu-20.04.tar.gz | tar zxv
curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.20.0-ubuntu-20.04.tar.gz | tar zxv
mkdir shared
cp ../examples/authentication-rs/ta/target/aarch64-unknown-optee-trustzone/release/*.ta shared
cp ../examples/authentication-rs/host/target/aarch64-unknown-linux-gnu/release/authentication-rs shared
Expand Down Expand Up @@ -51,5 +51,5 @@ sleep 5
}

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared
6 changes: 3 additions & 3 deletions tests/test_big_int.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
set -xe

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared

curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.18.0-ubuntu-20.04.tar.gz | tar zxv
curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.20.0-ubuntu-20.04.tar.gz | tar zxv
mkdir shared
cp ../examples/big_int-rs/ta/target/aarch64-unknown-optee-trustzone/release/*.ta shared
cp ../examples/big_int-rs/host/target/aarch64-unknown-linux-gnu/release/big_int-rs shared
Expand Down Expand Up @@ -58,5 +58,5 @@ sleep 5
}

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared
6 changes: 3 additions & 3 deletions tests/test_diffie_hellman.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
set -xe

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared

curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.18.0-ubuntu-20.04.tar.gz | tar zxv
curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.20.0-ubuntu-20.04.tar.gz | tar zxv
mkdir shared
cp ../examples/diffie_hellman-rs/ta/target/aarch64-unknown-optee-trustzone/release/*.ta shared
cp ../examples/diffie_hellman-rs/host/target/aarch64-unknown-linux-gnu/release/diffie_hellman-rs shared
Expand Down Expand Up @@ -52,5 +52,5 @@ sleep 5
}

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared
6 changes: 3 additions & 3 deletions tests/test_digest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
set -xe

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared

curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.18.0-ubuntu-20.04.tar.gz | tar zxv
curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.20.0-ubuntu-20.04.tar.gz | tar zxv
mkdir shared
cp ../examples/digest-rs/ta/target/aarch64-unknown-optee-trustzone/release/*.ta shared
cp ../examples/digest-rs/host/target/aarch64-unknown-linux-gnu/release/digest-rs shared
Expand Down Expand Up @@ -51,5 +51,5 @@ sleep 5
}

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared
6 changes: 3 additions & 3 deletions tests/test_hello_world.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
set -xe

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared

curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.18.0-ubuntu-20.04.tar.gz | tar zxv
curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.20.0-ubuntu-20.04.tar.gz | tar zxv
mkdir shared
cp ../examples/hello_world-rs/ta/target/aarch64-unknown-optee-trustzone/release/*.ta shared
cp ../examples/hello_world-rs/host/target/aarch64-unknown-linux-gnu/release/hello_world-rs shared
Expand Down Expand Up @@ -53,5 +53,5 @@ sleep 5
}

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared
6 changes: 3 additions & 3 deletions tests/test_hotp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
set -xe

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared

curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.18.0-ubuntu-20.04.tar.gz | tar zxv
curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.20.0-ubuntu-20.04.tar.gz | tar zxv
mkdir shared
cp ../examples/hotp-rs/ta/target/aarch64-unknown-optee-trustzone/release/*.ta shared
cp ../examples/hotp-rs/host/target/aarch64-unknown-linux-gnu/release/hotp-rs shared
Expand Down Expand Up @@ -51,5 +51,5 @@ sleep 5
}

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared
6 changes: 3 additions & 3 deletions tests/test_message_passing_interface.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
set -xe

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared

curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.18.0-ubuntu-20.04.tar.gz | tar zxv
curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.20.0-ubuntu-20.04.tar.gz | tar zxv
mkdir shared
cp ../examples/message_passing_interface-rs/ta/target/aarch64-unknown-optee-trustzone/release/*.ta shared
cp ../examples/message_passing_interface-rs/host/target/aarch64-unknown-linux-gnu/release/message_passing_interface-rs shared
Expand All @@ -50,5 +50,5 @@ sleep 5
}

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared
6 changes: 3 additions & 3 deletions tests/test_random.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
set -xe

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared

curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.18.0-ubuntu-20.04.tar.gz | tar zxv
curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.20.0-ubuntu-20.04.tar.gz | tar zxv
mkdir shared
cp ../examples/random-rs/ta/target/aarch64-unknown-optee-trustzone/release/*.ta shared
cp ../examples/random-rs/host/target/aarch64-unknown-linux-gnu/release/random-rs shared
Expand Down Expand Up @@ -52,5 +52,5 @@ sleep 5
}

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared
6 changes: 3 additions & 3 deletions tests/test_secure_storage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
set -xe

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared

curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.18.0-ubuntu-20.04.tar.gz | tar zxv
curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.20.0-ubuntu-20.04.tar.gz | tar zxv
mkdir shared
cp ../examples/secure_storage-rs/ta/target/aarch64-unknown-optee-trustzone/release/*.ta shared
cp ../examples/secure_storage-rs/host/target/aarch64-unknown-linux-gnu/release/secure_storage-rs shared
Expand Down Expand Up @@ -60,5 +60,5 @@ sleep 5
}

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared
6 changes: 3 additions & 3 deletions tests/test_serde.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
set -xe

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared

curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.18.0-ubuntu-20.04.tar.gz | tar zxv
curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.20.0-ubuntu-20.04.tar.gz | tar zxv
mkdir shared
cp ../examples/serde-rs/ta/target/aarch64-unknown-optee-trustzone/release/*.ta shared
cp ../examples/serde-rs/host/target/aarch64-unknown-linux-gnu/release/serde-rs shared
Expand Down Expand Up @@ -53,5 +53,5 @@ sleep 5
}

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared
6 changes: 3 additions & 3 deletions tests/test_signature_verification.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
set -xe

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared

curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.18.0-ubuntu-20.04.tar.gz | tar zxv
curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.20.0-ubuntu-20.04.tar.gz | tar zxv
mkdir shared
cp ../examples/signature_verification-rs/ta/target/aarch64-unknown-optee-trustzone/release/*.ta shared
cp ../examples/signature_verification-rs/host/target/aarch64-unknown-linux-gnu/release/signature_verification-rs shared
Expand All @@ -50,5 +50,5 @@ sleep 5
}

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared
6 changes: 3 additions & 3 deletions tests/test_supp_plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
set -xe

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared

curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.18.0-ubuntu-20.04.tar.gz | tar zxv
curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.20.0-ubuntu-20.04.tar.gz | tar zxv
mkdir shared
cp ../examples/supp_plugin-rs/ta/target/aarch64-unknown-optee-trustzone/release/*.ta shared
cp ../examples/supp_plugin-rs/host/target/aarch64-unknown-linux-gnu/release/supp_plugin-rs shared
Expand Down Expand Up @@ -61,5 +61,5 @@ sleep 5
}

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared
6 changes: 3 additions & 3 deletions tests/test_tcp_client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
set -xe

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared

curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.18.0-ubuntu-20.04.tar.gz | tar zxv
curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.20.0-ubuntu-20.04.tar.gz | tar zxv
mkdir shared
cp ../examples/tcp_client-rs/ta/target/aarch64-unknown-optee-trustzone/release/*.ta shared
cp ../examples/tcp_client-rs/host/target/aarch64-unknown-linux-gnu/release/tcp_client-rs shared
Expand All @@ -50,5 +50,5 @@ sleep 5
}

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared
6 changes: 3 additions & 3 deletions tests/test_time.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
set -xe

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared

curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.18.0-ubuntu-20.04.tar.gz | tar zxv
curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.20.0-ubuntu-20.04.tar.gz | tar zxv
mkdir shared
cp ../examples/time-rs/ta/target/aarch64-unknown-optee-trustzone/release/*.ta shared
cp ../examples/time-rs/host/target/aarch64-unknown-linux-gnu/release/time-rs shared
Expand Down Expand Up @@ -54,5 +54,5 @@ sleep 5
}

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared
6 changes: 3 additions & 3 deletions tests/test_tls_client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
set -xe

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared

curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.18.0-ubuntu-20.04-expand-ta-memory.tar.gz | tar zxv
curl https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/optee-qemuv8-3.20.0-ubuntu-20.04-expand-ta-memory.tar.gz | tar zxv
mkdir shared
cp ../examples/tls_client-rs/ta/target/aarch64-unknown-optee-trustzone/release/*.ta shared
cp ../examples/tls_client-rs/host/target/aarch64-unknown-linux-gnu/release/tls_client-rs shared
Expand All @@ -50,5 +50,5 @@ sleep 5
}

rm -rf screenlog.0
rm -rf optee-qemuv8-3.18.0-ubuntu-20.04
rm -rf optee-qemuv8-3.20.0-ubuntu-20.04
rm -rf shared
Loading

0 comments on commit ae006b2

Please sign in to comment.