diff options
-rw-r--r-- | conf/machine/include/imx-base.inc | 6 | ||||
-rw-r--r-- | recipes-security/optee-imx/optee-client_3.19.0.imx.bb (renamed from recipes-security/optee-imx/optee-client_3.17.0.imx.bb) | 8 | ||||
-rw-r--r-- | recipes-security/optee-imx/optee-os/0008-no-warn-rwx-segments.patch | 64 | ||||
-rw-r--r-- | recipes-security/optee-imx/optee-os_3.19.0.imx.bb (renamed from recipes-security/optee-imx/optee-os_3.17.0.imx.bb) | 27 | ||||
-rw-r--r-- | recipes-security/optee-imx/optee-test_3.19.0.imx.bb (renamed from recipes-security/optee-imx/optee-test_3.17.0.imx.bb) | 4 |
5 files changed, 21 insertions, 88 deletions
diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc index de695d78..718f6b30 100644 --- a/conf/machine/include/imx-base.inc +++ b/conf/machine/include/imx-base.inc | |||
@@ -500,9 +500,9 @@ PREFERRED_VERSION_vulkan-loader:imxvulkan ??= "1.2.182.0" | |||
500 | PREFERRED_VERSION_vulkan-tools:imxvulkan ??= "1.2.182.0" | 500 | PREFERRED_VERSION_vulkan-tools:imxvulkan ??= "1.2.182.0" |
501 | 501 | ||
502 | # Use i.MX optee Version | 502 | # Use i.MX optee Version |
503 | PREFERRED_VERSION_optee-os:mx8-nxp-bsp ??= "3.17.0.imx" | 503 | PREFERRED_VERSION_optee-os:mx8-nxp-bsp ??= "3.19.0.imx" |
504 | PREFERRED_VERSION_optee-client:mx8-nxp-bsp ??= "3.17.0.imx" | 504 | PREFERRED_VERSION_optee-client:mx8-nxp-bsp ??= "3.19.0.imx" |
505 | PREFERRED_VERSION_optee-test:mx8-nxp-bsp ??= "3.17.0.imx" | 505 | PREFERRED_VERSION_optee-test:mx8-nxp-bsp ??= "3.19.0.imx" |
506 | 506 | ||
507 | #Use i.MX opencv Version for mx8 | 507 | #Use i.MX opencv Version for mx8 |
508 | PREFERRED_VERSION_opencv:mx8-nxp-bsp ??= "4.6.0.imx" | 508 | PREFERRED_VERSION_opencv:mx8-nxp-bsp ??= "4.6.0.imx" |
diff --git a/recipes-security/optee-imx/optee-client_3.17.0.imx.bb b/recipes-security/optee-imx/optee-client_3.19.0.imx.bb index 6f0435fe..b0fb9178 100644 --- a/recipes-security/optee-imx/optee-client_3.17.0.imx.bb +++ b/recipes-security/optee-imx/optee-client_3.19.0.imx.bb | |||
@@ -8,13 +8,15 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b" | |||
8 | SRC_URI = " \ | 8 | SRC_URI = " \ |
9 | git://github.com/nxp-imx/imx-optee-client.git;protocol=https;branch=${SRCBRANCH} \ | 9 | git://github.com/nxp-imx/imx-optee-client.git;protocol=https;branch=${SRCBRANCH} \ |
10 | file://tee-supplicant.service" | 10 | file://tee-supplicant.service" |
11 | SRCBRANCH = "lf-5.15.52_2.1.0" | 11 | SRCBRANCH = "lf-5.15.71_2.2.0" |
12 | SRCREV = "9d8f1903bbea3a1e631c8d26ee51c37020569312" | 12 | SRCREV = "644022f8970c832a40be00747fcec70c7b5d488c" |
13 | 13 | ||
14 | S = "${WORKDIR}/git" | 14 | S = "${WORKDIR}/git" |
15 | B = "${WORKDIR}/build" | 15 | B = "${WORKDIR}/build" |
16 | 16 | ||
17 | inherit python3native systemd features_check | 17 | inherit python3native systemd features_check pkgconfig |
18 | |||
19 | DEPENDS = "util-linux-libuuid" | ||
18 | 20 | ||
19 | REQUIRED_MACHINE_FEATURES = "optee" | 21 | REQUIRED_MACHINE_FEATURES = "optee" |
20 | 22 | ||
diff --git a/recipes-security/optee-imx/optee-os/0008-no-warn-rwx-segments.patch b/recipes-security/optee-imx/optee-os/0008-no-warn-rwx-segments.patch deleted file mode 100644 index 1dd70b31..00000000 --- a/recipes-security/optee-imx/optee-os/0008-no-warn-rwx-segments.patch +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | Signed-off-by: Anton Antonov <Anton.Antonov@arm.com> | ||
2 | Upstream-Status: Backport [https://github.com/OP-TEE/optee_os/pull/5474] | ||
3 | |||
4 | From 0b8a917fa51a366806edc0f04b88cd23b24098c4 Mon Sep 17 00:00:00 2001 | ||
5 | From: Jerome Forissier <jerome.forissier@linaro.org> | ||
6 | Date: Fri, 5 Aug 2022 09:48:03 +0200 | ||
7 | Subject: [PATCH] core: link: add --no-warn-rwx-segments | ||
8 | |||
9 | binutils ld.bfd generates one RWX LOAD segment by merging several sections | ||
10 | with mixed R/W/X attributes (.text, .rodata, .data). After version 2.38 it | ||
11 | also warns by default when that happens [1], which breaks the build due to | ||
12 | --fatal-warnings. The RWX segment is not a problem for the TEE core, since | ||
13 | that information is not used to set memory permissions. Therefore, silence | ||
14 | the warning. | ||
15 | |||
16 | Link: [1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107 | ||
17 | Link: https://sourceware.org/bugzilla/show_bug.cgi?id=29448 | ||
18 | Reported-by: Dominique Martinet <dominique.martinet@atmark-techno.com> | ||
19 | Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> | ||
20 | Acked-by: Jens Wiklander <jens.wiklander@linaro.org> | ||
21 | --- | ||
22 | core/arch/arm/kernel/link.mk | 8 ++++++-- | ||
23 | 1 file changed, 6 insertions(+), 2 deletions(-) | ||
24 | |||
25 | diff --git a/core/arch/arm/kernel/link.mk b/core/arch/arm/kernel/link.mk | ||
26 | index 7eed333a32..c39d43cbfc 100644 | ||
27 | --- a/core/arch/arm/kernel/link.mk | ||
28 | +++ b/core/arch/arm/kernel/link.mk | ||
29 | @@ -31,6 +31,7 @@ link-ldflags += -T $(link-script-pp) -Map=$(link-out-dir)/tee.map | ||
30 | link-ldflags += --sort-section=alignment | ||
31 | link-ldflags += --fatal-warnings | ||
32 | link-ldflags += --gc-sections | ||
33 | +link-ldflags += $(call ld-option,--no-warn-rwx-segments) | ||
34 | |||
35 | link-ldadd = $(LDADD) | ||
36 | link-ldadd += $(ldflags-external) | ||
37 | @@ -55,6 +56,7 @@ link-script-cppflags := \ | ||
38 | $(cppflagscore)) | ||
39 | |||
40 | ldargs-all_objs := -T $(link-script-dummy) --no-check-sections \ | ||
41 | + $(call ld-option,--no-warn-rwx-segments) \ | ||
42 | $(link-objs) $(link-ldadd) $(libgcccore) | ||
43 | cleanfiles += $(link-out-dir)/all_objs.o | ||
44 | $(link-out-dir)/all_objs.o: $(objs) $(libdeps) $(MAKEFILE_LIST) | ||
45 | @@ -67,7 +69,8 @@ $(link-out-dir)/unpaged_entries.txt: $(link-out-dir)/all_objs.o | ||
46 | $(q)$(NMcore) $< | \ | ||
47 | $(AWK) '/ ____keep_pager/ { printf "-u%s ", $$3 }' > $@ | ||
48 | |||
49 | -unpaged-ldargs = -T $(link-script-dummy) --no-check-sections --gc-sections | ||
50 | +unpaged-ldargs := -T $(link-script-dummy) --no-check-sections --gc-sections \ | ||
51 | + $(call ld-option,--no-warn-rwx-segments) | ||
52 | unpaged-ldadd := $(objs) $(link-ldadd) $(libgcccore) | ||
53 | cleanfiles += $(link-out-dir)/unpaged.o | ||
54 | $(link-out-dir)/unpaged.o: $(link-out-dir)/unpaged_entries.txt | ||
55 | @@ -95,7 +98,8 @@ $(link-out-dir)/init_entries.txt: $(link-out-dir)/all_objs.o | ||
56 | $(q)$(NMcore) $< | \ | ||
57 | $(AWK) '/ ____keep_init/ { printf "-u%s ", $$3 }' > $@ | ||
58 | |||
59 | -init-ldargs := -T $(link-script-dummy) --no-check-sections --gc-sections | ||
60 | +init-ldargs := -T $(link-script-dummy) --no-check-sections --gc-sections \ | ||
61 | + $(call ld-option,--no-warn-rwx-segments) | ||
62 | init-ldadd := $(link-objs-init) $(link-out-dir)/version.o $(link-ldadd) \ | ||
63 | $(libgcccore) | ||
64 | cleanfiles += $(link-out-dir)/init.o | ||
diff --git a/recipes-security/optee-imx/optee-os_3.17.0.imx.bb b/recipes-security/optee-imx/optee-os_3.19.0.imx.bb index f759e40c..9e491bac 100644 --- a/recipes-security/optee-imx/optee-os_3.17.0.imx.bb +++ b/recipes-security/optee-imx/optee-os_3.19.0.imx.bb | |||
@@ -6,15 +6,12 @@ HOMEPAGE = "http://www.optee.org/" | |||
6 | LICENSE = "BSD-2-Clause" | 6 | LICENSE = "BSD-2-Clause" |
7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173" | 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173" |
8 | 8 | ||
9 | DEPENDS = "python3-cryptography-native python3-pyelftools-native u-boot-mkimage-native" | 9 | DEPENDS = "python3-pyelftools-native u-boot-mkimage-native \ |
10 | python3-cryptography-native" | ||
10 | 11 | ||
11 | SRC_URI = "git://github.com/nxp-imx/imx-optee-os.git;protocol=https;branch=${SRCBRANCH}" | 12 | SRC_URI = "git://github.com/nxp-imx/imx-optee-os.git;protocol=https;branch=${SRCBRANCH}" |
12 | SRCBRANCH = "lf-5.15.52_2.1.0" | 13 | SRCBRANCH = "lf-5.15.71_2.2.0" |
13 | SRCREV = "9e86c8b6b102efa09ada451d0383ea3d11f8fad6" | 14 | SRCREV = "00919403f040fad4f8603e605932281ff8451b1d" |
14 | |||
15 | SRC_URI:append = " \ | ||
16 | file://0008-no-warn-rwx-segments.patch \ | ||
17 | " | ||
18 | 15 | ||
19 | S = "${WORKDIR}/git" | 16 | S = "${WORKDIR}/git" |
20 | B = "${WORKDIR}/build" | 17 | B = "${WORKDIR}/build" |
@@ -42,6 +39,7 @@ PLATFORM_FLAVOR:mx8qxp-nxp-bsp = "mx8qxpmek" | |||
42 | PLATFORM_FLAVOR:mx8dx-nxp-bsp = "mx8dxmek" | 39 | PLATFORM_FLAVOR:mx8dx-nxp-bsp = "mx8dxmek" |
43 | PLATFORM_FLAVOR:mx8dxl-nxp-bsp = "mx8dxlevk" | 40 | PLATFORM_FLAVOR:mx8dxl-nxp-bsp = "mx8dxlevk" |
44 | PLATFORM_FLAVOR:mx8ulp-nxp-bsp = "mx8ulpevk" | 41 | PLATFORM_FLAVOR:mx8ulp-nxp-bsp = "mx8ulpevk" |
42 | PLATFORM_FLAVOR:mx93-nxp-bsp = "mx93evk" | ||
45 | 43 | ||
46 | OPTEE_ARCH:arm = "arm32" | 44 | OPTEE_ARCH:arm = "arm32" |
47 | OPTEE_ARCH:aarch64 = "arm64" | 45 | OPTEE_ARCH:aarch64 = "arm64" |
@@ -90,17 +88,14 @@ do_install () { | |||
90 | install -d ${D}${nonarch_base_libdir}/firmware/ | 88 | install -d ${D}${nonarch_base_libdir}/firmware/ |
91 | install -m 644 ${B}/core/*.bin ${D}${nonarch_base_libdir}/firmware/ | 89 | install -m 644 ${B}/core/*.bin ${D}${nonarch_base_libdir}/firmware/ |
92 | 90 | ||
91 | # Install embedded TAs | ||
92 | install -d ${D}${nonarch_base_libdir}/optee_armtz/ | ||
93 | install -m 444 ${B}/ta/*/*.ta ${D}${nonarch_base_libdir}/optee_armtz/ | ||
94 | |||
93 | # Install the TA devkit | 95 | # Install the TA devkit |
94 | install -d ${D}${includedir}/optee/export-user_ta_${OPTEE_ARCH}/ | 96 | install -d ${D}${includedir}/optee/export-user_ta_${OPTEE_ARCH}/ |
95 | for f in ${B}/export-ta_${OPTEE_ARCH}/*; do | 97 | cp -aR ${B}/export-ta_${OPTEE_ARCH}/* \ |
96 | cp -aR $f ${D}${includedir}/optee/export-user_ta_${OPTEE_ARCH}/ | 98 | ${D}${includedir}/optee/export-user_ta_${OPTEE_ARCH}/ |
97 | done | ||
98 | |||
99 | # Install embedded TAs | ||
100 | install -d ${D}${nonarch_base_libdir}/optee_armtz | ||
101 | find ${B}/ta -name '*.ta' | while read name; do | ||
102 | install -m 444 $name ${D}${nonarch_base_libdir}/optee_armtz/ | ||
103 | done | ||
104 | } | 99 | } |
105 | 100 | ||
106 | addtask deploy after do_compile before do_install | 101 | addtask deploy after do_compile before do_install |
diff --git a/recipes-security/optee-imx/optee-test_3.17.0.imx.bb b/recipes-security/optee-imx/optee-test_3.19.0.imx.bb index e1b831f1..25cd86dd 100644 --- a/recipes-security/optee-imx/optee-test_3.17.0.imx.bb +++ b/recipes-security/optee-imx/optee-test_3.19.0.imx.bb | |||
@@ -9,8 +9,8 @@ LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa" | |||
9 | DEPENDS = "python3-cryptography-native optee-os optee-client openssl" | 9 | DEPENDS = "python3-cryptography-native optee-os optee-client openssl" |
10 | 10 | ||
11 | SRC_URI = "git://github.com/nxp-imx/imx-optee-test.git;protocol=https;branch=${SRCBRANCH}" | 11 | SRC_URI = "git://github.com/nxp-imx/imx-optee-test.git;protocol=https;branch=${SRCBRANCH}" |
12 | SRCBRANCH = "lf-5.15.52_2.1.0" | 12 | SRCBRANCH = "lf-5.15.71_2.2.0" |
13 | SRCREV = "41222c4b8df1adc0f0bdc737e5cb824becd25f63" | 13 | SRCREV = "5c1dbb531b304f7ae100958f6261b6cefea49b62" |
14 | 14 | ||
15 | S = "${WORKDIR}/git" | 15 | S = "${WORKDIR}/git" |
16 | B = "${WORKDIR}/build" | 16 | B = "${WORKDIR}/build" |