diff options
| author | Tom Hochstein <tom.hochstein@nxp.com> | 2021-03-16 07:43:20 -0500 |
|---|---|---|
| committer | Otavio Salvador <otavio@ossystems.com.br> | 2021-03-16 17:59:36 -0300 |
| commit | be6a39f2faf605330a0ae9a33430e1112ac4d3f5 (patch) | |
| tree | 09d4708a0429b8fdecfca792f4af6add4c8467fb /recipes-security/optee-imx/optee-os | |
| parent | 1d2f65637442c1f52967001e539c5d44c1ba74cd (diff) | |
| download | meta-freescale-be6a39f2faf605330a0ae9a33430e1112ac4d3f5.tar.gz | |
optee-imx: Upgrade to 3.10.0
Update all recipes to pull sources from imx_5.4.70_2.3.0 branch in NXP
upstream and update SRCREV to match release tags.
Update PREFERRED_VERSION of optee for mx8 to point to 3.10.0.imx.
Following notes are additions to the version update of recipes:
--------------------------
optee-client:
- Drop CFLAGS patch as it is already applied upstream
optee-os:
- Drop gcc10 patch as it is already applied upstream
- Add dependency on python3-pycryptodomex-native
- Drop NOWERROR flag as package is reworked to disable warnings by default
- Rework mkimage load address since tee-init_load_addr.txt is no longer created
optee-test:
- Drop python3 patch as it is already applied upstream
- Remove unused patch files from layer
- Add dependency on python3-pycryptodomex-native
- Add sysroot to C and C++ flags
Fixes #686, fixes #689.
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Diffstat (limited to 'recipes-security/optee-imx/optee-os')
| -rw-r--r-- | recipes-security/optee-imx/optee-os/0001-optee-os-fix-gcc10-compilation-issue-and-missing-cc-.patch | 162 |
1 files changed, 0 insertions, 162 deletions
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 deleted file mode 100644 index ab42d3408..000000000 --- a/recipes-security/optee-imx/optee-os/0001-optee-os-fix-gcc10-compilation-issue-and-missing-cc-.patch +++ /dev/null | |||
| @@ -1,162 +0,0 @@ | |||
| 1 | From 109ed8d9a5351c7bb0fdc0953c7e7fb6cedcad9c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Andrey Zhizhikin <andrey.z@gmail.com> | ||
| 3 | Date: Sat, 30 May 2020 22:00:59 +0000 | ||
| 4 | Subject: [PATCH] optee-os: fix gcc10 compilation issue and missing cc-options | ||
| 5 | |||
| 6 | Backport PR 3891 from upstream to imx fork, which addressed compilation | ||
| 7 | failure when GCC10 is used. | ||
| 8 | |||
| 9 | Additional changes ported fixed cc-options macro, which allows to query | ||
| 10 | compiler used if the desired option exists before it could be set. This | ||
| 11 | solves also the build issues when GCC9 is used to build this component. | ||
| 12 | |||
| 13 | Upstream-Status: Backport [https://github.com/OP-TEE/optee_os/pull/3891] | ||
| 14 | |||
| 15 | Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com> | ||
| 16 | --- | ||
| 17 | core/arch/arm/arm.mk | 22 +++++++++++++++++----- | ||
| 18 | core/core.mk | 5 +---- | ||
| 19 | mk/cc-option.mk | 9 +++++++++ | ||
| 20 | mk/gcc.mk | 2 +- | ||
| 21 | ta/mk/ta_dev_kit.mk | 3 +++ | ||
| 22 | ta/ta.mk | 1 + | ||
| 23 | 6 files changed, 32 insertions(+), 10 deletions(-) | ||
| 24 | create mode 100644 mk/cc-option.mk | ||
| 25 | |||
| 26 | diff --git a/core/arch/arm/arm.mk b/core/arch/arm/arm.mk | ||
| 27 | index 5defb327..fffa491a 100644 | ||
| 28 | --- a/core/arch/arm/arm.mk | ||
| 29 | +++ b/core/arch/arm/arm.mk | ||
| 30 | @@ -1,3 +1,16 @@ | ||
| 31 | +# Setup compiler for the core module | ||
| 32 | +ifeq ($(CFG_ARM64_core),y) | ||
| 33 | +arch-bits-core := 64 | ||
| 34 | +else | ||
| 35 | +arch-bits-core := 32 | ||
| 36 | +endif | ||
| 37 | +CROSS_COMPILE_core := $(CROSS_COMPILE$(arch-bits-core)) | ||
| 38 | +COMPILER_core := $(COMPILER) | ||
| 39 | +include mk/$(COMPILER_core).mk | ||
| 40 | + | ||
| 41 | +# Defines the cc-option macro using the compiler set for the core module | ||
| 42 | +include mk/cc-option.mk | ||
| 43 | + | ||
| 44 | CFG_LTC_OPTEE_THREAD ?= y | ||
| 45 | # Size of emulated TrustZone protected SRAM, 448 kB. | ||
| 46 | # Only applicable when paging is enabled. | ||
| 47 | @@ -106,7 +119,7 @@ arm32-platform-aflags-no-hard-float ?= | ||
| 48 | |||
| 49 | arm64-platform-cflags-no-hard-float ?= -mgeneral-regs-only | ||
| 50 | arm64-platform-cflags-hard-float ?= | ||
| 51 | -arm64-platform-cflags-generic ?= -mstrict-align | ||
| 52 | +arm64-platform-cflags-generic := -mstrict-align $(call cc-option,-mno-outline-atomics,) | ||
| 53 | |||
| 54 | ifeq ($(DEBUG),1) | ||
| 55 | # For backwards compatibility | ||
| 56 | @@ -135,14 +148,12 @@ core-platform-aflags += $(platform-aflags-generic) | ||
| 57 | core-platform-aflags += $(platform-aflags-debug-info) | ||
| 58 | |||
| 59 | ifeq ($(CFG_ARM64_core),y) | ||
| 60 | -arch-bits-core := 64 | ||
| 61 | core-platform-cppflags += $(arm64-platform-cppflags) | ||
| 62 | core-platform-cflags += $(arm64-platform-cflags) | ||
| 63 | core-platform-cflags += $(arm64-platform-cflags-generic) | ||
| 64 | core-platform-cflags += $(arm64-platform-cflags-no-hard-float) | ||
| 65 | core-platform-aflags += $(arm64-platform-aflags) | ||
| 66 | else | ||
| 67 | -arch-bits-core := 32 | ||
| 68 | core-platform-cppflags += $(arm32-platform-cppflags) | ||
| 69 | core-platform-cflags += $(arm32-platform-cflags) | ||
| 70 | core-platform-cflags += $(arm32-platform-cflags-no-hard-float) | ||
| 71 | @@ -241,8 +252,9 @@ ta-mk-file-export-add-ta_arm64 += COMPILER ?= gcc_nl_ | ||
| 72 | ta-mk-file-export-add-ta_arm64 += COMPILER_ta_arm64 ?= $$(COMPILER)_nl_ | ||
| 73 | endif | ||
| 74 | |||
| 75 | -# Set cross compiler prefix for each submodule | ||
| 76 | -$(foreach sm, core $(ta-targets), $(eval CROSS_COMPILE_$(sm) ?= $(CROSS_COMPILE$(arch-bits-$(sm))))) | ||
| 77 | +# Set cross compiler prefix for each TA target | ||
| 78 | +$(foreach sm, $(ta-targets), $(eval CROSS_COMPILE_$(sm) ?= $(CROSS_COMPILE$(arch-bits-$(sm))))) | ||
| 79 | + | ||
| 80 | |||
| 81 | arm32-sysreg-txt = core/arch/arm/kernel/arm32_sysreg.txt | ||
| 82 | arm32-sysregs-$(arm32-sysreg-txt)-h := arm32_sysreg.h | ||
| 83 | diff --git a/core/core.mk b/core/core.mk | ||
| 84 | index a51cf847..28c7235c 100644 | ||
| 85 | --- a/core/core.mk | ||
| 86 | +++ b/core/core.mk | ||
| 87 | @@ -8,6 +8,7 @@ arch-dir := core/arch/$(ARCH) | ||
| 88 | platform-dir := $(arch-dir)/plat-$(PLATFORM) | ||
| 89 | include $(platform-dir)/conf.mk | ||
| 90 | include mk/config.mk | ||
| 91 | +# $(ARCH).mk also sets the compiler for the core module | ||
| 92 | include core/arch/$(ARCH)/$(ARCH).mk | ||
| 93 | |||
| 94 | PLATFORM_$(PLATFORM) := y | ||
| 95 | @@ -16,10 +17,6 @@ PLATFORM_FLAVOR_$(PLATFORM_FLAVOR) := y | ||
| 96 | $(eval $(call cfg-depends-all,CFG_PAGED_USER_TA,CFG_WITH_PAGER CFG_WITH_USER_TA)) | ||
| 97 | include core/crypto.mk | ||
| 98 | |||
| 99 | -# Setup compiler for this sub module | ||
| 100 | -COMPILER_$(sm) ?= $(COMPILER) | ||
| 101 | -include mk/$(COMPILER_$(sm)).mk | ||
| 102 | - | ||
| 103 | cppflags$(sm) += -D__KERNEL__ | ||
| 104 | |||
| 105 | cppflags$(sm) += -Icore/include | ||
| 106 | diff --git a/mk/cc-option.mk b/mk/cc-option.mk | ||
| 107 | new file mode 100644 | ||
| 108 | index 00000000..4699fbcc | ||
| 109 | --- /dev/null | ||
| 110 | +++ b/mk/cc-option.mk | ||
| 111 | @@ -0,0 +1,9 @@ | ||
| 112 | +_cc-option-supported = $(if $(shell $(CC$(sm)) $(1) -c -x c /dev/null -o /dev/null 2>/dev/null >/dev/null || echo "Not supported"),,1) | ||
| 113 | +_cc-opt-cached-var-name = $(subst =,~,$(strip cached-cc-option-$(1)-$(subst $(empty) $(empty),,$(CC$(sm))))) | ||
| 114 | +define _cc-option | ||
| 115 | +$(eval _var_name := $(call _cc-opt-cached-var-name,$(1))) | ||
| 116 | +$(eval $(_var_name) := $(if $(filter $(origin $(_var_name)),undefined),$(call _cc-option-supported,$(1)),$($(_var_name)))) | ||
| 117 | +$(if $($(_var_name)),$(1),$(2)) | ||
| 118 | +endef | ||
| 119 | +cc-option = $(strip $(call _cc-option,$(1),$(2))) | ||
| 120 | + | ||
| 121 | diff --git a/mk/gcc.mk b/mk/gcc.mk | ||
| 122 | index 1f2c5990..c53a23b1 100644 | ||
| 123 | --- a/mk/gcc.mk | ||
| 124 | +++ b/mk/gcc.mk | ||
| 125 | @@ -12,7 +12,7 @@ nostdinc$(sm) := -nostdinc -isystem $(shell $(CC$(sm)) \ | ||
| 126 | -print-file-name=include 2> /dev/null) | ||
| 127 | |||
| 128 | # Get location of libgcc from gcc | ||
| 129 | -libgcc$(sm) := $(shell $(CC$(sm)) $(CFLAGS$(arch-bits-$(sm))) $(comp-cflags$(sm)) \ | ||
| 130 | +libgcc$(sm) := $(shell $(CC$(sm)) $(CFLAGS$(arch-bits-$(sm))) \ | ||
| 131 | -print-libgcc-file-name 2> /dev/null) | ||
| 132 | |||
| 133 | # Define these to something to discover accidental use | ||
| 134 | diff --git a/ta/mk/ta_dev_kit.mk b/ta/mk/ta_dev_kit.mk | ||
| 135 | index 04a4f94b..e4b02ea7 100644 | ||
| 136 | --- a/ta/mk/ta_dev_kit.mk | ||
| 137 | +++ b/ta/mk/ta_dev_kit.mk | ||
| 138 | @@ -92,6 +92,9 @@ clean: | ||
| 139 | @$(cmd-echo-silent) ' CLEAN $(O)' | ||
| 140 | ${q}if [ -d "$(O)" ]; then $(RMDIR) $(O); fi | ||
| 141 | |||
| 142 | +include $(ta-dev-kit-dir$(sm))/mk/$(COMPILER_$(sm)).mk | ||
| 143 | +include $(ta-dev-kit-dir$(sm))/mk/cc-option.mk | ||
| 144 | + | ||
| 145 | subdirs = . | ||
| 146 | include $(ta-dev-kit-dir$(sm))/mk/subdir.mk | ||
| 147 | |||
| 148 | diff --git a/ta/ta.mk b/ta/ta.mk | ||
| 149 | index dde7be67..ca17054a 100644 | ||
| 150 | --- a/ta/ta.mk | ||
| 151 | +++ b/ta/ta.mk | ||
| 152 | @@ -157,6 +157,7 @@ $(foreach f, $(libfiles), \ | ||
| 153 | |||
| 154 | # Copy .mk files | ||
| 155 | ta-mkfiles = mk/compile.mk mk/subdir.mk mk/gcc.mk mk/clang.mk mk/cleandirs.mk \ | ||
| 156 | + mk/cc-option.mk \ | ||
| 157 | ta/arch/$(ARCH)/link.mk ta/arch/$(ARCH)/link_shlib.mk \ | ||
| 158 | ta/mk/ta_dev_kit.mk | ||
| 159 | |||
| 160 | -- | ||
| 161 | 2.17.1 | ||
| 162 | |||
