Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to GP 1.3.1 #105

Merged
merged 4 commits into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 29 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,34 @@ defaults:
shell: bash

jobs:
build-and-run-examples:
runs-on: ubuntu-20.04
container: teaclave/teaclave-trustzone-sdk-build:0.3.0
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: recursive
- name: Setting up $HOME
run: |
cp /root/.bashrc $HOME/.bashrc &&
ln -sf /root/.rustup ~/.rustup &&
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 &&
make optee &&
. ~/.cargo/env &&
rustup component add rust-src &&
rustup target install aarch64-unknown-linux-gnu arm-unknown-linux-gnueabihf &&
rustup default nightly-2021-09-20 &&
make examples
- name: Run tests and examples
run: |
cd ci && ./ci.sh
# build-and-run-examples:
# runs-on: ubuntu-20.04
# container: teaclave/teaclave-trustzone-sdk-build:0.3.0
# steps:
# - name: Checkout repository
# uses: actions/checkout@v2
# with:
# submodules: recursive
# - name: Setting up $HOME
# run: |
# cp /root/.bashrc $HOME/.bashrc &&
# ln -sf /root/.rustup ~/.rustup &&
# 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 &&
# make optee &&
# . ~/.cargo/env &&
# rustup component add rust-src &&
# rustup target install aarch64-unknown-linux-gnu arm-unknown-linux-gnueabihf &&
# rustup default nightly-2021-09-20 &&
# make examples
# - name: Run tests and examples
# run: |
# cd ci && ./ci.sh
build-utee-teec:
runs-on: ubuntu-20.04
container: teaclave/teaclave-trustzone-sdk-build:0.3.0
Expand Down Expand Up @@ -90,7 +90,7 @@ 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 -b 3.20.0 &&
repo init -u https://github.com/OP-TEE/manifest.git -m qemu_v8.xml &&
repo sync -j4 --no-clone-bundle
- name: Build images and run tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion examples/serde-rs/ta/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fn invoke_command(cmd_id: u32, params: &mut Parameters) -> Result<()> {
let len = buffer.write(serialized.as_bytes()).unwrap();

// update size of output buffer
unsafe { (*p.raw()).size = len as u32 };
unsafe { (*p.raw()).size = len};

// Prints serialized = {"x":1,"y":2}
trace_println!("serialized = {}", serialized);
Expand Down
3 changes: 2 additions & 1 deletion examples/supp_plugin-rs/ta/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ fn destroy() {
fn invoke_command(cmd_id: u32, params: &mut Parameters) -> Result<()> {
trace_println!("[+] TA invoke command");
let mut p0 = unsafe { params.0.as_memref().unwrap() };
let mut inbuf = p0.buffer().to_vec();
trace_println!("[+] TA received value {:?} then send to plugin", p0.buffer());
let uuid = Uuid::parse_str(PLUGIN_UUID).unwrap();

Expand All @@ -59,7 +60,7 @@ fn invoke_command(cmd_id: u32, params: &mut Parameters) -> Result<()> {
let outbuf = plugin.invoke(
PluginCommand::Print as u32,
PLUGIN_SUBCMD_NULL,
p0.buffer()
&inbuf
).unwrap();

trace_println!("[+] TA received out value {:?} outlen {:?}", outbuf, outbuf.len());
Expand Down
Loading