| d1911a85 | 23-May-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: load TAs using ldelf
Uses ldelf to load and relocate TAs instead of parsing and loading the ELFs in TEE Core. TA abort dumps, ASLR and ftrace are temporarily removed or disabled to be re-enabl
core: load TAs using ldelf
Uses ldelf to load and relocate TAs instead of parsing and loading the ELFs in TEE Core. TA abort dumps, ASLR and ftrace are temporarily removed or disabled to be re-enabled in following commits.
Loading dynamically linked TAs are from now on always supported and cannot be disabled via configuration flags. CFG_TA_DYNLINK is also removed as a configuration option.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e0e762fe | 14-Jun-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
arm32: prevent unwinding of __ta_entry()
Since commit eeb866c431db ("Add TA entry point function: __ta_entry()"), __ta_entry() is the first function in the user space call stack, not __utee_entry().
arm32: prevent unwinding of __ta_entry()
Since commit eeb866c431db ("Add TA entry point function: __ta_entry()"), __ta_entry() is the first function in the user space call stack, not __utee_entry(). Therefore, the asm(".cantunwind") declaration should be moved from __utee_entry() to __ta_entry().
When utee_return() was moved from __utee_entry() to __ta_entry() by commit fde3a7f212f8 ("Remove redundant __noreturn from __utee_entry()"), it caused a regression in xtest 1010.3. The stack unwinding would enter an infinite loop as follows:
E/TC:? 0 User TA prefetch-abort at address 0x0 (translation fault) E/TC:? 0 fsr 0x00000005 ttbr0 0x3f07906a ttbr1 0x3f06c06a cidr 0x2 E/TC:? 0 cpu #7 cpsr 0x80000110 E/TC:? 0 r0 0x00000001 r4 0x00161448 r8 0x00161438 r12 0x00152f80 E/TC:? 0 r1 0x00000002 r5 0x00152f40 r9 0x00152f30 sp 0x00152f10 E/TC:? 0 r2 0x00000000 r6 0x00152f80 r10 0x0000000a lr 0x0015498d E/TC:? 0 r3 0x00152f14 r7 0x00161458 r11 0x00245420 pc 0x00000000 E/TC:? 0 Status of TA 5b9e0e40-2636-11e1-ad9e-0002a5d5c51b (0x3f069c30) (active) E/TC:? 0 arch: arm load address: 0x00153000 ctx-idr: 2 E/TC:? 0 stack: 0x00150000 12288 E/TC:? 0 region 0: va 0x00100000 pa 0x3f000000 size 0x002000 flags ---R-X E/TC:? 0 region 1: va 0x00150000 pa 0x3f110000 size 0x003000 flags rw-RW- E/TC:? 0 region 2: va 0x00153000 pa 0x3f113000 size 0x00e000 flags r-xR-- [0] .ta_head .text .plt .rodata .ARM.extab .ARM.extab.text.unlikely .ARM.extab.text.__aeabi_ldivmod .ARM.extab.text.__aeabi_uldivmod .ARM.extab.text.utee_panic .ARM.exidx .dynsym .dynstr .hash E/TC:? 0 region 3: va 0x00161000 pa 0x3f121000 size 0x0e5000 flags rw-RW- [0] .got .rel.got .rel.plt .dynamic .data .bss .rel.dyn E/TC:? 0 region 4: va 0x00246000 pa 0x3f101000 size 0x001000 flags r-xR-- [1] .hash .dynsym .dynstr .rel.plt .plt .text .ARM.exidx E/TC:? 0 region 5: va 0x00247000 pa 0x3f102000 size 0x001000 flags rw-RW- [1] .dynamic .got E/TC:? 0 region 6: va 0x00248000 pa 0x3f100000 size 0x001000 flags r----- E/TC:? 0 [0] 5b9e0e40-2636-11e1-ad9e-0002a5d5c51b @ 0x00153000 (optee_test/out/ta/os_test/5b9e0e40-2636-11e1-ad9e-0002a5d5c51b.elf) E/TC:? 0 [1] ffd2bded-ab7d-4988-95ee-e4962fff7154 @ 0x00246000 (optee_test/out/ta/os_test_lib/libos_test.so) E/TC:? 0 Call stack: E/TC:? 0 0x00000000 ??? E/TC:? 0 0x0015c629 __ta_entry at optee_os/out/arm/export-ta_arm32/src/user_ta_header.c:41 E/TC:? 0 0x0015c62d tahead_get_trace_level at optee_os/out/arm/export-ta_arm32/src/user_ta_header.c:117 E/TC:? 0 0x0015c62d tahead_get_trace_level at optee_os/out/arm/export-ta_arm32/src/user_ta_header.c:117 ...
Moving the .cantunwind directive fixes the issue.
Fixes: fde3a7f212f8 ("Remove redundant __noreturn from __utee_entry()") Fixes: eeb866c431db ("Add TA entry point function: __ta_entry()") Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Sumit Garg <sumit.garg@linaro.org>
show more ...
|
| b02ae382 | 22-May-2019 |
Sumit Garg <sumit.garg@linaro.org> |
libutee: arm64: Add support for function tracing of user TAs
Function tracing (ftrace) is a useful debugging technique to dump function call graph for in-depth analysis of program execution and also
libutee: arm64: Add support for function tracing of user TAs
Function tracing (ftrace) is a useful debugging technique to dump function call graph for in-depth analysis of program execution and also to get useful information in case of any program abort.
In case of TA, this function graph information is dumped in a buffer kept in .bss section of corresponding instrumented TA. So this buffer can be dumped to normal world in case TA session closes or in case of any abort. Also size of this ftrace buffer is configurable per TA via following config option during TA compilation:
CFG_FTRACE_BUF_SIZE=2048
Function tracing is completely optional debugging feature which could be enabled via command line config option CFG_TA_FTRACE_SUPPORT=y.
Along with this user needs to add cflag: "-pg" to the files for whom function graph is to be generated. Typically for the whole TA, it should be compiled with CFG_TA_MCOUNT=y.
And in case user wants to set "-pg" for particular file, following should go in corresponding sub.mk:
cflags-<file-name>-y+=-pg
Also, to generate function graph for user mode libraries enable CFG_ULIBS_MCOUNT=y which will set "-pg" for all library files.
Currently this patch adds support for function tracing of 64-bit TAs only.
Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey960)
show more ...
|
| abbf27a2 | 06-Jun-2019 |
Jerome Forissier <jerome@forissier.org> |
TA dev kit: always link shared libraries against OP-TEE libraries
If a TA shared library is created, and needs to call OP-TEE functions, it needs to link against the TEE libraries (libutee, libutils
TA dev kit: always link shared libraries against OP-TEE libraries
If a TA shared library is created, and needs to call OP-TEE functions, it needs to link against the TEE libraries (libutee, libutils etc.) in a similar way to TAs.
This patch adds the proper flags.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a3fdd56c | 23-May-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
Link user libraries with 4K page size
Set the linker flag max-page-size to 4K when linking shared user libraries. This is used to avoid unnecessary large holes in the virtual memory map between segm
Link user libraries with 4K page size
Set the linker flag max-page-size to 4K when linking shared user libraries. This is used to avoid unnecessary large holes in the virtual memory map between segments with different attributes.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| fde3a7f2 | 21-May-2019 |
Sumit Garg <sumit.garg@linaro.org> |
Remove redundant __noreturn from __utee_entry()
As __ta_entry() acts as function entry point, it makes sense to logically return from this api only via utee_return(). So remove redundant __noreturn
Remove redundant __noreturn from __utee_entry()
As __ta_entry() acts as function entry point, it makes sense to logically return from this api only via utee_return(). So remove redundant __noreturn from __utee_entry().
Fixes: eeb866c431db ("Add TA entry point function: __ta_entry()") Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| eeb866c4 | 04-Mar-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
Add TA entry point function: __ta_entry()
Symbol __utee_entry may be undefined in a TA in case libutee is built as a shared library (CFG_ULIBS_SHARED=y). Add a wrapper function to avoid this issue.
Add TA entry point function: __ta_entry()
Symbol __utee_entry may be undefined in a TA in case libutee is built as a shared library (CFG_ULIBS_SHARED=y). Add a wrapper function to avoid this issue.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| a73b5878 | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
Replace ta_head.entry with elf entry
Prior to this patch the entry function of the TA was stored in ta_head which is located in a read-only section of the TA. This results in the linker emitting a r
Replace ta_head.entry with elf entry
Prior to this patch the entry function of the TA was stored in ta_head which is located in a read-only section of the TA. This results in the linker emitting a relocation modifying a read-only section. This is a problem if the read-only section is mapped read-only while relocations are performed. To avoid this problematic relocation the ta_head.entry is removed and the ELF entry point is used instead.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 43af052f | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
ta: arm: ta.ld.S: move relocation segments
Move relocation segments into the read/write section to avoid modifications of the read only compared to what is in the ELF. This is needed for sharing of
ta: arm: ta.ld.S: move relocation segments
Move relocation segments into the read/write section to avoid modifications of the read only compared to what is in the ELF. This is needed for sharing of read only sections of TAs.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e34f6cde | 12-Apr-2019 |
Sumit Garg <sumit.garg@linaro.org> |
gprof: define original mcount APIs inserted by compiler
Simplify gprof implementation via defining original mcount APIs: _mcount (for aarch64) and __gnu_mcount_nc (for arm) inserted by compiler inst
gprof: define original mcount APIs inserted by compiler
Simplify gprof implementation via defining original mcount APIs: _mcount (for aarch64) and __gnu_mcount_nc (for arm) inserted by compiler instead of providing them via __utee_mcount API.
Also remove weak definitions of mcount API that were earlier mandated by linker script via PROVIDE().
Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 64718c93 | 29-May-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
Allow building libutils etc. as shared libraries
When CFG_ULIBS_SHARED=y (default n), build libutils, libmpa/libmbedtls and libutee as shared libraries (.so). The static archives (.a) are still prod
Allow building libutils etc. as shared libraries
When CFG_ULIBS_SHARED=y (default n), build libutils, libmpa/libmbedtls and libutee as shared libraries (.so). The static archives (.a) are still produced. The linker uses shared libraries by default when present so TAs just need to be re-built to use the shared libraries.
For the time being, in-tree TAs are always linked statically for practical reasons. Indeed, in-tree TAs (such as ta/avb) are likely to be used as "early TAs". If such a TA was linked against shared libraries, then those libraries would need to be installed in the "early TA" area, too. While this works fine technically, it requires some more steps in the Makefiles to make sure the proper dependencies are installed and also it would mean that those libraries take precedence over the ones potentially installed in the REE FS etc. In other words, it would raise questions that we do not want nor need to address now.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 9b294376 | 30-May-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
User TA: add --as-needed to link flags
Add link flag '--as-needed' to avoid adding dependencies onto shared libraries that are not actually used. This becomes particularly useful when we build the b
User TA: add --as-needed to link flags
Add link flag '--as-needed' to avoid adding dependencies onto shared libraries that are not actually used. This becomes particularly useful when we build the base user libraries (libutils, libmpa and libmbedtls) as shared objects. Without the flag, and because all libraries are passed to the linker by default, all TAs would need to map all the libraries at runtime resulting in a waste of memory.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| ce0bad55 | 07-Feb-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
ta: link.mk: set linker max-page-size to 4K
TA binaries contain a lot of zero padding (almost 64 KiB) between sections .ta_head and .text. This value can be reduced to 4 KiB by reducing the linker's
ta: link.mk: set linker max-page-size to 4K
TA binaries contain a lot of zero padding (almost 64 KiB) between sections .ta_head and .text. This value can be reduced to 4 KiB by reducing the linker's max-page-size parameter. Since the OP-TEE ELF loader always aligns on small page boundaries, it does not make sense to request a larger alignment.
This patch adds "-z max-page-size=4096" to the linker flags so that the alignment constraints are relaxed from 64 KiB (the default for our 32 and 64 targets as it seems) to what OP-TEE is actually expecting (4 KiB). The TA file size is reduced by 60 KiB. It changes nothing to the layout of the TA in memory.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 275d9d31 | 12-Dec-2018 |
Igor Opaniuk <igor.opaniuk@linaro.org> |
ta: avb: add support for named persistent values
Introduce support for named persistent values [1], that are mainly used to store persistent digests.
Link: [1] https://android.googlesource.com/plat
ta: avb: add support for named persistent values
Introduce support for named persistent values [1], that are mainly used to store persistent digests.
Link: [1] https://android.googlesource.com/platform/external/avb/+/master/README.md#Named-Persistent-Values
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
show more ...
|
| 062e3d01 | 13-Nov-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
ta: switch to to mbedtls for bignum
Adds tee_api_arith_mpi.c wrapper providing the TEE Arithmetical API around the big (mpi) routines from mbedtls.
CFG_TA_MBEDTLS_MPI=y (default y) enables the usag
ta: switch to to mbedtls for bignum
Adds tee_api_arith_mpi.c wrapper providing the TEE Arithmetical API around the big (mpi) routines from mbedtls.
CFG_TA_MBEDTLS_MPI=y (default y) enables the usage of the bignum routines in libutee.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 412dcda1 | 29-Nov-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
TA: export CFG_TEE_TA_LOG_LEVEL to dev-kit
Exports CFG_TEE_TA_LOG_LEVEL to TA dev-kit. It can still be overridden when compiling the TA, but it makes sense to default to the value used when compilin
TA: export CFG_TEE_TA_LOG_LEVEL to dev-kit
Exports CFG_TEE_TA_LOG_LEVEL to TA dev-kit. It can still be overridden when compiling the TA, but it makes sense to default to the value used when compiling the dev-kit.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| c48dbbc1 | 12-Sep-2018 |
Igor Opaniuk <igor.opaniuk@linaro.org> |
ta: link.mk: evaluate $(sm) values in targets
$(sm) var isn't properly evalutated as the link.mk is included (final evaluation is done when the rule is triggered). Add dynamic target generation base
ta: link.mk: evaluate $(sm) values in targets
$(sm) var isn't properly evalutated as the link.mk is included (final evaluation is done when the rule is triggered). Add dynamic target generation based on the current value of $(sm)
Fixes: https://github.com/OP-TEE/optee_os/issues/2537 Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
show more ...
|
| e07aecdb | 24-Aug-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
ta: link.mk: filter out dependency and command files from $(MAKEFILE_LIST)
Prevents ta.lds from being needlessly re-generated, such as in the following test case:
$ make -s out/arm-plat-vexpress/t
ta: link.mk: filter out dependency and command files from $(MAKEFILE_LIST)
Prevents ta.lds from being needlessly re-generated, such as in the following test case:
$ make -s out/arm-plat-vexpress/ta/avb/ta.lds $ make -s out/arm-plat-vexpress/core/kernel/console.o $ make out/arm-plat-vexpress/ta/avb/ta.lds CHK out/arm-plat-vexpress/conf.mk CHK out/arm-plat-vexpress/include/generated/conf.h CPP out/arm-plat-vexpress/ta/avb/ta.lds
The last line should not hapen because ta.lds exists already, and building the unrelated console.o should not trigger a re-build.
The cause of the re-build is the dependency on $(MAKEFILE_LIST) which contains *all* the files that record previous build command and dependencies such as out/arm-plat-vexpress/core/kernel/.console.o.{d,cmd}.
Filter out those files, thus keeping only the static Makefiles (*.mk). This is still more than needed since all the core *.mk are present, but listing only the TA-related makefiles seems tricky (has to work both inside and outside the OP-TEE build environment), and removing $(MAKEFILE_LIST) altogether presents a risk that TA developers using the TA dev kit will complain that their TA doesn't get re-built after a flag is changed in a Makefile.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 8452bf4e | 13-Aug-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
Do not make in-tree TAs depend on a phony target
Commit cf903a62bc12 ("Add dependency on ta-dev-kit when building in-tree TA") introduces a dependency of the in-tree TA object files on the phony tar
Do not make in-tree TAs depend on a phony target
Commit cf903a62bc12 ("Add dependency on ta-dev-kit when building in-tree TA") introduces a dependency of the in-tree TA object files on the phony target 'ta_dev_kit'. The purpose was to make sure the dev kit files are available when make starts building the TA. Unfortunately, this introduces useless recompilation (the lines marked with >):
$ make -s && make CHK out/arm-plat-vexpress/conf.mk CHK out/arm-plat-vexpress/include/generated/conf.h CHK out/arm-plat-vexpress/conf.cmake CHK out/arm-plat-vexpress/export-ta_arm32/mk/conf.mk > CC out/arm-plat-vexpress/ta/avb/entry.o > CC out/arm-plat-vexpress/ta/avb/user_ta_header.o > CPP out/arm-plat-vexpress/ta/avb/ta.lds > LD out/arm-plat-vexpress/ta/avb/023f8f1a-292a-432b-8fc4-de8471358067.elf > OBJDUMP out/arm-plat-vexpress/ta/avb/023f8f1a-292a-432b-8fc4-de8471358067.dmp > OBJCOPY out/arm-plat-vexpress/ta/avb/023f8f1a-292a-432b-8fc4-de8471358067.stripped.elf > SIGN out/arm-plat-vexpress/ta/avb/023f8f1a-292a-432b-8fc4-de8471358067.ta
This happens because phony targets are always considered new by the make program, so they'd rather not be used as dependencies. Instead, replace 'ta-dev-kit' by the actual list of all the files in the TA dev kit. Then, the second make invocation will not rebuild anything:
$ make -s && make CHK out/arm-plat-vexpress/conf.mk CHK out/arm-plat-vexpress/include/generated/conf.h CHK out/arm-plat-vexpress/conf.cmake CHK out/arm-plat-vexpress/export-ta_arm32/mk/conf.mk
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| cf903a62 | 10-Aug-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
Add dependency on ta-dev-kit when building in-tree TA
Fixes the following errors which may reportedly be triggered by plain "make" too [1]:
$ make -s clean && make -s out/arm-plat-vexpress/ta/avb/
Add dependency on ta-dev-kit when building in-tree TA
Fixes the following errors which may reportedly be triggered by plain "make" too [1]:
$ make -s clean && make -s out/arm-plat-vexpress/ta/avb/entry.o cc1: warning: out/arm-plat-vexpress/export-ta_arm32/include: No such file or directory [-Wmissing-include-dirs] ta/avb/entry.c:5:30: fatal error: tee_internal_api.h: No such file or directory compilation terminated. mk/compile.mk:146: recipe for target 'out/arm-plat-vexpress/ta/avb/entry.o' failed make: *** [out/arm-plat-vexpress/ta/avb/entry.o] Error 1
$ make -s clean && make -s out/arm-plat-vexpress/ta/avb/user_ta_header.o cc1: warning: out/arm-plat-vexpress/export-ta_arm32/include: No such file or directory [-Wmissing-include-dirs] out/arm-plat-vexpress/export-ta_arm32/src/user_ta_header.c:5:22: fatal error: compiler.h: No such file or directory compilation terminated. mk/compile.mk:154: recipe for target 'out/arm-plat-vexpress/ta/avb/user_ta_header.o' failed make: *** [out/arm-plat-vexpress/ta/avb/user_ta_header.o] Error 1
Link: [1] https://github.com/OP-TEE/build/issues/285 Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| fefbee97 | 03-Aug-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
Replace 'echo' commands with '$(cmd-echo-silent)'
Since commit b29b419506fa ("ta: add AVB TA"), "make -s" is not totally silent anymore. The following line is always printed:
SIGN out/ta/avb/0
Replace 'echo' commands with '$(cmd-echo-silent)'
Since commit b29b419506fa ("ta: add AVB TA"), "make -s" is not totally silent anymore. The following line is always printed:
SIGN out/ta/avb/023f8f1a-292a-432b-8fc4-de8471358067.ta
The AVB commit just revealed a simple mistake in the TA makefile. Fix it.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| ca7065cb | 03-Aug-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
In-tree TAs: prevent double slash in object paths
When processing the source files for an in-tree user TA (ta/*/user_ta.mk), make sure not to insert a double slash in the object file path.
Fixes th
In-tree TAs: prevent double slash in object paths
When processing the source files for an in-tree user TA (ta/*/user_ta.mk), make sure not to insert a double slash in the object file path.
Fixes the following error:
$ make -s $ make clean CLEAN out/arm-plat-vexpress rmdir: failed to remove 'out/arm-plat-vexpress/ta/avb': No such file or directory Makefile:98: recipe for target 'clean' failed make: *** [clean] Error 1
The error results from the fact that we have two kinds of object files in the in-tree TAs: - The object files built from ta/*/user_ta.mk. For AVB, we have out/arm-plat-vexpress/ta/avb//entry.o (notice the repeated slash). - The object files that correspond to "specified source files", i.e., constructed from $(spec-out-dir) and $(spec-srcs). For AVB we have out/arm-plat-vexpress/ta/avb/user_ta_header.o. When "make clean" creates the list of directories to be removed, it strips the /filename part and keeps only the directory part, resulting in:
rmdir ... out/arm-plat-vexpress/ta/avb/ out/arm-plat-vexpress/ta/avb
Trying to remove the same directory twice: "No such file or directory".
Fixes: https://github.com/OP-TEE/optee_os/issues/2484 Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| ff6684bd | 30-Jul-2018 |
Pengguang Zhu <zpghao@163.com> |
ta: mk: make sign tool configurable
Since custom load and verification methods for user TA is supported, the sign tool also should be configurable.
Signed-off-by: Pengguang Zhu <zpghao@163.com> Ack
ta: mk: make sign tool configurable
Since custom load and verification methods for user TA is supported, the sign tool also should be configurable.
Signed-off-by: Pengguang Zhu <zpghao@163.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| b29b4195 | 17-Jul-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
ta: add AVB TA
Adds an AVB TA to be used to provide required services for AVB in U-boot.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linar
ta: add AVB TA
Adds an AVB TA to be used to provide required services for AVB in U-boot.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| cfa34d9a | 17-Jul-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
Add support for compiling in-tree TAs
Adds support for compiling in-tree TAs. Unless specified via CFG_USER_TA_TARGET_<ta-name> the TA will be built with the first TA target (aka TA dev kit, when de
Add support for compiling in-tree TAs
Adds support for compiling in-tree TAs. Unless specified via CFG_USER_TA_TARGET_<ta-name> the TA will be built with the first TA target (aka TA dev kit, when delivered) specified in the variable ta-targets which is initialized in core/arch/arm/plat-*/conf.mk.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|