b49020 commented on code in PR #141:
URL: 
https://github.com/apache/incubator-teaclave-trustzone-sdk/pull/141#discussion_r1669912139


##########
.github/workflows/ci.yml:
##########
@@ -67,39 +67,59 @@ jobs:
 
           # Build optee_os and optee_client for qemu_v8
           ./build_optee_libraries.sh $HOME
-
-          # Setup environment
           export OPTEE_DIR=$HOME
-          source environment
 
-          # Build OP-TEE Rust examples for Arm 64-bit both host and TA
+          # Build OP-TEE Rust examples for Arm 32-bit both host and TA
+          export ARCH_HOST=arm
+          export ARCH_TA=arm
+          source environment
           make -j`nproc`
 
-          # Build OP-TEE Rust examples for Arm 64-bit host and 32-bit TA
-          export 
TA_DEV_KIT_DIR=~/optee_os/out/arm-plat-vexpress/export-ta_arm32/
-          export CROSS_COMPILE_HOST=$CROSS_COMPILE64
-          export CROSS_COMPILE_TA=$CROSS_COMPILE32
-          export TARGET_HOST="aarch64-unknown-linux-gnu"
-          export TARGET_TA="arm-unknown-linux-gnueabihf"
+          # Build OP-TEE Rust examples for Arm 64-bit both host and TA
+          unset ARCH_TA
+          unset ARCH_HOST
+          source environment
           make clean && make -j`nproc`
+      - name: Run tests for Arm 64-bit both host and TA
+        run: |
+          apt update && apt install libslirp-dev -y
+          source environment
+          (cd ci && ./ci.sh)
+  build-and-test-examples-for-std-TAs:
+    runs-on: ubuntu-latest
+    container: teaclave/teaclave-trustzone-sdk-build:0.3.0
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v2
+      - name: Setting up $HOME
+        run: |
+          cp /root/.bashrc $HOME/.bashrc &&
+          ln -sf /root/.rustup ~/.rustup &&
+          ln -sf /root/.cargo ~/.cargo
+      - name: Building Arm 64-bit both host and TA (with STD enabled)

Review Comment:
   Can we support 32-bit TAs with STD enabled? I can see that we support 32-bit 
OP-TEE custom target for STD.



##########
optee-utee/optee-utee-sys/src/tee_api.rs:
##########
@@ -17,9 +17,9 @@
 
 use super::*;
 
-#[cfg(feature = "std")]
-use std::os::raw::*;
-#[cfg(not(feature = "std"))]
+//#[cfg(target_os = "optee")]
+//use libc::*;
+//#[cfg(not(target_os = "optee"))]

Review Comment:
   These can be dropped as I only required then initially since `std` support 
required old rust toolchain which didn't provide `core::ffi::*;` which isn't 
the case any longer. Same for all other instances below.



##########
examples/acipher-rs/ta/Makefile:
##########
@@ -17,19 +17,23 @@
 
 UUID ?= $(shell cat "../uuid.txt")
 
-TARGET ?= aarch64-unknown-linux-gnu
-CROSS_COMPILE ?= aarch64-linux-gnu-
-OBJCOPY := $(CROSS_COMPILE)objcopy
-LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)ld.bfd\"
+TARGET_TA ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE_TA ?= aarch64-linux-gnu-
+OBJCOPY := $(CROSS_COMPILE_TA)objcopy
+LINKER_CFG := target.$(TARGET_TA).linker=\"$(CROSS_COMPILE_TA)ld.bfd\"
 
 TA_SIGN_KEY ?= $(TA_DEV_KIT_DIR)/keys/default_ta.pem
 SIGN := $(TA_DEV_KIT_DIR)/scripts/sign_encrypt.py
-OUT_DIR := $(CURDIR)/target/$(TARGET)/release
+OUT_DIR := $(CURDIR)/target/$(TARGET_TA)/release
 
 all: ta strip sign
 
 ta:
-       @cargo build --target $(TARGET) --release --config $(LINKER_CFG)
+       @if [ $(STD) ]; then\
+               xargo build --target $(TARGET_TA) --release --config 
$(LINKER_CFG) --verbose;\

Review Comment:
   Do we really need a verbose build in STD case?



##########
examples/aes-rs/Makefile:
##########
@@ -26,10 +26,10 @@ TARGET_HOST ?= $(TARGET)
 TARGET_TA ?= $(TARGET)

Review Comment:
   This default assignment can be dropped with the renaming in this patch-set?



##########
examples/acipher-rs/host/Cargo.lock:
##########


Review Comment:
   These cargo.lock files can be dropped, riight?



##########
.github/workflows/ci.yml:
##########
@@ -67,39 +67,59 @@ jobs:
 
           # Build optee_os and optee_client for qemu_v8
           ./build_optee_libraries.sh $HOME
-
-          # Setup environment
           export OPTEE_DIR=$HOME
-          source environment
 
-          # Build OP-TEE Rust examples for Arm 64-bit both host and TA
+          # Build OP-TEE Rust examples for Arm 32-bit both host and TA
+          export ARCH_HOST=arm
+          export ARCH_TA=arm
+          source environment
           make -j`nproc`
 
-          # Build OP-TEE Rust examples for Arm 64-bit host and 32-bit TA

Review Comment:
   I see you have dropped mixed build tests with host for 64-bit and TA for 
32-bit or vice-versa. Any particular reason to do so?



##########
rust-toolchain.toml:
##########
@@ -18,5 +18,8 @@
 # Toolchain override for rustup
 
 [toolchain]
-channel = "nightly-2023-12-18"
+channel = "nightly-2024-05-15"
+components = [ "rust-src" ]

Review Comment:
   I suppose this won't add too much size increase for `no-std` CI, right?



##########
optee-utee/Cargo.toml:
##########
@@ -24,18 +24,13 @@ repository = 
"https://github.com/apache/incubator-teaclave-trustzone-sdk.git";
 description = "TEE internal core API."
 edition = "2018"
 
-[features]
-default = ["std", "sys_std"]
-std = []
-sys_std = ["optee-utee-sys/std"]
-
 [dependencies]
-optee-utee-sys = { path = "optee-utee-sys", default-features = false }
+optee-utee-sys = { path = "optee-utee-sys" }
 optee-utee-macros = { path = "macros" }
 bitflags = "=1.0.4"
 uuid = { version = "0.8", default-features = false }
 hex = { version = "0.4", default-features = false, features = ["alloc"] }
 libc_alloc = "=1.0.5"
 
-[workspace]
-members = ['systest']
+#[workspace]
+#members = ['systest']

Review Comment:
   Should these be dropped?



-- 
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-unsubscr...@teaclave.apache.org

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


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

Reply via email to