History log of /optee_os/Makefile (Results 1 – 25 of 37)
Revision Date Author Comments
# 8d541aee 19-Oct-2023 Joakim Bech <joakim.bech@linaro.org>

scripts: Add script to support Language Server Protocol (LSP)

The Language Server Protocol (LSP) is a standard protocol used by many
text editors and integrated development environments (IDEs) to en

scripts: Add script to support Language Server Protocol (LSP)

The Language Server Protocol (LSP) is a standard protocol used by many
text editors and integrated development environments (IDEs) to enable
advanced language features such as code completion, hover information,
and diagnostics.

This commit introduces a script that simplifies the generation of LSP
configuration JSON files. These JSON files describe how source files are
compiled and linked together for use with LSP-enabled tools. The script
is adapted from U-Boot and customized to work with the *.cmd files used
by OP-TEE, making it easier to harness the power of LSP for development
and code analysis.

Signed-off-by: Joakim Bech <joakim.bech@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 5831e426 31-May-2023 Jens Wiklander <jens.wiklander@linaro.org>

Move mv-if-changed() into mk/macros.mk

Moves the make macro mv-if-changed() into mk/macros.mk to allow use of
it in the TA devkit.

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed

Move mv-if-changed() into mk/macros.mk

Moves the make macro mv-if-changed() into mk/macros.mk to allow use of
it in the TA devkit.

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 92166431 27-Jun-2023 Jerome Forissier <jerome.forissier@linaro.org>

qemu_armv8a: fix build with CFG_USER_TA_TARGETS=ta_arm32

The proper way to build in-tree TAs in 64-bit mode by default is to set
supported-ta-targets to "ta_arm64 ta_arm32". Indeed, the default targ

qemu_armv8a: fix build with CFG_USER_TA_TARGETS=ta_arm32

The proper way to build in-tree TAs in 64-bit mode by default is to set
supported-ta-targets to "ta_arm64 ta_arm32". Indeed, the default target
is always defined as the first entry in supported-ta-targets, as
documented in mk/config.mk.

Fixes the following build error:

$ make CFG_USER_TA_TARGETS=ta_arm32 PLATFORM=vexpress-qemu_armv8a
bash: -W: invalid option
...

default-user-ta-target is not to be used by the platform configuration
files. It is meant to be set by the main Makefile. For this reason,
replace the conditional assignment (?=) with $(call force, ...) in order
to catch inconsistencies in a more friendly way.

Fixes: 07031b23de23 ("qemu_armv8a: set default-user-ta-target ?= ta_arm64")
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 2c20168b 29-Mar-2022 Balsam CHIHI <bchihi@baylibre.com>

config: add CFG_BUILD_IN_TREE_TA flag

This flag allows us to enable or disable building "User TAs".
By disabling "User TAs" we could build "TA_DEV_KIT" without
building TAs present in optee-os proje

config: add CFG_BUILD_IN_TREE_TA flag

This flag allows us to enable or disable building "User TAs".
By disabling "User TAs" we could build "TA_DEV_KIT" without
building TAs present in optee-os project under ta/*/user_ta.mk.

Signed-off-by: Julien Masson <jmasson@baylibre.com>
Signed-off-by: Balsam CHIHI <bchihi@baylibre.com>
Signed-off-by: Safae Ouajih <souajih@baylibre.com>
Reviewed-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 ...


# 023aecc6 28-Mar-2022 Jens Wiklander <jens.wiklander@linaro.org>

cscope: exclude generated .ld.S files

The generated .ld.S files contains nothing worth indexing with cscope. The
generated *_unpaged.ld.S and *_init.ld.S are especially unfriendly as
they adds lots

cscope: exclude generated .ld.S files

The generated .ld.S files contains nothing worth indexing with cscope. The
generated *_unpaged.ld.S and *_init.ld.S are especially unfriendly as
they adds lots of false positive matches for cscope. Fix this by
excluding all the generated .ld.S files.

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 8a926867 27-Dec-2021 Marouene Boubakri <marouene.boubakri@nxp.com>

Makefile: allow building for a new target architecture

To be able to build for a new architecture, do not force ARCH to arm.
Instead, set it as default value.

Signed-off-by: Marouene Boubakri <maro

Makefile: allow building for a new target architecture

To be able to build for a new architecture, do not force ARCH to arm.
Instead, set it as default value.

Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jerome Forissier <jerome@forissier.org>

show more ...


# ef81a821 01-Oct-2020 Jerome Forissier <jerome@forissier.org>

Makefile: sort in-tree TAs in lexical order

The Makefile function $(wildcard ...) may return matching files in any
order. Therefore the "make" command is not guaranteed to always produce
the same se

Makefile: sort in-tree TAs in lexical order

The Makefile function $(wildcard ...) may return matching files in any
order. Therefore the "make" command is not guaranteed to always produce
the same sequence of commands when building the in-tree TAs. This could
be inconvenient when troubleshooting build errors in different
environments for instance.
In order to produce predictable builds, sort the in-tree TA makefiles in
lexical order.

Suggested-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Jerome Forissier <jerome@forissier.org>

show more ...


# a7ec3d4c 14-Apr-2020 Rouven Czerwinski <r.czerwinski@pengutronix.de>

Makefile: use plain bash for SHELL

Some linux distributions do not provide bash at the /bin/bash location,
use bash directly and expect the user to setup a proper $PATH.

Signed-off-by: Rouven Czerw

Makefile: use plain bash for SHELL

Some linux distributions do not provide bash at the /bin/bash location,
use bash directly and expect the user to setup a proper $PATH.

Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 6363325c 19-Sep-2019 Jerome Forissier <jerome@forissier.org>

Makefile: add .DELETE_ON_ERROR

Adds the special recipe .DELETE_ON_ERROR. As per the GNU make
documentation:

.DELETE_ON_ERROR

If .DELETE_ON_ERROR is mentioned as a target anywhere in the
makefil

Makefile: add .DELETE_ON_ERROR

Adds the special recipe .DELETE_ON_ERROR. As per the GNU make
documentation:

.DELETE_ON_ERROR

If .DELETE_ON_ERROR is mentioned as a target anywhere in the
makefile, then make will delete the target of a rule if it has
changed and its recipe exits with a nonzero exit status, just as it
does when it receives a signal.
[...]
This is almost always what you want make to do, but it is not
historical practice; so for compatibility, you must explicitly
request it.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 38f4260c 17-Sep-2019 Jerome Forissier <jerome@forissier.org>

TA dev kit: Clang support

Updates ta/mk/ta_dev_kit.mk and other makefiles so that the COMPILER
variable can be used when building TAs: make COMPILER=clang ...

Signed-off-by: Jerome Forissier <jerom

TA dev kit: Clang support

Updates ta/mk/ta_dev_kit.mk and other makefiles so that the COMPILER
variable can be used when building TAs: make COMPILER=clang ...

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 7509ff7c 23-May-2019 Jens Wiklander <jens.wiklander@linaro.org>

Add user mode ELF loader

Adds ldelf which loads user mode TAs while in user mode. The TA ELF file is
loaded and relocated by ldelf before the TA can be executed.

Reviewed-by: Jerome Forissier <jero

Add user mode ELF loader

Adds ldelf which loads user mode TAs while in user mode. The TA ELF file is
loaded and relocated by ldelf before the TA can be executed.

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# c9727be6 08-Jan-2019 Jerome Forissier <jerome.forissier@linaro.org>

cscope: do not exclude generated files

The build directory contains some generated source files, such as
include/generated/conf.h, core/include/generated/arm32_sysreg.{h,S} and
core/include/generate

cscope: do not exclude generated files

The build directory contains some generated source files, such as
include/generated/conf.h, core/include/generated/arm32_sysreg.{h,S} and
core/include/generated/asm-defines.h. Let cscope parse them and only
exclude the files that are copied into the export-ta_* directories (TA
dev kit).

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# dc701d99 14-Dec-2018 Jerome Forissier <jerome.forissier@linaro.org>

Introduce CFG_USER_TA_TARGETS to select user mode architecture(s)

This change introduces CFG_USER_TA_TARGETS to allow the configuration
directives to select the architectures for which userspace TA

Introduce CFG_USER_TA_TARGETS to select user mode architecture(s)

This change introduces CFG_USER_TA_TARGETS to allow the configuration
directives to select the architectures for which userspace TA and TA
libraries shall be built. The only use case for the moment is to be able
to build only 32 or 64-bit libraries and TAs when the platform would
otherwise support both 32 and 64-bit. See the example below.

If CFG_USER_TA_TARGETS is undefined or empty, all the architectures
supported by the platform are built.

If CFG_USER_TA_TARGETS contains an unsupported value, the build will
report an error.

Examples:

$ make PLATFORM=hikey CFG_ARM64_core=y
# Builds both 32 and 64-bit userspace
$ make PLATFORM=hikey CFG_ARM64_core=y \
CFG_USER_TA_TARGETS="ta_arm32 ta_arm64"
# Same as above
$ make PLATFORM=hikey CFG_ARM64_core=y CFG_USER_TA_TARGETS=ta_arm32
# Builds only 32-bit userspace

Suggested-by: Etienne Carriere <etienne.carriere@linaro.org>
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 ...


# fcf09d24 25-Oct-2018 Markus S. Wamser <markus.wamser@mixed-mode.de>

Add checkpatch targets to Makefile

+ added target for calling checkpatch on working and staging area
+ added documentation for targets in Readme

Signed-off-by: Markus S. Wamser <markus.wamser@mixed

Add checkpatch targets to Makefile

+ added target for calling checkpatch on working and staging area
+ added documentation for targets in Readme

Signed-off-by: Markus S. Wamser <markus.wamser@mixed-mode.de>
Reviewed-by: Jerome Forissier <jerome.forissier@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 ...


# c0b2e931 03-Feb-2018 Victor Chong <victor.chong@linaro.org>

Force ARCH to arm

It is the only value used for now. No other value works, not even
aarch64.

Signed-off-by: Victor Chong <victor.chong@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@li

Force ARCH to arm

It is the only value used for now. No other value works, not even
aarch64.

Signed-off-by: Victor Chong <victor.chong@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>

show more ...


# 8a0dd845 31-Jan-2018 Jens Wiklander <jens.wiklander@linaro.org>

cscope: skip in tree out directory

By default if nothing is specified OP-TEE is built keeping the output under
the directory "out" in the source tree. With this patch the cscope database
will not in

cscope: skip in tree out directory

By default if nothing is specified OP-TEE is built keeping the output under
the directory "out" in the source tree. With this patch the cscope database
will not include those files.

Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# bc0d2712 25-Oct-2017 Jerome Forissier <jerome.forissier@linaro.org>

make clean: split file list into manageable chunks

"make clean" might fail with the following error:

make[2]: execvp: /bin/bash: Argument list too long

This error was observed on a platform that

make clean: split file list into manageable chunks

"make clean" might fail with the following error:

make[2]: execvp: /bin/bash: Argument list too long

This error was observed on a platform that has lots of additional
source files compared to upstream (drivers, etc.), and that sets a long
output path on the command line (make ... O=/some/long/path).

Fix the error by splitting the file list into more manageable chunks.
Note that removing one file at a time is not reasonable, because
spawning too may shells takes quite a long time (up to 7-10 seconds to
"make clean").

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reported-by: Lijianhui <airbak.li@hisilicon.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 30a44336 07-Feb-2017 Jerome Forissier <jerome.forissier@linaro.org>

make clean: don't fail on non-empty directory

"make clean" may report errors when trying to clean with different
configuration values than the ones used during the build. For instance:

$ make -s CF

make clean: don't fail on non-empty directory

"make clean" may report errors when trying to clean with different
configuration values than the ones used during the build. For instance:

$ make -s CFG_RPMB_FS=y
$ make clean
CLEAN out/arm-plat-vexpress
rmdir: failed to remove 'out/arm-plat-vexpress/core/tee': Directory not empty
rmdir: failed to remove 'out/arm-plat-vexpress/core': Directory not empty
rmdir: failed to remove 'out/arm-plat-vexpress': Directory not empty
Makefile:88: recipe for target 'clean' failed
make: *** [clean] Error 1

The clean command should not fail, since the build tree was properly
cleaned for the requested configuration. Fix this by using
'rmdir --ignore-fail-on-non-empty'.

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 ...


# 9ac870c9 06-Jan-2017 Jerome Forissier <jerome.forissier@linaro.org>

Make sure "make clean" removes everything "make" has created under $(O)

"make clean" would leave behind some files and many directories. Fix
this by correctly tracking the files and directories crea

Make sure "make clean" removes everything "make" has created under $(O)

"make clean" would leave behind some files and many directories. Fix
this by correctly tracking the files and directories created under $(O)
during the build process:
- Fix incorrect file names in $(cleanfiles) and add a few missing
ones.
- Introduce a makefile macro: $(cleandirs-for-rmdir), defined in a new
file: mk/cleandirs.mk. It returns the list of directories that should
be removed, given a list of files.
The clean target removes the files, then all the directories in depth-
first order. $(O) is also removed, if found to be empty.

Note that a more straightforward approach was discussed in [1]: use
"rm -rf $(O)/some_dir" and get rid of the whole file and directory
tracking via $(cleanfiles) and $(cleandirs). Although it was agreed it
would be safe, doing so would necessarily break the backward
compatibility for build scripts relying on "make O=<some path>", due to
the additional level ($(O)/some_dir).

Finally, mk/cleandirs.mk is exported to the TA dev kit and the clean
rule for the TAs is updated.

[1] https://github.com/OP-TEE/optee_os/pull/1270

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Andy Green <andy@warmcat.com>

show more ...


# 80b563f5 02-Dec-2016 Jerome Forissier <jerome.forissier@linaro.org>

Makefile: unexport MAKEFILE_LIST to reduce the size of the environment

To avoid issues [1] with some projects that call us from a top-level
Makefile that has an 'export' directive or a '.EXPORT_ALL_

Makefile: unexport MAKEFILE_LIST to reduce the size of the environment

To avoid issues [1] with some projects that call us from a top-level
Makefile that has an 'export' directive or a '.EXPORT_ALL_VARIABLES:'
target, we prevent $(MAKEFILE_LIST) from being exported, thereby
greatly reducing the size of the environment.

[1] Typically, the build succeeds the first time (because there is no
.cmd/.d files yet), then the second invocation of make fails with:

CHK out/arm-plat-vexpress/conf.mk
make[3]: execvp: /bin/bash: Argument list too long

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Tested-by: Zeng Tao <prime.zeng@hisilicon.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 9fc53171 23-Aug-2016 Jerome Forissier <jerome.forissier@linaro.org>

Fix invalid default value of $(PLATFORM_FLAVOR)

Fixes the following error:

$ make -s PLATFORM=stm
core/arch/arm/plat-stm/system_config.mk:20:
*** PLATFORM_FLAVOR=qemu_virt is not supporte

Fix invalid default value of $(PLATFORM_FLAVOR)

Fixes the following error:

$ make -s PLATFORM=stm
core/arch/arm/plat-stm/system_config.mk:20:
*** PLATFORM_FLAVOR=qemu_virt is not supported. Stop.

(one would expect PLATFORM_FLAVOR to default to 'orly2').
This patch does the following:

- Do not set "PLATFORM_FLAVOR ?= qemu_virt" in the main Makefile. The
default value for PLATFORM_FLAVOR has to be defined by each platform in
plat-*/conf.mk.
- Consistent with the above, "PLATFORM_FLAVOR_$(PLATFORM_FLAVOR) := y"
is moved to core/core.mk, after $(platform-dir)/conf.mk has been
included, i.e., where $(PLATFORM_FLAVOR) can be relied upon.
- All definitions of "PLATFORM_FLAVOR_$(PLATFORM_FLAVOR) := y"
are removed from platform files, since it is already taken care of in
core/core.mk.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 5ef74e73 06-Aug-2016 Jerome Forissier <jerome.forissier@linaro.org>

Simplify platform testing macros

Update the main Makefile so that PLATFORM_$(PLATFORM) and
PLATFORM_FLAVOR_$(PLATFORM_FLAVOR) are set to 'y', and add these
variables to the export list for the gener

Simplify platform testing macros

Update the main Makefile so that PLATFORM_$(PLATFORM) and
PLATFORM_FLAVOR_$(PLATFORM_FLAVOR) are set to 'y', and add these
variables to the export list for the generation of conf.h.

As a result, the definition of numerical flavor identifiers in the
multiple platform_config.h files is not needed anymore, and we can also
get rid of the PLATFORM_FLAVOR_IS() test macro. Instead, replace all
occurrences of '#if PLATFORM_FLAVOR_IS(foo)' with
'#if defined(PLATFORM_FLAVOR_foo)'.

This makes it possible to test the platform and not only the flavor in
any source file, so drop the manual definition of PLATFORM_hikey.

Finally, remove the definitions of platform_$(PLATFORM) and
platform_flavor_$(PLATFORM_FLAVOR) from core/core.mk since they are not
used.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: David Brown <david.brown@linaro.org>

show more ...


# 6fbac37e 05-Nov-2015 Jens Wiklander <jens.wiklander@linaro.org>

Minimal OP-TEE without user TAs

Hide all user TA related code under CFG_WITH_USER_TA. When compiled
with:
CFG_WITH_USER_TA=n
CFG_CRYPTO=n
CFG_ENC_FS=n
CFG_SE_API=n
CFG_PCSC_PASSTHRU_READER_DRV=n

Sk

Minimal OP-TEE without user TAs

Hide all user TA related code under CFG_WITH_USER_TA. When compiled
with:
CFG_WITH_USER_TA=n
CFG_CRYPTO=n
CFG_ENC_FS=n
CFG_SE_API=n
CFG_PCSC_PASSTHRU_READER_DRV=n

Skips building in static TA tests for features not enabled.

The size of OP-TEE is reduced to one third of its original size.

Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU xtest 1001)
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# bc33bbd9 11-Nov-2015 Jens Wiklander <jens.wiklander@linaro.org>

Add support to generate multiple TA dev kits

Adds support to generate multiple TA dev kits, one for each word in the
variable "ta-targets". ta/ta.mk is included once for each word in
"ta-targets" wi

Add support to generate multiple TA dev kits

Adds support to generate multiple TA dev kits, one for each word in the
variable "ta-targets". ta/ta.mk is included once for each word in
"ta-targets" with the word assigned to "ta-target". This word is the
assigned the variable "sm" to allow each "ta-target" to be built as a
separate sub-module.

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


12