forked from apache/incubator-teaclave-trustzone-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update to OP-TEE 4.2.0 - update to OP-TEE 4.2.0 - simplify test scripts - use new docker img based on Ubuntu 24.04 (required by qemu libslirp) - fix ci
- Loading branch information
Showing
27 changed files
with
282 additions
and
433 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
FROM ubuntu:20.04 | ||
FROM ubuntu:24.04 | ||
MAINTAINER Teaclave Contributors <[email protected]> | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
|
@@ -53,15 +53,12 @@ RUN apt-get update && \ | |
libtool \ | ||
make \ | ||
mtools \ | ||
netcat \ | ||
ninja-build \ | ||
python \ | ||
python-crypto \ | ||
python3-crypto \ | ||
python-pyelftools \ | ||
python3 \ | ||
python3-pycryptodome \ | ||
python3-pyelftools \ | ||
python3-serial \ | ||
python3-cryptography \ | ||
rsync \ | ||
unzip \ | ||
uuid-dev \ | ||
|
@@ -72,26 +69,9 @@ RUN apt-get update && \ | |
wget \ | ||
cpio \ | ||
libcap-ng-dev \ | ||
libslirp-dev \ | ||
screen \ | ||
libvdeplug-dev \ | ||
libsdl2-dev \ | ||
pip \ | ||
ca-certificates | ||
|
||
RUN pip install cryptography | ||
|
||
RUN apt-get install -y software-properties-common && \ | ||
add-apt-repository ppa:linuxuprising/libpng12 && \ | ||
apt-get update && \ | ||
apt-get install 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
set -xe | ||
|
||
rm -rf screenlog.0 shared | ||
rm -rf optee-qemuv8-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/bin/bash | ||
|
||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
set -xe | ||
|
||
# Default value for NEED_EXPANDED_MEM | ||
: ${NEED_EXPANDED_MEM:=false} | ||
|
||
# Define IMG_VERSION | ||
IMG_VERSION="optee-qemuv8-4.2.0-ubuntu-24.04" | ||
|
||
# Set IMG based on NEED_EXPANDED_MEM | ||
if [ "$NEED_EXPANDED_MEM" = true ]; then | ||
IMG="${IMG_VERSION}-expand-ta-memory" | ||
else | ||
IMG="$IMG_VERSION" | ||
fi | ||
|
||
# Function to download image | ||
download_image() { | ||
curl "https://nightlies.apache.org/teaclave/teaclave-trustzone-sdk/${IMG}.tar.gz" | tar zxv | ||
} | ||
|
||
# Functions for running commands in QEMU screen | ||
run_in_qemu() { | ||
screen -S qemu_screen -p 0 -X stuff "$1\n" | ||
sleep 5 | ||
} | ||
|
||
# Check if the image file exists locally | ||
if [ ! -d "${IMG}" ]; then | ||
echo "Image file '${IMG}' not found locally. Downloading from network." | ||
download_image | ||
else | ||
echo "Image file '${IMG}' found locally." | ||
fi | ||
|
||
mkdir -p shared | ||
|
||
# Start QEMU screen | ||
screen -L -d -m -S qemu_screen ./optee-qemuv8.sh $IMG | ||
sleep 30 | ||
run_in_qemu "root" | ||
run_in_qemu "mkdir -p shared && mount -t 9p -o trans=virtio host shared && cd shared" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.