From 0c961a51248fc02c6a0bb3691a707495805025a5 Mon Sep 17 00:00:00 2001 From: Andrey Zhizhikin Date: Mon, 31 Aug 2020 08:30:50 +0000 Subject: optee-imx: upgrade to version 3.7.0 Update all recipes to pull sources from imx_5.4.24_2.1.0 branch in NXP upstream and update SRCREV to match release tags. Update PREFERRED_VERSION of optee for mx8 to point to 3.7.0.imx. Following notes are additions to the version update of recipes: -------------------------- optee-os: - Refresh gcc10 patch to resolve the fuzz during apply - Drop python patch as it is already applied upstream - Add new machines to the list optee-client: - Update CFLAGS patch to match 3.7.0 version - Split ${B} from ${S}, this makes build more clear optee-test: - Remove do_compile task and substitute with OEMAKE Signed-off-by: Andrey Zhizhikin --- ...x-gcc10-compilation-issue-and-missing-cc-.patch | 36 +- ...001-scripts-update-scripts-to-use-python3.patch | 427 --------------------- 2 files changed, 20 insertions(+), 443 deletions(-) delete mode 100644 recipes-security/optee-imx/optee-os/0001-scripts-update-scripts-to-use-python3.patch (limited to 'recipes-security/optee-imx/optee-os') diff --git a/recipes-security/optee-imx/optee-os/0001-optee-os-fix-gcc10-compilation-issue-and-missing-cc-.patch b/recipes-security/optee-imx/optee-os/0001-optee-os-fix-gcc10-compilation-issue-and-missing-cc-.patch index 509c7fb6..ab42d340 100644 --- a/recipes-security/optee-imx/optee-os/0001-optee-os-fix-gcc10-compilation-issue-and-missing-cc-.patch +++ b/recipes-security/optee-imx/optee-os/0001-optee-os-fix-gcc10-compilation-issue-and-missing-cc-.patch @@ -1,4 +1,4 @@ -From 027a3b9a33fbb23e1d1d7ed6411d4d112d2a55a1 Mon Sep 17 00:00:00 2001 +From 109ed8d9a5351c7bb0fdc0953c7e7fb6cedcad9c Mon Sep 17 00:00:00 2001 From: Andrey Zhizhikin Date: Sat, 30 May 2020 22:00:59 +0000 Subject: [PATCH] optee-os: fix gcc10 compilation issue and missing cc-options @@ -14,17 +14,17 @@ Upstream-Status: Backport [https://github.com/OP-TEE/optee_os/pull/3891] Signed-off-by: Andrey Zhizhikin --- - core/arch/arm/arm.mk | 21 ++++++++++++++++----- + core/arch/arm/arm.mk | 22 +++++++++++++++++----- core/core.mk | 5 +---- mk/cc-option.mk | 9 +++++++++ mk/gcc.mk | 2 +- ta/mk/ta_dev_kit.mk | 3 +++ ta/ta.mk | 1 + - 6 files changed, 31 insertions(+), 10 deletions(-) + 6 files changed, 32 insertions(+), 10 deletions(-) create mode 100644 mk/cc-option.mk diff --git a/core/arch/arm/arm.mk b/core/arch/arm/arm.mk -index aa101be8..4123d85d 100644 +index 5defb327..fffa491a 100644 --- a/core/arch/arm/arm.mk +++ b/core/arch/arm/arm.mk @@ -1,3 +1,16 @@ @@ -44,7 +44,7 @@ index aa101be8..4123d85d 100644 CFG_LTC_OPTEE_THREAD ?= y # Size of emulated TrustZone protected SRAM, 448 kB. # Only applicable when paging is enabled. -@@ -88,7 +101,7 @@ arm32-platform-aflags-no-hard-float ?= +@@ -106,7 +119,7 @@ arm32-platform-aflags-no-hard-float ?= arm64-platform-cflags-no-hard-float ?= -mgeneral-regs-only arm64-platform-cflags-hard-float ?= @@ -53,7 +53,7 @@ index aa101be8..4123d85d 100644 ifeq ($(DEBUG),1) # For backwards compatibility -@@ -117,14 +130,12 @@ core-platform-aflags += $(platform-aflags-generic) +@@ -135,14 +148,12 @@ core-platform-aflags += $(platform-aflags-generic) core-platform-aflags += $(platform-aflags-debug-info) ifeq ($(CFG_ARM64_core),y) @@ -68,16 +68,20 @@ index aa101be8..4123d85d 100644 core-platform-cppflags += $(arm32-platform-cppflags) core-platform-cflags += $(arm32-platform-cflags) core-platform-cflags += $(arm32-platform-cflags-no-hard-float) -@@ -196,5 +207,5 @@ ta-mk-file-export-add-ta_arm64 += CROSS_COMPILE64 ?= $$(CROSS_COMPILE)_nl_ - ta-mk-file-export-add-ta_arm64 += CROSS_COMPILE_ta_arm64 ?= $$(CROSS_COMPILE64)_nl_ +@@ -241,8 +252,9 @@ ta-mk-file-export-add-ta_arm64 += COMPILER ?= gcc_nl_ + ta-mk-file-export-add-ta_arm64 += COMPILER_ta_arm64 ?= $$(COMPILER)_nl_ endif -# Set cross compiler prefix for each submodule -$(foreach sm, core $(ta-targets), $(eval CROSS_COMPILE_$(sm) ?= $(CROSS_COMPILE$(arch-bits-$(sm))))) +# Set cross compiler prefix for each TA target +$(foreach sm, $(ta-targets), $(eval CROSS_COMPILE_$(sm) ?= $(CROSS_COMPILE$(arch-bits-$(sm))))) ++ + + arm32-sysreg-txt = core/arch/arm/kernel/arm32_sysreg.txt + arm32-sysregs-$(arm32-sysreg-txt)-h := arm32_sysreg.h diff --git a/core/core.mk b/core/core.mk -index c05815f3..68f45552 100644 +index a51cf847..28c7235c 100644 --- a/core/core.mk +++ b/core/core.mk @@ -8,6 +8,7 @@ arch-dir := core/arch/$(ARCH) @@ -89,7 +93,7 @@ index c05815f3..68f45552 100644 PLATFORM_$(PLATFORM) := y @@ -16,10 +17,6 @@ PLATFORM_FLAVOR_$(PLATFORM_FLAVOR) := y - $(call cfg-depends-all,CFG_PAGED_USER_TA,CFG_WITH_PAGER CFG_WITH_USER_TA) + $(eval $(call cfg-depends-all,CFG_PAGED_USER_TA,CFG_WITH_PAGER CFG_WITH_USER_TA)) include core/crypto.mk -# Setup compiler for this sub module @@ -128,10 +132,10 @@ index 1f2c5990..c53a23b1 100644 # Define these to something to discover accidental use diff --git a/ta/mk/ta_dev_kit.mk b/ta/mk/ta_dev_kit.mk -index fa0bddfe..ae70ef87 100644 +index 04a4f94b..e4b02ea7 100644 --- a/ta/mk/ta_dev_kit.mk +++ b/ta/mk/ta_dev_kit.mk -@@ -78,6 +78,9 @@ clean: +@@ -92,6 +92,9 @@ clean: @$(cmd-echo-silent) ' CLEAN $(O)' ${q}if [ -d "$(O)" ]; then $(RMDIR) $(O); fi @@ -139,16 +143,16 @@ index fa0bddfe..ae70ef87 100644 +include $(ta-dev-kit-dir$(sm))/mk/cc-option.mk + subdirs = . - include $(ta-dev-kit-dir)/mk/subdir.mk + include $(ta-dev-kit-dir$(sm))/mk/subdir.mk diff --git a/ta/ta.mk b/ta/ta.mk -index 32353de3..9c64319d 100644 +index dde7be67..ca17054a 100644 --- a/ta/ta.mk +++ b/ta/ta.mk -@@ -98,6 +98,7 @@ $(foreach f, $(libfiles), \ +@@ -157,6 +157,7 @@ $(foreach f, $(libfiles), \ # Copy .mk files - ta-mkfiles = mk/compile.mk mk/subdir.mk mk/gcc.mk mk/cleandirs.mk \ + ta-mkfiles = mk/compile.mk mk/subdir.mk mk/gcc.mk mk/clang.mk mk/cleandirs.mk \ + mk/cc-option.mk \ ta/arch/$(ARCH)/link.mk ta/arch/$(ARCH)/link_shlib.mk \ ta/mk/ta_dev_kit.mk diff --git a/recipes-security/optee-imx/optee-os/0001-scripts-update-scripts-to-use-python3.patch b/recipes-security/optee-imx/optee-os/0001-scripts-update-scripts-to-use-python3.patch deleted file mode 100644 index 9621cf6c..00000000 --- a/recipes-security/optee-imx/optee-os/0001-scripts-update-scripts-to-use-python3.patch +++ /dev/null @@ -1,427 +0,0 @@ -From 0d4941123b5a88351f5954f6de00892f85ed5abc Mon Sep 17 00:00:00 2001 -From: Andrey Zhizhikin -Date: Mon, 20 Jan 2020 22:32:13 +0000 -Subject: [PATCH] scripts: update scripts to use python3 - -Python2 is deprecated effective Jan. 2020, and is not available in -several distributions. - -Update scripts here to re-target then onto python version 3. - -Upstream-Status: Pending - -Signed-off-by: Andrey Zhizhikin ---- - scripts/gen_hashed_bin.py | 282 ++++++++++++++++++++------------------ - scripts/gen_ld_sects.py | 8 +- - scripts/pem_to_pub_c.py | 2 +- - scripts/sign.py | 2 +- - scripts/symbolize.py | 2 +- - scripts/ta_bin_to_c.py | 2 +- - scripts/tee_bin_parser.py | 2 +- - 7 files changed, 157 insertions(+), 143 deletions(-) - -diff --git a/scripts/gen_hashed_bin.py b/scripts/gen_hashed_bin.py -index 32350a47..a76a62cc 100755 ---- a/scripts/gen_hashed_bin.py -+++ b/scripts/gen_hashed_bin.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - # SPDX-License-Identifier: BSD-2-Clause - # - # Copyright (c) 2014-2017, Linaro Limited -@@ -14,163 +14,177 @@ import hashlib - arch_id = {'arm32': 0, 'arm64': 1} - image_id = {'pager': 0, 'paged': 1} - -+ - def write_header_v1(outf, init_size, args, paged_size): -- magic = 0x4554504f # 'OPTE' -- version = 1; -- outf.write(struct.pack(' [...]".format( \ -- sys.argv[0]) -+ print("Usage: {0}
[...]".format( \ -+ sys.argv[0])) - sys.exit (1) - - def main(): -@@ -55,7 +55,7 @@ def main(): - if sect_name in skip_sections : - continue - -- print '\t*({0})'.format(sect_name) -+ print ('\t*({0})'.format(sect_name)) - - if __name__ == "__main__": - main() -diff --git a/scripts/pem_to_pub_c.py b/scripts/pem_to_pub_c.py -index 6b8fa365..0b03d62e 100755 ---- a/scripts/pem_to_pub_c.py -+++ b/scripts/pem_to_pub_c.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - # SPDX-License-Identifier: BSD-2-Clause - # - # Copyright (c) 2015, Linaro Limited -diff --git a/scripts/sign.py b/scripts/sign.py -index ad47479b..348b40a2 100755 ---- a/scripts/sign.py -+++ b/scripts/sign.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - # - # Copyright (c) 2015, 2017, Linaro Limited - # -diff --git a/scripts/symbolize.py b/scripts/symbolize.py -index 1eecf758..0e9bd3ed 100755 ---- a/scripts/symbolize.py -+++ b/scripts/symbolize.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - # SPDX-License-Identifier: BSD-2-Clause - # - # Copyright (c) 2017, Linaro Limited -diff --git a/scripts/ta_bin_to_c.py b/scripts/ta_bin_to_c.py -index cabddbbd..f325fda0 100755 ---- a/scripts/ta_bin_to_c.py -+++ b/scripts/ta_bin_to_c.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - # SPDX-License-Identifier: BSD-2-Clause - # - # Copyright (c) 2017, Linaro Limited -diff --git a/scripts/tee_bin_parser.py b/scripts/tee_bin_parser.py -index 5f7dd3f0..07da5791 100755 ---- a/scripts/tee_bin_parser.py -+++ b/scripts/tee_bin_parser.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - # SPDX-License-Identifier: BSD-2-Clause - # - # Copyright (c) 2016, Linaro Limited --- -2.17.1 - -- cgit v1.2.3-54-g00ecf