Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TA makefile updates #740

Merged
merged 3 commits into from
Apr 22, 2024
Merged

Conversation

jforissier
Copy link
Contributor

No description provided.

Rename ta/Makefile to ta/Makefile.gmake and create a symbolic link
Makefile -> Makefile.gmake. The purpose is to work around an issue with
the OP-TEE build system [1] which uses Buildroot and CMake to build
optee_test. While doing so it overwrites ta/Makefile with Buildroot's
own Makefile. This change makes sure the makefile is preserved and the
build system can use $(MAKE) -f path/to/opte_test/ta/Makefile.gmake to
build all the TAs at once instead of manually enumerating them [2] which
is both inelegant and fragile.

Link: https://github.com/OP-TEE/build/ [1]
Link: https://github.com/OP-TEE/build/blob/4.2.0/br-ext/package/optee_test_ext/optee_test_ext.mk#L31-L38 [2]
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
define add-ta-target
.PHONY: ta-$(1)
ta-$(1):
$$(MAKE) -C $(1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$(MAKE) should be enough, since we don't expect that to change.
Isn't out-dir missing?

@jforissier
Copy link
Contributor Author

Update

Copy link
Contributor

@jenswi-linaro jenswi-linaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

Replace the foreach loop in the ta target with dependencies on multiple
targets (one for each TA). As a result, "make -j$(nproc) ta" will now
build TAs in parallel rather than doing one after another. The O=
parameter is removed because we should not override what the caller may
give.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Add the GlobalPlatform Test Suite TAs to the build when GP_PACKAGE is
set. This happens in the OP-TEE build environment [1], which still handles
the package extraction step as well as the final installation of the TAs
into the staging directory.

Link: https://github.com/OP-TEE/build/blob/4.2.0/br-ext/package/optee_test_ext/optee_test_ext.mk [1]
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
@jforissier jforissier merged commit 8a31d08 into OP-TEE:master Apr 22, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants