You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@teaclave.apache.org by yu...@apache.org on 2024/01/10 02:28:30 UTC
(incubator-teaclave-trustzone-sdk) branch no-std updated (b6849b7 -> 3e58869)
This is an automated email from the ASF dual-hosted git repository.
yuanz pushed a change to branch no-std
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave-trustzone-sdk.git
from b6849b7 CI: Updates for refactored build environment
new 31066fc examples: ta: build.rs: Use TARGET instead of custom ARCH
new 558eceb Makefile: examples: Enable mixed build configurations
new 0d5e285 Makefile: Standardize rust examples install target
new 3e58869 CI: Updates to build rust examples for mixed environments
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.github/workflows/ci.yml | 31 ++++++++++---
Makefile | 57 +++++++++++++++---------
examples/acipher-rs/Makefile | 20 +++++++--
examples/acipher-rs/host/Makefile | 12 ++---
examples/acipher-rs/ta/Makefile | 15 ++-----
examples/acipher-rs/ta/build.rs | 4 +-
examples/aes-rs/Makefile | 20 +++++++--
examples/aes-rs/host/Makefile | 12 ++---
examples/aes-rs/ta/Makefile | 15 ++-----
examples/aes-rs/ta/build.rs | 4 +-
examples/authentication-rs/Makefile | 20 +++++++--
examples/authentication-rs/host/Makefile | 12 ++---
examples/authentication-rs/ta/Makefile | 15 ++-----
examples/authentication-rs/ta/build.rs | 4 +-
examples/big_int-rs/Makefile | 20 +++++++--
examples/big_int-rs/host/Makefile | 12 ++---
examples/big_int-rs/ta/Makefile | 15 ++-----
examples/big_int-rs/ta/build.rs | 4 +-
examples/diffie_hellman-rs/Makefile | 20 +++++++--
examples/diffie_hellman-rs/host/Makefile | 12 ++---
examples/diffie_hellman-rs/ta/Makefile | 15 ++-----
examples/diffie_hellman-rs/ta/build.rs | 4 +-
examples/digest-rs/Makefile | 20 +++++++--
examples/digest-rs/host/Makefile | 12 ++---
examples/digest-rs/ta/Makefile | 15 ++-----
examples/digest-rs/ta/build.rs | 4 +-
examples/hello_world-rs/Makefile | 20 +++++++--
examples/hello_world-rs/host/Makefile | 12 ++---
examples/hello_world-rs/ta/Makefile | 15 ++-----
examples/hello_world-rs/ta/build.rs | 4 +-
examples/hotp-rs/Makefile | 20 +++++++--
examples/hotp-rs/host/Makefile | 12 ++---
examples/hotp-rs/ta/Makefile | 15 ++-----
examples/hotp-rs/ta/build.rs | 4 +-
examples/random-rs/Makefile | 20 +++++++--
examples/random-rs/host/Makefile | 12 ++---
examples/random-rs/ta/Makefile | 15 ++-----
examples/random-rs/ta/build.rs | 4 +-
examples/secure_storage-rs/Makefile | 20 +++++++--
examples/secure_storage-rs/host/Makefile | 12 ++---
examples/secure_storage-rs/ta/Makefile | 15 ++-----
examples/secure_storage-rs/ta/build.rs | 4 +-
examples/signature_verification-rs/Makefile | 20 +++++++--
examples/signature_verification-rs/host/Makefile | 12 ++---
examples/signature_verification-rs/ta/Makefile | 15 ++-----
examples/signature_verification-rs/ta/build.rs | 4 +-
examples/supp_plugin-rs/Makefile | 25 ++++++++---
examples/supp_plugin-rs/host/Makefile | 12 ++---
examples/supp_plugin-rs/plugin/Makefile | 12 ++---
examples/supp_plugin-rs/ta/Makefile | 15 ++-----
examples/supp_plugin-rs/ta/build.rs | 4 +-
examples/time-rs/Makefile | 20 +++++++--
examples/time-rs/host/Makefile | 12 ++---
examples/time-rs/ta/Makefile | 15 ++-----
examples/time-rs/ta/build.rs | 4 +-
55 files changed, 392 insertions(+), 376 deletions(-)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@teaclave.apache.org
For additional commands, e-mail: commits-help@teaclave.apache.org
(incubator-teaclave-trustzone-sdk) 03/04: Makefile: Standardize rust examples install target
Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
yuanz pushed a commit to branch no-std
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave-trustzone-sdk.git
commit 0d5e28551d0c8a5d419539788485fc5170c2a889
Author: Sumit Garg <su...@linaro.org>
AuthorDate: Mon Jan 8 18:16:19 2024 +0530
Makefile: Standardize rust examples install target
After this change, install directory looks like:
out/
├── lib
│ └── optee_armtz
│ ├── 057f4b66-bdab-11eb-96cf-33d6e41cc849.ta
│ ├── 0864c8ec-bdab-11eb-8926-c7fa47a8c92d.ta
│ ├── 0a5a06b2-bdab-11eb-add0-77f29de31296.ta
│ ├── 0bef16a2-bdab-11eb-94be-6f9815f37c21.ta
│ ├── 0e6bf4fe-bdab-11eb-9bc5-3f4ecb50aee7.ta
│ ├── 10de87e2-bdab-11eb-b73c-63fec73e597c.ta
│ ├── 133af0ca-bdab-11eb-9130-43bf7873bf67.ta
│ ├── 1585d412-bdab-11eb-ba91-3b085fd2601f.ta
│ ├── 197c710c-bdab-11eb-8f3f-17a5f698d23b.ta
│ ├── 1cd6d392-bdab-11eb-9082-abc902ac5cd4.ta
│ ├── 21b1a1da-bdab-11eb-b614-275a7098826f.ta
│ ├── 255fc838-de89-42d3-9a8e-d044c50fa57c.ta
│ └── c7e478c2-89b3-46eb-ac19-571e66c3830d.ta
└── usr
├── bin
│ ├── acipher-rs
│ ├── aes-rs
│ ├── authentication-rs
│ ├── big_int-rs
│ ├── diffie_hellman-rs
│ ├── digest-rs
│ ├── hello_world-rs
│ ├── hotp-rs
│ ├── random-rs
│ ├── secure_storage-rs
│ ├── signature_verification-rs
│ ├── supp_plugin-rs
│ └── time-rs
└── lib
└── tee-supplicant
└── plugins
└── ef620757-fa2b-4f19-a1c4-6e51cfe4c0f9.plugin.so
Signed-off-by: Sumit Garg <su...@linaro.org>
---
Makefile | 33 +++++++++++++++++++++------------
1 file changed, 21 insertions(+), 12 deletions(-)
diff --git a/Makefile b/Makefile
index 3654165..700cd26 100644
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,15 @@
# specific language governing permissions and limitations
# under the License.
+ifeq ($(O),)
+out-dir := $(CURDIR)/out
+else
+out-dir := $(O)
+endif
+
+bindir ?= /usr/bin
+libdir ?= /usr/lib
+
ifneq ($V,1)
q := @
echo := @echo
@@ -26,7 +35,6 @@ endif
export q
EXAMPLES = $(wildcard examples/*)
-EXAMPLES_INSTALL = $(EXAMPLES:%=%-install)
EXAMPLES_CLEAN = $(EXAMPLES:%=%-clean)
TARGET ?= aarch64-unknown-linux-gnu
@@ -39,9 +47,9 @@ CROSS_COMPILE_TA ?= $(CROSS_COMPILE)
TARGET_HOST ?= $(TARGET)
TARGET_TA ?= $(TARGET)
-.PHONY: all
+.PHONY: all examples $(EXAMPLES) install clean
ifneq ($(wildcard $(TA_DEV_KIT_DIR)/host_include/conf.mk),)
-all: examples examples-install
+all: examples
else
all:
$(q)echo "TA_DEV_KIT_DIR is not correctly defined" && false
@@ -56,13 +64,16 @@ $(EXAMPLES):
TA_DEV_KIT_DIR=$(TA_DEV_KIT_DIR) \
OPTEE_CLIENT_EXPORT=$(OPTEE_CLIENT_EXPORT)
-examples-install: $(EXAMPLES_INSTALL)
-$(EXAMPLES_INSTALL): examples
- install -D $(@:%-install=%)/host/target/$(TARGET_HOST)/release/$(@:examples/%-install=%) -t out/host/
- install -D $(@:%-install=%)/ta/target/$(TARGET_TA)/release/*.ta -t out/ta/
- $(q)if [ -d "$(@:%-install=%)/plugin/target/" ]; then \
- install -D $(@:%-install=%)/plugin/target/$(TARGET_HOST)/release/*.plugin.so -t out/plugin/; \
- fi
+install: examples
+ $(echo) ' INSTALL ${out-dir}/lib/optee_armtz'
+ $(q)mkdir -p ${out-dir}/lib/optee_armtz
+ $(q)find examples/*/ta/target/$(TARGET_TA)/ -name *.ta -exec cp {} ${out-dir}/lib/optee_armtz \;
+ $(echo) ' INSTALL ${out-dir}${bindir}'
+ $(q)mkdir -p ${out-dir}${bindir}
+ $(q)cp examples/*/host/target/$(TARGET_HOST)/release/*-rs ${out-dir}${bindir}
+ $(echo) ' INSTALL ${out-dir}${libdir}/tee-supplicant/plugins/'
+ $(q)mkdir -p ${out-dir}${libdir}/tee-supplicant/plugins/
+ $(q)find examples/*/plugin/target/$(TARGET_HOST)/ -name *.plugin.so -exec cp {} ${out-dir}${libdir}/tee-supplicant/plugins/ \;
examples-clean: $(EXAMPLES_CLEAN) out-clean
$(EXAMPLES_CLEAN):
@@ -71,6 +82,4 @@ $(EXAMPLES_CLEAN):
out-clean:
rm -rf out
-.PHONY: clean $(EXAMPLES) $(EXAMPLES_CLEAN)
-
clean: $(EXAMPLES_CLEAN) out-clean
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@teaclave.apache.org
For additional commands, e-mail: commits-help@teaclave.apache.org
(incubator-teaclave-trustzone-sdk) 02/04: Makefile: examples: Enable mixed build configurations
Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
yuanz pushed a commit to branch no-std
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave-trustzone-sdk.git
commit 558eceb001e2cf7041d1a3c14679980a3d4082f6
Author: Sumit Garg <su...@linaro.org>
AuthorDate: Mon Jan 8 16:21:13 2024 +0530
Makefile: examples: Enable mixed build configurations
Extend Makefile infrastructure to support different combinations for
host and TA rust targets. Following environment variables are added:
- TARGET_HOST
- TARGET_TA
- CROSS_COMPILE_HOST
- CROSS_COMPILE_TA
Signed-off-by: Sumit Garg <su...@linaro.org>
---
Makefile | 30 ++++++++++++++----------
examples/acipher-rs/Makefile | 20 ++++++++++++----
examples/acipher-rs/host/Makefile | 12 +++-------
examples/acipher-rs/ta/Makefile | 15 ++++--------
examples/aes-rs/Makefile | 20 ++++++++++++----
examples/aes-rs/host/Makefile | 12 +++-------
examples/aes-rs/ta/Makefile | 15 ++++--------
examples/authentication-rs/Makefile | 20 ++++++++++++----
examples/authentication-rs/host/Makefile | 12 +++-------
examples/authentication-rs/ta/Makefile | 15 ++++--------
examples/big_int-rs/Makefile | 20 ++++++++++++----
examples/big_int-rs/host/Makefile | 12 +++-------
examples/big_int-rs/ta/Makefile | 15 ++++--------
examples/diffie_hellman-rs/Makefile | 20 ++++++++++++----
examples/diffie_hellman-rs/host/Makefile | 12 +++-------
examples/diffie_hellman-rs/ta/Makefile | 15 ++++--------
examples/digest-rs/Makefile | 20 ++++++++++++----
examples/digest-rs/host/Makefile | 12 +++-------
examples/digest-rs/ta/Makefile | 15 ++++--------
examples/hello_world-rs/Makefile | 20 ++++++++++++----
examples/hello_world-rs/host/Makefile | 12 +++-------
examples/hello_world-rs/ta/Makefile | 15 ++++--------
examples/hotp-rs/Makefile | 20 ++++++++++++----
examples/hotp-rs/host/Makefile | 12 +++-------
examples/hotp-rs/ta/Makefile | 15 ++++--------
examples/random-rs/Makefile | 20 ++++++++++++----
examples/random-rs/host/Makefile | 12 +++-------
examples/random-rs/ta/Makefile | 15 ++++--------
examples/secure_storage-rs/Makefile | 20 ++++++++++++----
examples/secure_storage-rs/host/Makefile | 12 +++-------
examples/secure_storage-rs/ta/Makefile | 15 ++++--------
examples/signature_verification-rs/Makefile | 20 ++++++++++++----
examples/signature_verification-rs/host/Makefile | 12 +++-------
examples/signature_verification-rs/ta/Makefile | 15 ++++--------
examples/supp_plugin-rs/Makefile | 25 +++++++++++++++-----
examples/supp_plugin-rs/host/Makefile | 12 +++-------
examples/supp_plugin-rs/plugin/Makefile | 12 +++-------
examples/supp_plugin-rs/ta/Makefile | 15 ++++--------
examples/time-rs/Makefile | 20 ++++++++++++----
examples/time-rs/host/Makefile | 12 +++-------
examples/time-rs/ta/Makefile | 15 ++++--------
41 files changed, 323 insertions(+), 335 deletions(-)
diff --git a/Makefile b/Makefile
index 8524854..3654165 100644
--- a/Makefile
+++ b/Makefile
@@ -22,20 +22,22 @@ else
q :=
echo := @:
endif
+# export 'q', used by sub-makefiles.
+export q
EXAMPLES = $(wildcard examples/*)
EXAMPLES_INSTALL = $(EXAMPLES:%=%-install)
EXAMPLES_CLEAN = $(EXAMPLES:%=%-clean)
-ifneq ($(ARCH), arm)
- CROSS_COMPILE ?= aarch64-linux-gnu-
- TARGET := aarch64-unknown-linux-gnu
-else
- CROSS_COMPILE ?= arm-linux-gnueabihf-
- TARGET := arm-unknown-linux-gnueabihf
-endif
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
-export ARCH
+# If _HOST or _TA specific compiler/target are not specified, then use common
+# compiler/target for both
+CROSS_COMPILE_HOST ?= $(CROSS_COMPILE)
+CROSS_COMPILE_TA ?= $(CROSS_COMPILE)
+TARGET_HOST ?= $(TARGET)
+TARGET_TA ?= $(TARGET)
.PHONY: all
ifneq ($(wildcard $(TA_DEV_KIT_DIR)/host_include/conf.mk),)
@@ -47,15 +49,19 @@ endif
examples: $(EXAMPLES)
$(EXAMPLES):
- $(q)make -C $@ CROSS_COMPILE=$(CROSS_COMPILE) TA_DEV_KIT_DIR=$(TA_DEV_KIT_DIR) \
+ $(q)make -C $@ TARGET_HOST=$(TARGET_HOST) \
+ TARGET_TA=$(TARGET_TA) \
+ CROSS_COMPILE_HOST=$(CROSS_COMPILE_HOST) \
+ CROSS_COMPILE_TA=$(CROSS_COMPILE_TA) \
+ TA_DEV_KIT_DIR=$(TA_DEV_KIT_DIR) \
OPTEE_CLIENT_EXPORT=$(OPTEE_CLIENT_EXPORT)
examples-install: $(EXAMPLES_INSTALL)
$(EXAMPLES_INSTALL): examples
- install -D $(@:%-install=%)/host/target/$(TARGET)/release/$(@:examples/%-install=%) -t out/host/
- install -D $(@:%-install=%)/ta/target/$(TARGET)/release/*.ta -t out/ta/
+ install -D $(@:%-install=%)/host/target/$(TARGET_HOST)/release/$(@:examples/%-install=%) -t out/host/
+ install -D $(@:%-install=%)/ta/target/$(TARGET_TA)/release/*.ta -t out/ta/
$(q)if [ -d "$(@:%-install=%)/plugin/target/" ]; then \
- install -D $(@:%-install=%)/plugin/target/$(TARGET)/release/*.plugin.so -t out/plugin/; \
+ install -D $(@:%-install=%)/plugin/target/$(TARGET_HOST)/release/*.plugin.so -t out/plugin/; \
fi
examples-clean: $(EXAMPLES_CLEAN) out-clean
diff --git a/examples/acipher-rs/Makefile b/examples/acipher-rs/Makefile
index 09679cd..db4e5bb 100644
--- a/examples/acipher-rs/Makefile
+++ b/examples/acipher-rs/Makefile
@@ -15,10 +15,22 @@
# specific language governing permissions and limitations
# under the License.
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
+
+# If _HOST or _TA specific compiler/target are not specified, then use common
+# compiler/target for both
+CROSS_COMPILE_HOST ?= $(CROSS_COMPILE)
+CROSS_COMPILE_TA ?= $(CROSS_COMPILE)
+TARGET_HOST ?= $(TARGET)
+TARGET_TA ?= $(TARGET)
+
all:
- @make -s -C host
- @make -s -C ta
+ $(q)make -C host TARGET=$(TARGET_HOST) \
+ CROSS_COMPILE=$(CROSS_COMPILE_HOST)
+ $(q)make -C ta TARGET=$(TARGET_TA) \
+ CROSS_COMPILE=$(CROSS_COMPILE_TA)
clean:
- @make -s -C host clean
- @make -s -C ta clean
+ $(q)make -C host clean
+ $(q)make -C ta clean
diff --git a/examples/acipher-rs/host/Makefile b/examples/acipher-rs/host/Makefile
index 836eb5f..5b50c28 100644
--- a/examples/acipher-rs/host/Makefile
+++ b/examples/acipher-rs/host/Makefile
@@ -16,17 +16,11 @@
# under the License.
NAME := acipher-rs
-ARCH ?= aarch64
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE)objcopy
-
-ifeq ($(ARCH), arm)
- TARGET := arm-unknown-linux-gnueabihf
- LINKER_CFG := target.arm-unknown-linux-gnueabihf.linker=\"$(CROSS_COMPILE)gcc\"
-else
- TARGET := aarch64-unknown-linux-gnu
- LINKER_CFG := target.aarch64-unknown-linux-gnu.linker=\"$(CROSS_COMPILE)gcc\"
-endif
+LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\"
OUT_DIR := $(CURDIR)/target/$(TARGET)/release
diff --git a/examples/acipher-rs/ta/Makefile b/examples/acipher-rs/ta/Makefile
index a06cd97..ad35909 100644
--- a/examples/acipher-rs/ta/Makefile
+++ b/examples/acipher-rs/ta/Makefile
@@ -17,20 +17,13 @@
UUID ?= $(shell cat "../uuid.txt")
-ARCH ?= aarch64
-
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE)objcopy
+LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)ld.bfd\"
+
TA_SIGN_KEY ?= $(TA_DEV_KIT_DIR)/keys/default_ta.pem
SIGN := $(TA_DEV_KIT_DIR)/scripts/sign_encrypt.py
-
-ifeq ($(ARCH), arm)
- TARGET := arm-unknown-linux-gnueabihf
- LINKER_CFG := target.arm-unknown-linux-gnueabihf.linker=\"$(CROSS_COMPILE)ld.bfd\"
-else
- TARGET := aarch64-unknown-linux-gnu
- LINKER_CFG := target.aarch64-unknown-linux-gnu.linker=\"$(CROSS_COMPILE)ld.bfd\"
-endif
-
OUT_DIR := $(CURDIR)/target/$(TARGET)/release
all: ta strip sign
diff --git a/examples/aes-rs/Makefile b/examples/aes-rs/Makefile
index 09679cd..db4e5bb 100644
--- a/examples/aes-rs/Makefile
+++ b/examples/aes-rs/Makefile
@@ -15,10 +15,22 @@
# specific language governing permissions and limitations
# under the License.
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
+
+# If _HOST or _TA specific compiler/target are not specified, then use common
+# compiler/target for both
+CROSS_COMPILE_HOST ?= $(CROSS_COMPILE)
+CROSS_COMPILE_TA ?= $(CROSS_COMPILE)
+TARGET_HOST ?= $(TARGET)
+TARGET_TA ?= $(TARGET)
+
all:
- @make -s -C host
- @make -s -C ta
+ $(q)make -C host TARGET=$(TARGET_HOST) \
+ CROSS_COMPILE=$(CROSS_COMPILE_HOST)
+ $(q)make -C ta TARGET=$(TARGET_TA) \
+ CROSS_COMPILE=$(CROSS_COMPILE_TA)
clean:
- @make -s -C host clean
- @make -s -C ta clean
+ $(q)make -C host clean
+ $(q)make -C ta clean
diff --git a/examples/aes-rs/host/Makefile b/examples/aes-rs/host/Makefile
index 4a62581..406e984 100644
--- a/examples/aes-rs/host/Makefile
+++ b/examples/aes-rs/host/Makefile
@@ -16,17 +16,11 @@
# under the License.
NAME := aes-rs
-ARCH ?= aarch64
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE)objcopy
-
-ifeq ($(ARCH), arm)
- TARGET := arm-unknown-linux-gnueabihf
- LINKER_CFG := target.arm-unknown-linux-gnueabihf.linker=\"$(CROSS_COMPILE)gcc\"
-else
- TARGET := aarch64-unknown-linux-gnu
- LINKER_CFG := target.aarch64-unknown-linux-gnu.linker=\"$(CROSS_COMPILE)gcc\"
-endif
+LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\"
OUT_DIR := $(CURDIR)/target/$(TARGET)/release
diff --git a/examples/aes-rs/ta/Makefile b/examples/aes-rs/ta/Makefile
index a06cd97..ad35909 100644
--- a/examples/aes-rs/ta/Makefile
+++ b/examples/aes-rs/ta/Makefile
@@ -17,20 +17,13 @@
UUID ?= $(shell cat "../uuid.txt")
-ARCH ?= aarch64
-
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE)objcopy
+LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)ld.bfd\"
+
TA_SIGN_KEY ?= $(TA_DEV_KIT_DIR)/keys/default_ta.pem
SIGN := $(TA_DEV_KIT_DIR)/scripts/sign_encrypt.py
-
-ifeq ($(ARCH), arm)
- TARGET := arm-unknown-linux-gnueabihf
- LINKER_CFG := target.arm-unknown-linux-gnueabihf.linker=\"$(CROSS_COMPILE)ld.bfd\"
-else
- TARGET := aarch64-unknown-linux-gnu
- LINKER_CFG := target.aarch64-unknown-linux-gnu.linker=\"$(CROSS_COMPILE)ld.bfd\"
-endif
-
OUT_DIR := $(CURDIR)/target/$(TARGET)/release
all: ta strip sign
diff --git a/examples/authentication-rs/Makefile b/examples/authentication-rs/Makefile
index 09679cd..db4e5bb 100644
--- a/examples/authentication-rs/Makefile
+++ b/examples/authentication-rs/Makefile
@@ -15,10 +15,22 @@
# specific language governing permissions and limitations
# under the License.
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
+
+# If _HOST or _TA specific compiler/target are not specified, then use common
+# compiler/target for both
+CROSS_COMPILE_HOST ?= $(CROSS_COMPILE)
+CROSS_COMPILE_TA ?= $(CROSS_COMPILE)
+TARGET_HOST ?= $(TARGET)
+TARGET_TA ?= $(TARGET)
+
all:
- @make -s -C host
- @make -s -C ta
+ $(q)make -C host TARGET=$(TARGET_HOST) \
+ CROSS_COMPILE=$(CROSS_COMPILE_HOST)
+ $(q)make -C ta TARGET=$(TARGET_TA) \
+ CROSS_COMPILE=$(CROSS_COMPILE_TA)
clean:
- @make -s -C host clean
- @make -s -C ta clean
+ $(q)make -C host clean
+ $(q)make -C ta clean
diff --git a/examples/authentication-rs/host/Makefile b/examples/authentication-rs/host/Makefile
index 711ef5b..5a9d0f0 100644
--- a/examples/authentication-rs/host/Makefile
+++ b/examples/authentication-rs/host/Makefile
@@ -16,17 +16,11 @@
# under the License.
NAME := authentication-rs
-ARCH ?= aarch64
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE)objcopy
-
-ifeq ($(ARCH), arm)
- TARGET := arm-unknown-linux-gnueabihf
- LINKER_CFG := target.arm-unknown-linux-gnueabihf.linker=\"$(CROSS_COMPILE)gcc\"
-else
- TARGET := aarch64-unknown-linux-gnu
- LINKER_CFG := target.aarch64-unknown-linux-gnu.linker=\"$(CROSS_COMPILE)gcc\"
-endif
+LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\"
OUT_DIR := $(CURDIR)/target/$(TARGET)/release
diff --git a/examples/authentication-rs/ta/Makefile b/examples/authentication-rs/ta/Makefile
index a06cd97..ad35909 100644
--- a/examples/authentication-rs/ta/Makefile
+++ b/examples/authentication-rs/ta/Makefile
@@ -17,20 +17,13 @@
UUID ?= $(shell cat "../uuid.txt")
-ARCH ?= aarch64
-
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE)objcopy
+LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)ld.bfd\"
+
TA_SIGN_KEY ?= $(TA_DEV_KIT_DIR)/keys/default_ta.pem
SIGN := $(TA_DEV_KIT_DIR)/scripts/sign_encrypt.py
-
-ifeq ($(ARCH), arm)
- TARGET := arm-unknown-linux-gnueabihf
- LINKER_CFG := target.arm-unknown-linux-gnueabihf.linker=\"$(CROSS_COMPILE)ld.bfd\"
-else
- TARGET := aarch64-unknown-linux-gnu
- LINKER_CFG := target.aarch64-unknown-linux-gnu.linker=\"$(CROSS_COMPILE)ld.bfd\"
-endif
-
OUT_DIR := $(CURDIR)/target/$(TARGET)/release
all: ta strip sign
diff --git a/examples/big_int-rs/Makefile b/examples/big_int-rs/Makefile
index 09679cd..db4e5bb 100644
--- a/examples/big_int-rs/Makefile
+++ b/examples/big_int-rs/Makefile
@@ -15,10 +15,22 @@
# specific language governing permissions and limitations
# under the License.
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
+
+# If _HOST or _TA specific compiler/target are not specified, then use common
+# compiler/target for both
+CROSS_COMPILE_HOST ?= $(CROSS_COMPILE)
+CROSS_COMPILE_TA ?= $(CROSS_COMPILE)
+TARGET_HOST ?= $(TARGET)
+TARGET_TA ?= $(TARGET)
+
all:
- @make -s -C host
- @make -s -C ta
+ $(q)make -C host TARGET=$(TARGET_HOST) \
+ CROSS_COMPILE=$(CROSS_COMPILE_HOST)
+ $(q)make -C ta TARGET=$(TARGET_TA) \
+ CROSS_COMPILE=$(CROSS_COMPILE_TA)
clean:
- @make -s -C host clean
- @make -s -C ta clean
+ $(q)make -C host clean
+ $(q)make -C ta clean
diff --git a/examples/big_int-rs/host/Makefile b/examples/big_int-rs/host/Makefile
index cd11317..4b11792 100644
--- a/examples/big_int-rs/host/Makefile
+++ b/examples/big_int-rs/host/Makefile
@@ -16,17 +16,11 @@
# under the License.
NAME := big_int-rs
-ARCH ?= aarch64
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE)objcopy
-
-ifeq ($(ARCH), arm)
- TARGET := arm-unknown-linux-gnueabihf
- LINKER_CFG := target.arm-unknown-linux-gnueabihf.linker=\"$(CROSS_COMPILE)gcc\"
-else
- TARGET := aarch64-unknown-linux-gnu
- LINKER_CFG := target.aarch64-unknown-linux-gnu.linker=\"$(CROSS_COMPILE)gcc\"
-endif
+LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\"
OUT_DIR := $(CURDIR)/target/$(TARGET)/release
diff --git a/examples/big_int-rs/ta/Makefile b/examples/big_int-rs/ta/Makefile
index a06cd97..ad35909 100644
--- a/examples/big_int-rs/ta/Makefile
+++ b/examples/big_int-rs/ta/Makefile
@@ -17,20 +17,13 @@
UUID ?= $(shell cat "../uuid.txt")
-ARCH ?= aarch64
-
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE)objcopy
+LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)ld.bfd\"
+
TA_SIGN_KEY ?= $(TA_DEV_KIT_DIR)/keys/default_ta.pem
SIGN := $(TA_DEV_KIT_DIR)/scripts/sign_encrypt.py
-
-ifeq ($(ARCH), arm)
- TARGET := arm-unknown-linux-gnueabihf
- LINKER_CFG := target.arm-unknown-linux-gnueabihf.linker=\"$(CROSS_COMPILE)ld.bfd\"
-else
- TARGET := aarch64-unknown-linux-gnu
- LINKER_CFG := target.aarch64-unknown-linux-gnu.linker=\"$(CROSS_COMPILE)ld.bfd\"
-endif
-
OUT_DIR := $(CURDIR)/target/$(TARGET)/release
all: ta strip sign
diff --git a/examples/diffie_hellman-rs/Makefile b/examples/diffie_hellman-rs/Makefile
index 09679cd..db4e5bb 100644
--- a/examples/diffie_hellman-rs/Makefile
+++ b/examples/diffie_hellman-rs/Makefile
@@ -15,10 +15,22 @@
# specific language governing permissions and limitations
# under the License.
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
+
+# If _HOST or _TA specific compiler/target are not specified, then use common
+# compiler/target for both
+CROSS_COMPILE_HOST ?= $(CROSS_COMPILE)
+CROSS_COMPILE_TA ?= $(CROSS_COMPILE)
+TARGET_HOST ?= $(TARGET)
+TARGET_TA ?= $(TARGET)
+
all:
- @make -s -C host
- @make -s -C ta
+ $(q)make -C host TARGET=$(TARGET_HOST) \
+ CROSS_COMPILE=$(CROSS_COMPILE_HOST)
+ $(q)make -C ta TARGET=$(TARGET_TA) \
+ CROSS_COMPILE=$(CROSS_COMPILE_TA)
clean:
- @make -s -C host clean
- @make -s -C ta clean
+ $(q)make -C host clean
+ $(q)make -C ta clean
diff --git a/examples/diffie_hellman-rs/host/Makefile b/examples/diffie_hellman-rs/host/Makefile
index cc0fffd..111bf10 100644
--- a/examples/diffie_hellman-rs/host/Makefile
+++ b/examples/diffie_hellman-rs/host/Makefile
@@ -16,17 +16,11 @@
# under the License.
NAME := diffie_hellman-rs
-ARCH ?= aarch64
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE)objcopy
-
-ifeq ($(ARCH), arm)
- TARGET := arm-unknown-linux-gnueabihf
- LINKER_CFG := target.arm-unknown-linux-gnueabihf.linker=\"$(CROSS_COMPILE)gcc\"
-else
- TARGET := aarch64-unknown-linux-gnu
- LINKER_CFG := target.aarch64-unknown-linux-gnu.linker=\"$(CROSS_COMPILE)gcc\"
-endif
+LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\"
OUT_DIR := $(CURDIR)/target/$(TARGET)/release
diff --git a/examples/diffie_hellman-rs/ta/Makefile b/examples/diffie_hellman-rs/ta/Makefile
index a06cd97..ad35909 100644
--- a/examples/diffie_hellman-rs/ta/Makefile
+++ b/examples/diffie_hellman-rs/ta/Makefile
@@ -17,20 +17,13 @@
UUID ?= $(shell cat "../uuid.txt")
-ARCH ?= aarch64
-
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE)objcopy
+LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)ld.bfd\"
+
TA_SIGN_KEY ?= $(TA_DEV_KIT_DIR)/keys/default_ta.pem
SIGN := $(TA_DEV_KIT_DIR)/scripts/sign_encrypt.py
-
-ifeq ($(ARCH), arm)
- TARGET := arm-unknown-linux-gnueabihf
- LINKER_CFG := target.arm-unknown-linux-gnueabihf.linker=\"$(CROSS_COMPILE)ld.bfd\"
-else
- TARGET := aarch64-unknown-linux-gnu
- LINKER_CFG := target.aarch64-unknown-linux-gnu.linker=\"$(CROSS_COMPILE)ld.bfd\"
-endif
-
OUT_DIR := $(CURDIR)/target/$(TARGET)/release
all: ta strip sign
diff --git a/examples/digest-rs/Makefile b/examples/digest-rs/Makefile
index 09679cd..db4e5bb 100644
--- a/examples/digest-rs/Makefile
+++ b/examples/digest-rs/Makefile
@@ -15,10 +15,22 @@
# specific language governing permissions and limitations
# under the License.
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
+
+# If _HOST or _TA specific compiler/target are not specified, then use common
+# compiler/target for both
+CROSS_COMPILE_HOST ?= $(CROSS_COMPILE)
+CROSS_COMPILE_TA ?= $(CROSS_COMPILE)
+TARGET_HOST ?= $(TARGET)
+TARGET_TA ?= $(TARGET)
+
all:
- @make -s -C host
- @make -s -C ta
+ $(q)make -C host TARGET=$(TARGET_HOST) \
+ CROSS_COMPILE=$(CROSS_COMPILE_HOST)
+ $(q)make -C ta TARGET=$(TARGET_TA) \
+ CROSS_COMPILE=$(CROSS_COMPILE_TA)
clean:
- @make -s -C host clean
- @make -s -C ta clean
+ $(q)make -C host clean
+ $(q)make -C ta clean
diff --git a/examples/digest-rs/host/Makefile b/examples/digest-rs/host/Makefile
index ae76fda..78fb58d 100644
--- a/examples/digest-rs/host/Makefile
+++ b/examples/digest-rs/host/Makefile
@@ -16,17 +16,11 @@
# under the License.
NAME := digest-rs
-ARCH ?= aarch64
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE)objcopy
-
-ifeq ($(ARCH), arm)
- TARGET := arm-unknown-linux-gnueabihf
- LINKER_CFG := target.arm-unknown-linux-gnueabihf.linker=\"$(CROSS_COMPILE)gcc\"
-else
- TARGET := aarch64-unknown-linux-gnu
- LINKER_CFG := target.aarch64-unknown-linux-gnu.linker=\"$(CROSS_COMPILE)gcc\"
-endif
+LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\"
OUT_DIR := $(CURDIR)/target/$(TARGET)/release
diff --git a/examples/digest-rs/ta/Makefile b/examples/digest-rs/ta/Makefile
index a06cd97..ad35909 100644
--- a/examples/digest-rs/ta/Makefile
+++ b/examples/digest-rs/ta/Makefile
@@ -17,20 +17,13 @@
UUID ?= $(shell cat "../uuid.txt")
-ARCH ?= aarch64
-
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE)objcopy
+LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)ld.bfd\"
+
TA_SIGN_KEY ?= $(TA_DEV_KIT_DIR)/keys/default_ta.pem
SIGN := $(TA_DEV_KIT_DIR)/scripts/sign_encrypt.py
-
-ifeq ($(ARCH), arm)
- TARGET := arm-unknown-linux-gnueabihf
- LINKER_CFG := target.arm-unknown-linux-gnueabihf.linker=\"$(CROSS_COMPILE)ld.bfd\"
-else
- TARGET := aarch64-unknown-linux-gnu
- LINKER_CFG := target.aarch64-unknown-linux-gnu.linker=\"$(CROSS_COMPILE)ld.bfd\"
-endif
-
OUT_DIR := $(CURDIR)/target/$(TARGET)/release
all: ta strip sign
diff --git a/examples/hello_world-rs/Makefile b/examples/hello_world-rs/Makefile
index 09679cd..db4e5bb 100644
--- a/examples/hello_world-rs/Makefile
+++ b/examples/hello_world-rs/Makefile
@@ -15,10 +15,22 @@
# specific language governing permissions and limitations
# under the License.
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
+
+# If _HOST or _TA specific compiler/target are not specified, then use common
+# compiler/target for both
+CROSS_COMPILE_HOST ?= $(CROSS_COMPILE)
+CROSS_COMPILE_TA ?= $(CROSS_COMPILE)
+TARGET_HOST ?= $(TARGET)
+TARGET_TA ?= $(TARGET)
+
all:
- @make -s -C host
- @make -s -C ta
+ $(q)make -C host TARGET=$(TARGET_HOST) \
+ CROSS_COMPILE=$(CROSS_COMPILE_HOST)
+ $(q)make -C ta TARGET=$(TARGET_TA) \
+ CROSS_COMPILE=$(CROSS_COMPILE_TA)
clean:
- @make -s -C host clean
- @make -s -C ta clean
+ $(q)make -C host clean
+ $(q)make -C ta clean
diff --git a/examples/hello_world-rs/host/Makefile b/examples/hello_world-rs/host/Makefile
index f93bdab..ea63eeb 100644
--- a/examples/hello_world-rs/host/Makefile
+++ b/examples/hello_world-rs/host/Makefile
@@ -16,17 +16,11 @@
# under the License.
NAME := hello_world-rs
-ARCH ?= aarch64
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE)objcopy
-
-ifeq ($(ARCH), arm)
- TARGET := arm-unknown-linux-gnueabihf
- LINKER_CFG := target.arm-unknown-linux-gnueabihf.linker=\"$(CROSS_COMPILE)gcc\"
-else
- TARGET := aarch64-unknown-linux-gnu
- LINKER_CFG := target.aarch64-unknown-linux-gnu.linker=\"$(CROSS_COMPILE)gcc\"
-endif
+LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\"
OUT_DIR := $(CURDIR)/target/$(TARGET)/release
diff --git a/examples/hello_world-rs/ta/Makefile b/examples/hello_world-rs/ta/Makefile
index a06cd97..ad35909 100644
--- a/examples/hello_world-rs/ta/Makefile
+++ b/examples/hello_world-rs/ta/Makefile
@@ -17,20 +17,13 @@
UUID ?= $(shell cat "../uuid.txt")
-ARCH ?= aarch64
-
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE)objcopy
+LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)ld.bfd\"
+
TA_SIGN_KEY ?= $(TA_DEV_KIT_DIR)/keys/default_ta.pem
SIGN := $(TA_DEV_KIT_DIR)/scripts/sign_encrypt.py
-
-ifeq ($(ARCH), arm)
- TARGET := arm-unknown-linux-gnueabihf
- LINKER_CFG := target.arm-unknown-linux-gnueabihf.linker=\"$(CROSS_COMPILE)ld.bfd\"
-else
- TARGET := aarch64-unknown-linux-gnu
- LINKER_CFG := target.aarch64-unknown-linux-gnu.linker=\"$(CROSS_COMPILE)ld.bfd\"
-endif
-
OUT_DIR := $(CURDIR)/target/$(TARGET)/release
all: ta strip sign
diff --git a/examples/hotp-rs/Makefile b/examples/hotp-rs/Makefile
index 09679cd..db4e5bb 100644
--- a/examples/hotp-rs/Makefile
+++ b/examples/hotp-rs/Makefile
@@ -15,10 +15,22 @@
# specific language governing permissions and limitations
# under the License.
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
+
+# If _HOST or _TA specific compiler/target are not specified, then use common
+# compiler/target for both
+CROSS_COMPILE_HOST ?= $(CROSS_COMPILE)
+CROSS_COMPILE_TA ?= $(CROSS_COMPILE)
+TARGET_HOST ?= $(TARGET)
+TARGET_TA ?= $(TARGET)
+
all:
- @make -s -C host
- @make -s -C ta
+ $(q)make -C host TARGET=$(TARGET_HOST) \
+ CROSS_COMPILE=$(CROSS_COMPILE_HOST)
+ $(q)make -C ta TARGET=$(TARGET_TA) \
+ CROSS_COMPILE=$(CROSS_COMPILE_TA)
clean:
- @make -s -C host clean
- @make -s -C ta clean
+ $(q)make -C host clean
+ $(q)make -C ta clean
diff --git a/examples/hotp-rs/host/Makefile b/examples/hotp-rs/host/Makefile
index 6ebed56..a537efb 100644
--- a/examples/hotp-rs/host/Makefile
+++ b/examples/hotp-rs/host/Makefile
@@ -16,17 +16,11 @@
# under the License.
NAME := hotp-rs
-ARCH ?= aarch64
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE)objcopy
-
-ifeq ($(ARCH), arm)
- TARGET := arm-unknown-linux-gnueabihf
- LINKER_CFG := target.arm-unknown-linux-gnueabihf.linker=\"$(CROSS_COMPILE)gcc\"
-else
- TARGET := aarch64-unknown-linux-gnu
- LINKER_CFG := target.aarch64-unknown-linux-gnu.linker=\"$(CROSS_COMPILE)gcc\"
-endif
+LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\"
OUT_DIR := $(CURDIR)/target/$(TARGET)/release
diff --git a/examples/hotp-rs/ta/Makefile b/examples/hotp-rs/ta/Makefile
index a06cd97..ad35909 100644
--- a/examples/hotp-rs/ta/Makefile
+++ b/examples/hotp-rs/ta/Makefile
@@ -17,20 +17,13 @@
UUID ?= $(shell cat "../uuid.txt")
-ARCH ?= aarch64
-
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE)objcopy
+LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)ld.bfd\"
+
TA_SIGN_KEY ?= $(TA_DEV_KIT_DIR)/keys/default_ta.pem
SIGN := $(TA_DEV_KIT_DIR)/scripts/sign_encrypt.py
-
-ifeq ($(ARCH), arm)
- TARGET := arm-unknown-linux-gnueabihf
- LINKER_CFG := target.arm-unknown-linux-gnueabihf.linker=\"$(CROSS_COMPILE)ld.bfd\"
-else
- TARGET := aarch64-unknown-linux-gnu
- LINKER_CFG := target.aarch64-unknown-linux-gnu.linker=\"$(CROSS_COMPILE)ld.bfd\"
-endif
-
OUT_DIR := $(CURDIR)/target/$(TARGET)/release
all: ta strip sign
diff --git a/examples/random-rs/Makefile b/examples/random-rs/Makefile
index 09679cd..db4e5bb 100644
--- a/examples/random-rs/Makefile
+++ b/examples/random-rs/Makefile
@@ -15,10 +15,22 @@
# specific language governing permissions and limitations
# under the License.
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
+
+# If _HOST or _TA specific compiler/target are not specified, then use common
+# compiler/target for both
+CROSS_COMPILE_HOST ?= $(CROSS_COMPILE)
+CROSS_COMPILE_TA ?= $(CROSS_COMPILE)
+TARGET_HOST ?= $(TARGET)
+TARGET_TA ?= $(TARGET)
+
all:
- @make -s -C host
- @make -s -C ta
+ $(q)make -C host TARGET=$(TARGET_HOST) \
+ CROSS_COMPILE=$(CROSS_COMPILE_HOST)
+ $(q)make -C ta TARGET=$(TARGET_TA) \
+ CROSS_COMPILE=$(CROSS_COMPILE_TA)
clean:
- @make -s -C host clean
- @make -s -C ta clean
+ $(q)make -C host clean
+ $(q)make -C ta clean
diff --git a/examples/random-rs/host/Makefile b/examples/random-rs/host/Makefile
index 98f6b5f..593b5a6 100644
--- a/examples/random-rs/host/Makefile
+++ b/examples/random-rs/host/Makefile
@@ -16,17 +16,11 @@
# under the License.
NAME := random-rs
-ARCH ?= aarch64
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE)objcopy
-
-ifeq ($(ARCH), arm)
- TARGET := arm-unknown-linux-gnueabihf
- LINKER_CFG := target.arm-unknown-linux-gnueabihf.linker=\"$(CROSS_COMPILE)gcc\"
-else
- TARGET := aarch64-unknown-linux-gnu
- LINKER_CFG := target.aarch64-unknown-linux-gnu.linker=\"$(CROSS_COMPILE)gcc\"
-endif
+LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\"
OUT_DIR := $(CURDIR)/target/$(TARGET)/release
diff --git a/examples/random-rs/ta/Makefile b/examples/random-rs/ta/Makefile
index a06cd97..ad35909 100644
--- a/examples/random-rs/ta/Makefile
+++ b/examples/random-rs/ta/Makefile
@@ -17,20 +17,13 @@
UUID ?= $(shell cat "../uuid.txt")
-ARCH ?= aarch64
-
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE)objcopy
+LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)ld.bfd\"
+
TA_SIGN_KEY ?= $(TA_DEV_KIT_DIR)/keys/default_ta.pem
SIGN := $(TA_DEV_KIT_DIR)/scripts/sign_encrypt.py
-
-ifeq ($(ARCH), arm)
- TARGET := arm-unknown-linux-gnueabihf
- LINKER_CFG := target.arm-unknown-linux-gnueabihf.linker=\"$(CROSS_COMPILE)ld.bfd\"
-else
- TARGET := aarch64-unknown-linux-gnu
- LINKER_CFG := target.aarch64-unknown-linux-gnu.linker=\"$(CROSS_COMPILE)ld.bfd\"
-endif
-
OUT_DIR := $(CURDIR)/target/$(TARGET)/release
all: ta strip sign
diff --git a/examples/secure_storage-rs/Makefile b/examples/secure_storage-rs/Makefile
index 09679cd..db4e5bb 100644
--- a/examples/secure_storage-rs/Makefile
+++ b/examples/secure_storage-rs/Makefile
@@ -15,10 +15,22 @@
# specific language governing permissions and limitations
# under the License.
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
+
+# If _HOST or _TA specific compiler/target are not specified, then use common
+# compiler/target for both
+CROSS_COMPILE_HOST ?= $(CROSS_COMPILE)
+CROSS_COMPILE_TA ?= $(CROSS_COMPILE)
+TARGET_HOST ?= $(TARGET)
+TARGET_TA ?= $(TARGET)
+
all:
- @make -s -C host
- @make -s -C ta
+ $(q)make -C host TARGET=$(TARGET_HOST) \
+ CROSS_COMPILE=$(CROSS_COMPILE_HOST)
+ $(q)make -C ta TARGET=$(TARGET_TA) \
+ CROSS_COMPILE=$(CROSS_COMPILE_TA)
clean:
- @make -s -C host clean
- @make -s -C ta clean
+ $(q)make -C host clean
+ $(q)make -C ta clean
diff --git a/examples/secure_storage-rs/host/Makefile b/examples/secure_storage-rs/host/Makefile
index 95d1664..cd7fdd7 100644
--- a/examples/secure_storage-rs/host/Makefile
+++ b/examples/secure_storage-rs/host/Makefile
@@ -16,17 +16,11 @@
# under the License.
NAME := secure_storage-rs
-ARCH ?= aarch64
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE)objcopy
-
-ifeq ($(ARCH), arm)
- TARGET := arm-unknown-linux-gnueabihf
- LINKER_CFG := target.arm-unknown-linux-gnueabihf.linker=\"$(CROSS_COMPILE)gcc\"
-else
- TARGET := aarch64-unknown-linux-gnu
- LINKER_CFG := target.aarch64-unknown-linux-gnu.linker=\"$(CROSS_COMPILE)gcc\"
-endif
+LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\"
OUT_DIR := $(CURDIR)/target/$(TARGET)/release
diff --git a/examples/secure_storage-rs/ta/Makefile b/examples/secure_storage-rs/ta/Makefile
index a06cd97..ad35909 100644
--- a/examples/secure_storage-rs/ta/Makefile
+++ b/examples/secure_storage-rs/ta/Makefile
@@ -17,20 +17,13 @@
UUID ?= $(shell cat "../uuid.txt")
-ARCH ?= aarch64
-
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE)objcopy
+LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)ld.bfd\"
+
TA_SIGN_KEY ?= $(TA_DEV_KIT_DIR)/keys/default_ta.pem
SIGN := $(TA_DEV_KIT_DIR)/scripts/sign_encrypt.py
-
-ifeq ($(ARCH), arm)
- TARGET := arm-unknown-linux-gnueabihf
- LINKER_CFG := target.arm-unknown-linux-gnueabihf.linker=\"$(CROSS_COMPILE)ld.bfd\"
-else
- TARGET := aarch64-unknown-linux-gnu
- LINKER_CFG := target.aarch64-unknown-linux-gnu.linker=\"$(CROSS_COMPILE)ld.bfd\"
-endif
-
OUT_DIR := $(CURDIR)/target/$(TARGET)/release
all: ta strip sign
diff --git a/examples/signature_verification-rs/Makefile b/examples/signature_verification-rs/Makefile
index 09679cd..db4e5bb 100644
--- a/examples/signature_verification-rs/Makefile
+++ b/examples/signature_verification-rs/Makefile
@@ -15,10 +15,22 @@
# specific language governing permissions and limitations
# under the License.
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
+
+# If _HOST or _TA specific compiler/target are not specified, then use common
+# compiler/target for both
+CROSS_COMPILE_HOST ?= $(CROSS_COMPILE)
+CROSS_COMPILE_TA ?= $(CROSS_COMPILE)
+TARGET_HOST ?= $(TARGET)
+TARGET_TA ?= $(TARGET)
+
all:
- @make -s -C host
- @make -s -C ta
+ $(q)make -C host TARGET=$(TARGET_HOST) \
+ CROSS_COMPILE=$(CROSS_COMPILE_HOST)
+ $(q)make -C ta TARGET=$(TARGET_TA) \
+ CROSS_COMPILE=$(CROSS_COMPILE_TA)
clean:
- @make -s -C host clean
- @make -s -C ta clean
+ $(q)make -C host clean
+ $(q)make -C ta clean
diff --git a/examples/signature_verification-rs/host/Makefile b/examples/signature_verification-rs/host/Makefile
index c87d3d2..bf7c728 100644
--- a/examples/signature_verification-rs/host/Makefile
+++ b/examples/signature_verification-rs/host/Makefile
@@ -16,17 +16,11 @@
# under the License.
NAME := signature_verification-rs
-ARCH ?= aarch64
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE)objcopy
-
-ifeq ($(ARCH), arm)
- TARGET := arm-unknown-linux-gnueabihf
- LINKER_CFG := target.arm-unknown-linux-gnueabihf.linker=\"$(CROSS_COMPILE)gcc\"
-else
- TARGET := aarch64-unknown-linux-gnu
- LINKER_CFG := target.aarch64-unknown-linux-gnu.linker=\"$(CROSS_COMPILE)gcc\"
-endif
+LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\"
OUT_DIR := $(CURDIR)/target/$(TARGET)/release
diff --git a/examples/signature_verification-rs/ta/Makefile b/examples/signature_verification-rs/ta/Makefile
index a06cd97..ad35909 100644
--- a/examples/signature_verification-rs/ta/Makefile
+++ b/examples/signature_verification-rs/ta/Makefile
@@ -17,20 +17,13 @@
UUID ?= $(shell cat "../uuid.txt")
-ARCH ?= aarch64
-
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE)objcopy
+LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)ld.bfd\"
+
TA_SIGN_KEY ?= $(TA_DEV_KIT_DIR)/keys/default_ta.pem
SIGN := $(TA_DEV_KIT_DIR)/scripts/sign_encrypt.py
-
-ifeq ($(ARCH), arm)
- TARGET := arm-unknown-linux-gnueabihf
- LINKER_CFG := target.arm-unknown-linux-gnueabihf.linker=\"$(CROSS_COMPILE)ld.bfd\"
-else
- TARGET := aarch64-unknown-linux-gnu
- LINKER_CFG := target.aarch64-unknown-linux-gnu.linker=\"$(CROSS_COMPILE)ld.bfd\"
-endif
-
OUT_DIR := $(CURDIR)/target/$(TARGET)/release
all: ta strip sign
diff --git a/examples/supp_plugin-rs/Makefile b/examples/supp_plugin-rs/Makefile
index b0b5308..7ba788c 100644
--- a/examples/supp_plugin-rs/Makefile
+++ b/examples/supp_plugin-rs/Makefile
@@ -15,12 +15,25 @@
# specific language governing permissions and limitations
# under the License.
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
+
+# If _HOST or _TA specific compiler/target are not specified, then use common
+# compiler/target for both
+CROSS_COMPILE_HOST ?= $(CROSS_COMPILE)
+CROSS_COMPILE_TA ?= $(CROSS_COMPILE)
+TARGET_HOST ?= $(TARGET)
+TARGET_TA ?= $(TARGET)
+
all:
- @make -s -C host
- @make -s -C ta
- @make -s -C plugin
+ $(q)make -C host TARGET=$(TARGET_HOST) \
+ CROSS_COMPILE=$(CROSS_COMPILE_HOST)
+ $(q)make -C plugin TARGET=$(TARGET_HOST) \
+ CROSS_COMPILE=$(CROSS_COMPILE_HOST)
+ $(q)make -C ta TARGET=$(TARGET_TA) \
+ CROSS_COMPILE=$(CROSS_COMPILE_TA)
clean:
- @make -s -C host clean
- @make -s -C ta clean
- @make -s -C plugin clean
+ $(q)make -C host clean
+ $(q)make -C plugin clean
+ $(q)make -C ta clean
diff --git a/examples/supp_plugin-rs/host/Makefile b/examples/supp_plugin-rs/host/Makefile
index 3986c93..79cc01a 100644
--- a/examples/supp_plugin-rs/host/Makefile
+++ b/examples/supp_plugin-rs/host/Makefile
@@ -16,17 +16,11 @@
# under the License.
NAME := supp_plugin-rs
-ARCH ?= aarch64
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE)objcopy
-
-ifeq ($(ARCH), arm)
- TARGET := arm-unknown-linux-gnueabihf
- LINKER_CFG := target.arm-unknown-linux-gnueabihf.linker=\"$(CROSS_COMPILE)gcc\"
-else
- TARGET := aarch64-unknown-linux-gnu
- LINKER_CFG := target.aarch64-unknown-linux-gnu.linker=\"$(CROSS_COMPILE)gcc\"
-endif
+LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\"
OUT_DIR := $(CURDIR)/target/$(TARGET)/release
diff --git a/examples/supp_plugin-rs/plugin/Makefile b/examples/supp_plugin-rs/plugin/Makefile
index 6f33775..c4d5b96 100644
--- a/examples/supp_plugin-rs/plugin/Makefile
+++ b/examples/supp_plugin-rs/plugin/Makefile
@@ -16,18 +16,12 @@
# under the License.
NAME := syslog_plugin
-ARCH ?= aarch64
PLUGIN_UUID := `cat ../plugin_uuid.txt`
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE)objcopy
-
-ifeq ($(ARCH), arm)
- TARGET := arm-unknown-linux-gnueabihf
- LINKER_CFG := target.arm-unknown-linux-gnueabihf.linker=\"$(CROSS_COMPILE)gcc\"
-else
- TARGET := aarch64-unknown-linux-gnu
- LINKER_CFG := target.aarch64-unknown-linux-gnu.linker=\"$(CROSS_COMPILE)gcc\"
-endif
+LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\"
OUT_DIR := $(CURDIR)/target/$(TARGET)/release
diff --git a/examples/supp_plugin-rs/ta/Makefile b/examples/supp_plugin-rs/ta/Makefile
index f185c5a..b8226d6 100644
--- a/examples/supp_plugin-rs/ta/Makefile
+++ b/examples/supp_plugin-rs/ta/Makefile
@@ -17,20 +17,13 @@
UUID ?= $(shell cat "../ta_uuid.txt")
-ARCH ?= aarch64
-
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE)objcopy
+LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)ld.bfd\"
+
TA_SIGN_KEY ?= $(TA_DEV_KIT_DIR)/keys/default_ta.pem
SIGN := $(TA_DEV_KIT_DIR)/scripts/sign_encrypt.py
-
-ifeq ($(ARCH), arm)
- TARGET := arm-unknown-linux-gnueabihf
- LINKER_CFG := target.arm-unknown-linux-gnueabihf.linker=\"$(CROSS_COMPILE)ld.bfd\"
-else
- TARGET := aarch64-unknown-linux-gnu
- LINKER_CFG := target.aarch64-unknown-linux-gnu.linker=\"$(CROSS_COMPILE)ld.bfd\"
-endif
-
OUT_DIR := $(CURDIR)/target/$(TARGET)/release
all: ta strip sign
diff --git a/examples/time-rs/Makefile b/examples/time-rs/Makefile
index 09679cd..db4e5bb 100644
--- a/examples/time-rs/Makefile
+++ b/examples/time-rs/Makefile
@@ -15,10 +15,22 @@
# specific language governing permissions and limitations
# under the License.
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
+
+# If _HOST or _TA specific compiler/target are not specified, then use common
+# compiler/target for both
+CROSS_COMPILE_HOST ?= $(CROSS_COMPILE)
+CROSS_COMPILE_TA ?= $(CROSS_COMPILE)
+TARGET_HOST ?= $(TARGET)
+TARGET_TA ?= $(TARGET)
+
all:
- @make -s -C host
- @make -s -C ta
+ $(q)make -C host TARGET=$(TARGET_HOST) \
+ CROSS_COMPILE=$(CROSS_COMPILE_HOST)
+ $(q)make -C ta TARGET=$(TARGET_TA) \
+ CROSS_COMPILE=$(CROSS_COMPILE_TA)
clean:
- @make -s -C host clean
- @make -s -C ta clean
+ $(q)make -C host clean
+ $(q)make -C ta clean
diff --git a/examples/time-rs/host/Makefile b/examples/time-rs/host/Makefile
index 98c26b6..3d9597a 100644
--- a/examples/time-rs/host/Makefile
+++ b/examples/time-rs/host/Makefile
@@ -16,17 +16,11 @@
# under the License.
NAME := time-rs
-ARCH ?= aarch64
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE)objcopy
-
-ifeq ($(ARCH), arm)
- TARGET := arm-unknown-linux-gnueabihf
- LINKER_CFG := target.arm-unknown-linux-gnueabihf.linker=\"$(CROSS_COMPILE)gcc\"
-else
- TARGET := aarch64-unknown-linux-gnu
- LINKER_CFG := target.aarch64-unknown-linux-gnu.linker=\"$(CROSS_COMPILE)gcc\"
-endif
+LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\"
OUT_DIR := $(CURDIR)/target/$(TARGET)/release
diff --git a/examples/time-rs/ta/Makefile b/examples/time-rs/ta/Makefile
index a06cd97..ad35909 100644
--- a/examples/time-rs/ta/Makefile
+++ b/examples/time-rs/ta/Makefile
@@ -17,20 +17,13 @@
UUID ?= $(shell cat "../uuid.txt")
-ARCH ?= aarch64
-
+TARGET ?= aarch64-unknown-linux-gnu
+CROSS_COMPILE ?= aarch64-linux-gnu-
OBJCOPY := $(CROSS_COMPILE)objcopy
+LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)ld.bfd\"
+
TA_SIGN_KEY ?= $(TA_DEV_KIT_DIR)/keys/default_ta.pem
SIGN := $(TA_DEV_KIT_DIR)/scripts/sign_encrypt.py
-
-ifeq ($(ARCH), arm)
- TARGET := arm-unknown-linux-gnueabihf
- LINKER_CFG := target.arm-unknown-linux-gnueabihf.linker=\"$(CROSS_COMPILE)ld.bfd\"
-else
- TARGET := aarch64-unknown-linux-gnu
- LINKER_CFG := target.aarch64-unknown-linux-gnu.linker=\"$(CROSS_COMPILE)ld.bfd\"
-endif
-
OUT_DIR := $(CURDIR)/target/$(TARGET)/release
all: ta strip sign
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@teaclave.apache.org
For additional commands, e-mail: commits-help@teaclave.apache.org
(incubator-teaclave-trustzone-sdk) 04/04: CI: Updates to build rust examples for mixed environments
Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
yuanz pushed a commit to branch no-std
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave-trustzone-sdk.git
commit 3e58869972034b7d4684cf22425b6437107ec23f
Author: Sumit Garg <su...@linaro.org>
AuthorDate: Mon Jan 8 18:32:10 2024 +0530
CI: Updates to build rust examples for mixed environments
Signed-off-by: Sumit Garg <su...@linaro.org>
---
.github/workflows/ci.yml | 31 +++++++++++++++++++++++++------
1 file changed, 25 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 386ddeb..9e2a1c9 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -73,6 +73,7 @@ jobs:
export CROSS_COMPILE="aarch64-linux-gnu-"
export CROSS_COMPILE32="arm-linux-gnueabihf-"
export CROSS_COMPILE64="aarch64-linux-gnu-"
+ export OPTEE_CLIENT_EXPORT=~/optee_client/out/export/
./setup.sh
. ~/.cargo/env
@@ -82,16 +83,34 @@ jobs:
(cd ~/optee_os && make PLATFORM=vexpress-qemu_armv8a)
(cd ~/optee_client && make WITH_TEEACL=0)
- # Build Arm 64-bit OP-TEE rust examples
+ # Build OP-TEE rust examples for Arm 64-bit both host and TA
export TA_DEV_KIT_DIR=~/optee_os/out/arm-plat-vexpress/export-ta_arm64/
- export OPTEE_CLIENT_EXPORT=~/optee_client/out/export/
make
- # Build Arm 32-bit OP-TEE rust examples
- (cd ~/optee_client && make clean && make CROSS_COMPILE=$CROSS_COMPILE32 WITH_TEEACL=0)
+ # 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 OPTEE_CLIENT_EXPORT=~/optee_client/out/export/
- make clean && make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE32
+ 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"
+ make clean && make
+
+ # Build OP-TEE rust examples for Arm 32-bit both host and TA
+ export TA_DEV_KIT_DIR=~/optee_os/out/arm-plat-vexpress/export-ta_arm32/
+ export CROSS_COMPILE_HOST=$CROSS_COMPILE32
+ export CROSS_COMPILE_TA=$CROSS_COMPILE32
+ export TARGET_HOST="arm-unknown-linux-gnueabihf"
+ export TARGET_TA="arm-unknown-linux-gnueabihf"
+ (cd ~/optee_client && make clean && make CROSS_COMPILE=$CROSS_COMPILE32 WITH_TEEACL=0)
+ make clean && make
+
+ # Build OP-TEE rust examples for Arm 32-bit host and 64-bit TA
+ export TA_DEV_KIT_DIR=~/optee_os/out/arm-plat-vexpress/export-ta_arm64/
+ export CROSS_COMPILE_HOST=$CROSS_COMPILE32
+ export CROSS_COMPILE_TA=$CROSS_COMPILE64
+ export TARGET_HOST="arm-unknown-linux-gnueabihf"
+ export TARGET_TA="aarch64-unknown-linux-gnu"
+ make clean && make
build-and-run-examples-in-OPTEE-repo:
runs-on: ubuntu-latest
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@teaclave.apache.org
For additional commands, e-mail: commits-help@teaclave.apache.org
(incubator-teaclave-trustzone-sdk) 01/04: examples: ta: build.rs: Use TARGET instead of custom ARCH
Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
yuanz pushed a commit to branch no-std
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave-trustzone-sdk.git
commit 31066fcb76256551d2bc47e9bed4924918b90c71
Author: Sumit Garg <su...@linaro.org>
AuthorDate: Mon Jan 8 16:15:50 2024 +0530
examples: ta: build.rs: Use TARGET instead of custom ARCH
TARGET is standardized rust environment variable to provide full target
triplet, so use that to distinguish rather than custom ARCH which will
be dropped in a future patch.
Signed-off-by: Sumit Garg <su...@linaro.org>
---
examples/acipher-rs/ta/build.rs | 4 ++--
examples/aes-rs/ta/build.rs | 4 ++--
examples/authentication-rs/ta/build.rs | 4 ++--
examples/big_int-rs/ta/build.rs | 4 ++--
examples/diffie_hellman-rs/ta/build.rs | 4 ++--
examples/digest-rs/ta/build.rs | 4 ++--
examples/hello_world-rs/ta/build.rs | 4 ++--
examples/hotp-rs/ta/build.rs | 4 ++--
examples/random-rs/ta/build.rs | 4 ++--
examples/secure_storage-rs/ta/build.rs | 4 ++--
examples/signature_verification-rs/ta/build.rs | 4 ++--
examples/supp_plugin-rs/ta/build.rs | 4 ++--
examples/time-rs/ta/build.rs | 4 ++--
13 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/examples/acipher-rs/ta/build.rs b/examples/acipher-rs/ta/build.rs
index 2143714..19aae62 100644
--- a/examples/acipher-rs/ta/build.rs
+++ b/examples/acipher-rs/ta/build.rs
@@ -51,8 +51,8 @@ fn main() -> std::io::Result<()> {
let f = File::open(optee_os_path.join("src/ta.ld.S"))?;
let f = BufReader::new(f);
- match env::var("ARCH") {
- Ok(ref v) if v == "arm" => {
+ match env::var("TARGET") {
+ Ok(ref v) if v == "arm-unknown-linux-gnueabihf" => {
println!("cargo:rustc-link-arg=--no-warn-mismatch");
for line in f.lines() {
let l = line?;
diff --git a/examples/aes-rs/ta/build.rs b/examples/aes-rs/ta/build.rs
index 2143714..19aae62 100644
--- a/examples/aes-rs/ta/build.rs
+++ b/examples/aes-rs/ta/build.rs
@@ -51,8 +51,8 @@ fn main() -> std::io::Result<()> {
let f = File::open(optee_os_path.join("src/ta.ld.S"))?;
let f = BufReader::new(f);
- match env::var("ARCH") {
- Ok(ref v) if v == "arm" => {
+ match env::var("TARGET") {
+ Ok(ref v) if v == "arm-unknown-linux-gnueabihf" => {
println!("cargo:rustc-link-arg=--no-warn-mismatch");
for line in f.lines() {
let l = line?;
diff --git a/examples/authentication-rs/ta/build.rs b/examples/authentication-rs/ta/build.rs
index 2143714..19aae62 100644
--- a/examples/authentication-rs/ta/build.rs
+++ b/examples/authentication-rs/ta/build.rs
@@ -51,8 +51,8 @@ fn main() -> std::io::Result<()> {
let f = File::open(optee_os_path.join("src/ta.ld.S"))?;
let f = BufReader::new(f);
- match env::var("ARCH") {
- Ok(ref v) if v == "arm" => {
+ match env::var("TARGET") {
+ Ok(ref v) if v == "arm-unknown-linux-gnueabihf" => {
println!("cargo:rustc-link-arg=--no-warn-mismatch");
for line in f.lines() {
let l = line?;
diff --git a/examples/big_int-rs/ta/build.rs b/examples/big_int-rs/ta/build.rs
index 2143714..19aae62 100644
--- a/examples/big_int-rs/ta/build.rs
+++ b/examples/big_int-rs/ta/build.rs
@@ -51,8 +51,8 @@ fn main() -> std::io::Result<()> {
let f = File::open(optee_os_path.join("src/ta.ld.S"))?;
let f = BufReader::new(f);
- match env::var("ARCH") {
- Ok(ref v) if v == "arm" => {
+ match env::var("TARGET") {
+ Ok(ref v) if v == "arm-unknown-linux-gnueabihf" => {
println!("cargo:rustc-link-arg=--no-warn-mismatch");
for line in f.lines() {
let l = line?;
diff --git a/examples/diffie_hellman-rs/ta/build.rs b/examples/diffie_hellman-rs/ta/build.rs
index 2143714..19aae62 100644
--- a/examples/diffie_hellman-rs/ta/build.rs
+++ b/examples/diffie_hellman-rs/ta/build.rs
@@ -51,8 +51,8 @@ fn main() -> std::io::Result<()> {
let f = File::open(optee_os_path.join("src/ta.ld.S"))?;
let f = BufReader::new(f);
- match env::var("ARCH") {
- Ok(ref v) if v == "arm" => {
+ match env::var("TARGET") {
+ Ok(ref v) if v == "arm-unknown-linux-gnueabihf" => {
println!("cargo:rustc-link-arg=--no-warn-mismatch");
for line in f.lines() {
let l = line?;
diff --git a/examples/digest-rs/ta/build.rs b/examples/digest-rs/ta/build.rs
index 2143714..19aae62 100644
--- a/examples/digest-rs/ta/build.rs
+++ b/examples/digest-rs/ta/build.rs
@@ -51,8 +51,8 @@ fn main() -> std::io::Result<()> {
let f = File::open(optee_os_path.join("src/ta.ld.S"))?;
let f = BufReader::new(f);
- match env::var("ARCH") {
- Ok(ref v) if v == "arm" => {
+ match env::var("TARGET") {
+ Ok(ref v) if v == "arm-unknown-linux-gnueabihf" => {
println!("cargo:rustc-link-arg=--no-warn-mismatch");
for line in f.lines() {
let l = line?;
diff --git a/examples/hello_world-rs/ta/build.rs b/examples/hello_world-rs/ta/build.rs
index 2143714..19aae62 100644
--- a/examples/hello_world-rs/ta/build.rs
+++ b/examples/hello_world-rs/ta/build.rs
@@ -51,8 +51,8 @@ fn main() -> std::io::Result<()> {
let f = File::open(optee_os_path.join("src/ta.ld.S"))?;
let f = BufReader::new(f);
- match env::var("ARCH") {
- Ok(ref v) if v == "arm" => {
+ match env::var("TARGET") {
+ Ok(ref v) if v == "arm-unknown-linux-gnueabihf" => {
println!("cargo:rustc-link-arg=--no-warn-mismatch");
for line in f.lines() {
let l = line?;
diff --git a/examples/hotp-rs/ta/build.rs b/examples/hotp-rs/ta/build.rs
index 2143714..19aae62 100644
--- a/examples/hotp-rs/ta/build.rs
+++ b/examples/hotp-rs/ta/build.rs
@@ -51,8 +51,8 @@ fn main() -> std::io::Result<()> {
let f = File::open(optee_os_path.join("src/ta.ld.S"))?;
let f = BufReader::new(f);
- match env::var("ARCH") {
- Ok(ref v) if v == "arm" => {
+ match env::var("TARGET") {
+ Ok(ref v) if v == "arm-unknown-linux-gnueabihf" => {
println!("cargo:rustc-link-arg=--no-warn-mismatch");
for line in f.lines() {
let l = line?;
diff --git a/examples/random-rs/ta/build.rs b/examples/random-rs/ta/build.rs
index 2143714..19aae62 100644
--- a/examples/random-rs/ta/build.rs
+++ b/examples/random-rs/ta/build.rs
@@ -51,8 +51,8 @@ fn main() -> std::io::Result<()> {
let f = File::open(optee_os_path.join("src/ta.ld.S"))?;
let f = BufReader::new(f);
- match env::var("ARCH") {
- Ok(ref v) if v == "arm" => {
+ match env::var("TARGET") {
+ Ok(ref v) if v == "arm-unknown-linux-gnueabihf" => {
println!("cargo:rustc-link-arg=--no-warn-mismatch");
for line in f.lines() {
let l = line?;
diff --git a/examples/secure_storage-rs/ta/build.rs b/examples/secure_storage-rs/ta/build.rs
index 2143714..19aae62 100644
--- a/examples/secure_storage-rs/ta/build.rs
+++ b/examples/secure_storage-rs/ta/build.rs
@@ -51,8 +51,8 @@ fn main() -> std::io::Result<()> {
let f = File::open(optee_os_path.join("src/ta.ld.S"))?;
let f = BufReader::new(f);
- match env::var("ARCH") {
- Ok(ref v) if v == "arm" => {
+ match env::var("TARGET") {
+ Ok(ref v) if v == "arm-unknown-linux-gnueabihf" => {
println!("cargo:rustc-link-arg=--no-warn-mismatch");
for line in f.lines() {
let l = line?;
diff --git a/examples/signature_verification-rs/ta/build.rs b/examples/signature_verification-rs/ta/build.rs
index 2143714..19aae62 100644
--- a/examples/signature_verification-rs/ta/build.rs
+++ b/examples/signature_verification-rs/ta/build.rs
@@ -51,8 +51,8 @@ fn main() -> std::io::Result<()> {
let f = File::open(optee_os_path.join("src/ta.ld.S"))?;
let f = BufReader::new(f);
- match env::var("ARCH") {
- Ok(ref v) if v == "arm" => {
+ match env::var("TARGET") {
+ Ok(ref v) if v == "arm-unknown-linux-gnueabihf" => {
println!("cargo:rustc-link-arg=--no-warn-mismatch");
for line in f.lines() {
let l = line?;
diff --git a/examples/supp_plugin-rs/ta/build.rs b/examples/supp_plugin-rs/ta/build.rs
index 306c0b5..12d8660 100644
--- a/examples/supp_plugin-rs/ta/build.rs
+++ b/examples/supp_plugin-rs/ta/build.rs
@@ -51,8 +51,8 @@ fn main() -> std::io::Result<()> {
let f = File::open(optee_os_path.join("src/ta.ld.S"))?;
let f = BufReader::new(f);
- match env::var("ARCH") {
- Ok(ref v) if v == "arm" => {
+ match env::var("TARGET") {
+ Ok(ref v) if v == "arm-unknown-linux-gnueabihf" => {
println!("cargo:rustc-link-arg=--no-warn-mismatch");
for line in f.lines() {
let l = line?;
diff --git a/examples/time-rs/ta/build.rs b/examples/time-rs/ta/build.rs
index 2143714..19aae62 100644
--- a/examples/time-rs/ta/build.rs
+++ b/examples/time-rs/ta/build.rs
@@ -51,8 +51,8 @@ fn main() -> std::io::Result<()> {
let f = File::open(optee_os_path.join("src/ta.ld.S"))?;
let f = BufReader::new(f);
- match env::var("ARCH") {
- Ok(ref v) if v == "arm" => {
+ match env::var("TARGET") {
+ Ok(ref v) if v == "arm-unknown-linux-gnueabihf" => {
println!("cargo:rustc-link-arg=--no-warn-mismatch");
for line in f.lines() {
let l = line?;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@teaclave.apache.org
For additional commands, e-mail: commits-help@teaclave.apache.org