| 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 ...
|
| 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 ...
|
| 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 ...
|
| d58d79ec | 17-Jul-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
ta: support variables user-ta-{uuid,ldadd}
Replaces the old variables "binary" and "ldadd" with "user-ta-uuid" and "user-ta-ldadd" respectively.
Reviewed-by: Jerome Forissier <jerome.forissier@lina
ta: support variables user-ta-{uuid,ldadd}
Replaces the old variables "binary" and "ldadd" with "user-ta-uuid" and "user-ta-ldadd" respectively.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| f8896d13 | 06-Feb-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
TA dev kit: add support for creating shared libraries
A new Makefile include (ta/arch/arm/link_shlib.mk) is introduced, it is quite similar to the file used to generate a TA (ta/arch/arm/link.mk) ex
TA dev kit: add support for creating shared libraries
A new Makefile include (ta/arch/arm/link_shlib.mk) is introduced, it is quite similar to the file used to generate a TA (ta/arch/arm/link.mk) except that is produces a shared object: $(SHLIBNAME).so. A signed file is also produced: $(SHLIBUUID).ta.
Actual support for dynamically linked TAs in the OP-TEE ELF loader will be added in subsequent patches.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| a62bf61e | 20-Apr-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
ta: pass CFG_ variables as defines
Pass all CFG_ variables as -D<varname>=<value> command line parameters for the C preprocessor. Variables set to "n" are not passed and variables set to "y" are sup
ta: pass CFG_ variables as defines
Pass all CFG_ variables as -D<varname>=<value> command line parameters for the C preprocessor. Variables set to "n" are not passed and variables set to "y" are supplied with the value "1" instead. This is the same translation as done for conf.h when compiling OP-TEE OS.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|