| #
3ee44162 |
| 22-Mar-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
build: print CC line when .am-defines.s is generated
$O/include/generated/.am-defines.s is generated using the C compiler, so we should print a line when compiling, as follows:
CC out/arm-pl
build: print CC line when .am-defines.s is generated
$O/include/generated/.am-defines.s is generated using the C compiler, so we should print a line when compiling, as follows:
CC out/arm-plat-vexpress/core/include/generated/.asm-defines.s
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
33035005 |
| 04-Apr-2019 |
Etienne Carriere <etienne.carriere@linaro.org> |
build: remove pedantic from build directives
This change removes -pedantic from the build directive from all warning build level. The rational is that OP-TEE OS package no longer supports being buil
build: remove pedantic from build directives
This change removes -pedantic from the build directive from all warning build level. The rational is that OP-TEE OS package no longer supports being built in pedantic mode allowing now use of implementation sequence that are rejected in pedantic mode, for example using = { } for initializing structured local variables in a structure agnostic way which OP-TEE OS community as agreed to use.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
d3353b42 |
| 22-Nov-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
mk/compile.mk: define __FILE_ID__ for all files
Defines __FILE_ID__ with a unique name of the file being compiled. Useful to create globally unique variables.
Acked-by: Etienne Carriere <etienne.ca
mk/compile.mk: define __FILE_ID__ for all files
Defines __FILE_ID__ with a unique name of the file being compiled. Useful to create globally unique variables.
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 ...
|
| #
c828ecea |
| 23-Nov-2018 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: helper for device tree compilation
Add helper function gen-dtb-file in the build sequence. It generates a DTB file from input DTS file. The DTS file is preprocessed with CPP before being compi
core: helper for device tree compilation
Add helper function gen-dtb-file in the build sequence. It generates a DTB file from input DTS file. The DTS file is preprocessed with CPP before being compiled using the device tree compiler (DTC).
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
439203cb |
| 26-Sep-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
Allow mixed declaration and code
Removes the -Wdeclaration-after-statement compiler flag to allow mixed declaration and code
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by:
Allow mixed declaration and code
Removes the -Wdeclaration-after-statement compiler flag to allow mixed declaration and code
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-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 ...
|
| #
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 ...
|
| #
94cd76ca |
| 17-Jul-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
Use per $(sm) unique FORCE-GENSRC
Uses per $(sm) unique FORCE-GENSRC to allow one submodule (sm) depend on files produced by another submodule.
CFG_IN_TREE_EARLY_TAS needs this for the core submodu
Use per $(sm) unique FORCE-GENSRC
Uses per $(sm) unique FORCE-GENSRC to allow one submodule (sm) depend on files produced by another submodule.
CFG_IN_TREE_EARLY_TAS needs this for the core submodule to depend on a submodule representing an in-tree TA.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
beb065df |
| 26-Jun-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
Do not set -Werror by default
Having -Werror turned on by default can be annoying, because not everyone uses the same compiler, and different compiler versions have different warnings.
Therefore, p
Do not set -Werror by default
Having -Werror turned on by default can be annoying, because not everyone uses the same compiler, and different compiler versions have different warnings.
Therefore, provide CFG_WERROR to turn it on instead. Enable CFG_WERROR in the CI scripts because we still don't want warnings with the officially supported compilers.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| #
070168e2 |
| 12-Mar-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
build: introduce asm-defines-y
The Makefile rules that are used to generate a C header file containing constants for struct offsets etc. are currently in mk/compile.mk. They are used by core.mk whic
build: introduce asm-defines-y
The Makefile rules that are used to generate a C header file containing constants for struct offsets etc. are currently in mk/compile.mk. They are used by core.mk which sets a variable (asm-defines-file) before it includes compile.mk. This works well for this purpose, but does not scale to several files.
There is a use case for platform code to be able to use the asm-defines mechanism, too. Therefore, introduce a variable that can be used in any sub.mk: asm-defines-y.
In addition, to avoid duplication, the DEFINE and DEFINES macros are moved to their own header (core/include/gen-asm-defines.h), with the added benefit that it can be explicitly excluded from the checkpatch list and thus not generate any warning on the 'DEFINE' macro needing parentheses.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
606f378c |
| 13-Oct-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
build: include submodule in name of per-library variables
Because a library may be built several times for different submodules (for example, libutils.a is built differently for kernel and user mode
build: include submodule in name of per-library variables
Because a library may be built several times for different submodules (for example, libutils.a is built differently for kernel and user mode), the names of the variables that hold library-specific flags have to uniquely identify the instance of the library that's being built.
Example use case: to build libutils with flag FOO for the core and flag BAR for the user mode, add this to lib/libutils/sub.mk:
ifeq ($(sm),core) cppflags-lib-y += -DFOO else cppflags-lib-y += -DBAR endif
Without this fix, the above would fail because all the flags would be added to all the builds of libutils.
Fixes: 3d34e125a253 ("Add support for $(cflags-lib-y)") Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
c95ce41f |
| 30-May-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
build: remove old gensrc facility
Removes the build facility for auto generated source files now that it's replaced by a new and more advanced.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Rev
build: remove old gensrc facility
Removes the build facility for auto generated source files now that it's replaced by a new and more advanced.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
36a06054 |
| 02-Jun-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
mk: add new gensrc build facility
Adds a new build facility for auto generated source files.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro
mk: add new gensrc build facility
Adds a new build facility for auto generated source files.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
02598914 |
| 26-Feb-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
mk/compile.mk: add 'remove' flags variable for submodule
With this commit it is possible to remove a CPP/C/AS flag for the submodule being built. For instance suppose one adds the following to core/
mk/compile.mk: add 'remove' flags variable for submodule
With this commit it is possible to remove a CPP/C/AS flag for the submodule being built. For instance suppose one adds the following to core/core.mk: cflags-remove-core += -pedantic ...then the '-pedantic' flag will be stripped off from the command line when building any C file of the TEE core.
Previously, one could remove flags only on a global basis or for a single file.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
b09cddca |
| 24-Feb-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
Introduce CFLAGS32 and CFLAGS64
Previously, compile.mk and gcc.mk were using $(CFLAGS) which cannot properly handle 32-bit and 64-bit compiles. This commit introduces CFLAGS32 and CFLAGS64 instead,
Introduce CFLAGS32 and CFLAGS64
Previously, compile.mk and gcc.mk were using $(CFLAGS) which cannot properly handle 32-bit and 64-bit compiles. This commit introduces CFLAGS32 and CFLAGS64 instead, which are set to $(CFLAGS) by defaut for convenience.
For each submodule (core, ta_arm32, ta_arm64) a new internal variable is defined in the architecture makefile (core/arch/arm/arm.mk): arch-bits-$(sm). Its value is either 32 or 64. This can later be used to reference the proper CFLAGS.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
c02f9fb0 |
| 12-Jan-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
arm: add auto generated asm-defines.h
Adds defines for assembly access to: * struct thread_ctx * struct thread_user_mode_rec * struct thread_core_local * struct thread_smc_args * struct thread_abort
arm: add auto generated asm-defines.h
Adds defines for assembly access to: * struct thread_ctx * struct thread_user_mode_rec * struct thread_core_local * struct thread_smc_args * struct thread_abort_regs * struct thread_user_mode_rec as needed from assembly code replacing previous definitions in kernel/thread.h and thread_private.h.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey) Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU, FVP) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
d5a887c8 |
| 12-Jan-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add auto generated asm-defines.h
The temporary files are all stored alongside asm-defines.h, and are named: .asm-defines.s, .asm-defines.s.d, .asm-defines.s.cmd.
Reviewed-by: Jerome Forissier
core: add auto generated asm-defines.h
The temporary files are all stored alongside asm-defines.h, and are named: .asm-defines.s, .asm-defines.s.d, .asm-defines.s.cmd.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
bc420748 |
| 05-May-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
TA as ELF + signature
Changes format of TA to use the ELF format instead. This patch also adds signature checking of the TA. The format of the TA is: <Signed header> <ELF header> <Program header> (p
TA as ELF + signature
Changes format of TA to use the ELF format instead. This patch also adds signature checking of the TA. The format of the TA is: <Signed header> <ELF header> <Program header> (part of ELF spec, pointing out segments to load) <Sections>
A struct ta_head is placed in the first section of the first segment to carry flags and other properties of the TA.
elf32.h, elf64.h and elf_common.h are imported from FreeBSD.
In addition to the R_ARM_RELATIVE relocation type, adds support for R_ARM_ABS32 relocations. Since a symbol table is needed to process this relocation type a separate program header is added in the TA ELF containing the sections .dynamic, .dynsym, .dynstr and .hash. These sections are only needed during relocation and could be released once the TA is relocated.
A default signing key has been generated with openssl genrsa -out key.pem and added as keys/default_ta.pem
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU, FVP) Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform) Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU platform) Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey)
show more ...
|
| #
fbecf4ee |
| 16-Apr-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
Add sparse support [C=1]
Adds support to check source files with sparse when C=1 on the command line. Only files that are recompiled are checked.
Note that sparse isn't very useful at this stage si
Add sparse support [C=1]
Adds support to check source files with sparse when C=1 on the command line. Only files that are recompiled are checked.
Note that sparse isn't very useful at this stage since the source code need changes to be more sparse friendly.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| #
62428631 |
| 29-Apr-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
build: add support for make -s
Adds support for make -s to get a really silent build. This is useful to get a shorter travis build log.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Rev
build: add support for make -s
Adds support for make -s to get a really silent build. This is useful to get a shorter travis build log.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| #
1b4eb4f5 |
| 02-Feb-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
Separate compiler for core and user TA
Enables compilation with different compilers for core and user TA.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.w
Separate compiler for core and user TA
Enables compilation with different compilers for core and user TA.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU, FVP) Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
show more ...
|
| #
313ead47 |
| 22-Jan-2015 |
Jerome Forissier <jerome.forissier@linaro.org> |
mk/compile.mk: GNU make 4.0 compatibility
Fixes issue https://github.com/OP-TEE/optee_os/issues/179 (GNU make 4.0 rebuilds everything each time it is run).
GNU make 4.0 includes a fix for bug http:
mk/compile.mk: GNU make 4.0 compatibility
Fixes issue https://github.com/OP-TEE/optee_os/issues/179 (GNU make 4.0 rebuilds everything each time it is run).
GNU make 4.0 includes a fix for bug http://savannah.gnu.org/bugs/?16051 which breaks the C compilation rule in mk/compile.mk. Previous versions of make would not add the FORCE target to $?, whereas version 4.0 does. Therefore, one must explicitly exclude FORCE from $? to properly detect if dependencies have changed.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
show more ...
|
| #
6d6ea54c |
| 02-Dec-2014 |
Jens Wiklander <jens.wiklander@linaro.org> |
separate .rodata sections
Puts each .rodata in a file specific .rodata section
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
|
| #
d60c6803 |
| 03-Dec-2014 |
Pascal Brand <pascal.brand@st.com> |
Cosmetics fixes
Signed-off-by: Pascal Brand <pascal.brand@st.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
|
| #
fe52b1f5 |
| 06-Nov-2014 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: create conf.h from CFG_* Makefile variables
Simplify the use of makefile configuration variables from C code. With this patch, one can #include <generated/conf.h> instead of adding CPP flags d
core: create conf.h from CFG_* Makefile variables
Simplify the use of makefile configuration variables from C code. With this patch, one can #include <generated/conf.h> instead of adding CPP flags definitions to the .mk files.
- CFG_* variables that are set to 'y' are converted to: #define CFG_FOO 1 - Undefined variables, or variables set to 'n' remain undefined in conf.h - CFG_* variables with any other value are output unchanged
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
show more ...
|