Skip to content
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
6 changes: 3 additions & 3 deletions aarch64-unknown-optee.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"arch": "aarch64",
"data-layout": "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128",
"data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are duplicate files in the cargo-optee directory. Should these be updated as well, or would it be better to remove them entirely?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The modification of cargo-optee is planned in the follow-up PRs, after this PR merged I will remove the Xargo and update our building system. To reduce the effort of multiple modifications I plan to adjust the cargo-optee after that.
For this PR, I suggest we omit the CI errors of cargo-optee and std-dev-docker.

"features": "+strict-align",
"dynamic-linking": false,
"executables": true,
Expand All @@ -12,9 +12,9 @@
"os": "optee",
"position-independent-executables": true,
"relro-level": "full",
"target-c-int-width": "32",
"target-c-int-width": 32,
"target-endian": "little",
"target-pointer-width": "64",
"target-pointer-width": 64,
"vendor": "unknown",
"panic-strategy": "abort"
}
Expand Down
5 changes: 3 additions & 2 deletions arm-unknown-optee.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@
"has-rpath": true,
"linker-flavor": "ld",
"linker-is-gnu": true,
"llvm-floatabi": "hard",
"llvm-target": "arm-unknown-linux-gnueabihf",
"max-atomic-width": 64,
"os": "optee",
"position-independent-executables": true,
"relro-level": "full",
"target-c-int-width": "32",
"target-c-int-width": 32,
"target-endian": "little",
"target-pointer-width": "32",
"target-pointer-width": 32,
"vendor": "unknown",
"panic-strategy": "abort",
"singlethread": true
Expand Down
9 changes: 9 additions & 0 deletions environment
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ export PATH=$PATH:$HOME/.cargo/bin
# for std: specify the target json file
export RUST_TARGET_PATH="$(pwd)"

# Disable incremental compilation to avoid ICE with recent nightly
# error: internal compiler error: encountered incremental compilation error
# with lints_that_dont_need_to_run(0-0)
export CARGO_INCREMENTAL=0

if [ -z "$OPTEE_DIR" ]
then
echo -e "OPTEE_DIR has not set, use $PWD/optee/ as default\n"
Expand All @@ -41,6 +46,8 @@ then
echo "set TARGET_TA=$TARGET_TA (std)"
export BUILDER=xargo
export FEATURES="--features std"
export XARGO_RUST_SRC="$(pwd)/rust/rust/library"
export RUSTFLAGS="-Zunstable-options"
else
export TARGET_TA="arm-unknown-linux-gnueabihf"
echo "set TARGET_TA=$TARGET_TA (no-std)"
Expand All @@ -58,6 +65,8 @@ else
echo "set TARGET_TA=$TARGET_TA (std)"
export BUILDER=xargo
export FEATURES="--features std"
export XARGO_RUST_SRC="$(pwd)/rust/rust/library"
export RUSTFLAGS="-Zunstable-options"
else
export TARGET_TA="aarch64-unknown-linux-gnu"
echo "set TARGET_TA=$TARGET_TA (no-std)"
Expand Down
2 changes: 1 addition & 1 deletion examples/client_pool-rs/ta/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ std = ["optee-utee/std", "optee-utee-sys/std"]
[dependencies]
proto = { path = "../proto" }
optee-utee-sys = { path = "../../../optee-utee/optee-utee-sys" }
optee-utee = { path = "../../../optee-utee" }
optee-utee = { path = "../../../optee-utee", features = ["unwind_stubs"] }
hex = { version = "0.4.3", default-features = false }

[build-dependencies]
Expand Down
119 changes: 34 additions & 85 deletions examples/message_passing_interface-rs/ta/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/message_passing_interface-rs/ta/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ std = ["optee-utee/std", "optee-utee-sys/std"]
[dependencies]
proto = { path = "../proto" }
optee-utee-sys = { path = "../../../optee-utee/optee-utee-sys" }
optee-utee = { path = "../../../optee-utee" }
optee-utee = { path = "../../../optee-utee", features = ["unwind_stubs"] }
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }

[build-dependencies]
Expand Down
9 changes: 2 additions & 7 deletions examples/message_passing_interface-rs/ta/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\"
# fix for the error: "unwinding panics are not supported without std" reported by clippy
# Set panic=abort for std and no-std
RUSTFLAGS := -C panic=abort
ifeq ($(BUILDER),xargo)
EXTRA_FLAGS =
else
EXTRA_FLAGS = -Z build-std=core,alloc -Z build-std-features=panic_immediate_abort
endif

TA_SIGN_KEY ?= $(TA_DEV_KIT_DIR)/keys/default_ta.pem
SIGN := $(TA_DEV_KIT_DIR)/scripts/sign_encrypt.py
Expand All @@ -43,10 +38,10 @@ all: clippy ta strip sign

clippy:
@cargo fmt
@RUSTFLAGS="$(RUSTFLAGS)" $(BUILDER) clippy --target $(TARGET) $(EXTRA_FLAGS) $(FEATURES) -- -D warnings -D clippy::unwrap_used -D clippy::expect_used -D clippy::panic
@RUSTFLAGS="$(RUSTFLAGS)" $(BUILDER) clippy --target $(TARGET) $(FEATURES) -- -D warnings -D clippy::unwrap_used -D clippy::expect_used -D clippy::panic

ta: clippy
@RUSTFLAGS="$(RUSTFLAGS)" $(BUILDER) build --target $(TARGET) --release $(FEATURES) --config $(LINKER_CFG) $(EXTRA_FLAGS)
@RUSTFLAGS="$(RUSTFLAGS)" $(BUILDER) build --target $(TARGET) --release $(FEATURES) --config $(LINKER_CFG)

strip: ta
@$(OBJCOPY) --strip-unneeded $(OUT_DIR)/ta $(OUT_DIR)/stripped_ta
Expand Down
25 changes: 0 additions & 25 deletions examples/mnist-rs/rust-toolchain.toml

This file was deleted.

2 changes: 1 addition & 1 deletion examples/mnist-rs/ta/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ authors = ["Teaclave Contributors <dev@teaclave.apache.org>"]

[workspace.dependencies]
optee-utee-sys = { path = "../../../optee-utee/optee-utee-sys" }
optee-utee = { path = "../../../optee-utee" }
optee-utee = { path = "../../../optee-utee", features = ["unwind_stubs"] }
optee-utee-build = { path = "../../../optee-utee-build" }

proto = { path = "../proto" }
Expand Down
Loading
Loading