Skip to content

mk: make the dev kit configuration available while Android.mk is parsed - #13

Merged
lorc merged 2 commits into
xen-troops:renesas/rcar-gen5_4.4.0-android-xtfrom
andrew2311:rcar-gen5_4.4.0-xt-android
Aug 6, 2026
Merged

mk: make the dev kit configuration available while Android.mk is parsed#13
lorc merged 2 commits into
xen-troops:renesas/rcar-gen5_4.4.0-android-xtfrom
andrew2311:rcar-gen5_4.4.0-xt-android

Conversation

@andrew2311

@andrew2311 andrew2311 commented Aug 3, 2026

Copy link
Copy Markdown

Fix xtest link error in android (by exposing optee_os dev kit conf.mk)

Backport my 2 commits from optee_os master
Original PR OP-TEE#7897

@andrew2311
andrew2311 force-pushed the rcar-gen5_4.4.0-xt-android branch from 70825ed to 9dd3591 Compare August 3, 2026 12:35
@andrew2311
andrew2311 marked this pull request as draft August 3, 2026 15:47
@andrew2311
andrew2311 force-pushed the rcar-gen5_4.4.0-xt-android branch from 9dd3591 to e8fa4ba Compare August 6, 2026 12:51
@andrew2311
andrew2311 marked this pull request as ready for review August 6, 2026 12:53
Andrii Shtompel added 2 commits August 6, 2026 14:58
Add ta_dev_kit_conf, which exports conf.h, conf.mk and conf.cmake. They are
written by plain shell commands, so this target compiles nothing and
completes in about a second, unlike ta_dev_kit, which builds the libraries
too.

It is meant for dev kit consumers that need the configuration before they
can build anything: optee_test picks its sources from the CFG_* flags it
reads from the dev kit conf.mk, and some build systems have to know their
sources before any rule can run.

Signed-off-by: Andrii Shtompel <andrii_shtompel@epam.com>
Reviewed-by: Jerome Forissier <jerome.forissier@arm.com>
Acked-by: Tadd Kao <tadd.kao@mediatek.com>

(cherry picked from commit 6f806bb)
Run ta_dev_kit_conf while the makefiles are parsed, so that the
configuration is on disk before any Android.mk is read; building the dev
kit itself is left to the graph as before. The MD5 of the generated
conf.mk is kept in a variable so that ckati parses again when the
configuration changes, even though it comes from files ckati never reads
itself. All optee_os invocations now share one command line, so the
configuration read while parsing cannot drift from the one the dev kit is
built with.

This is for the Android.mk files which select what to build from the CFG_
flags of the dev kit, as optee_test does for its GP socket tests. They
read them with -include $(TA_DEV_KIT_DIR)/host_include/conf.mk, which
finds nothing on a clean build: ckati parses the makefiles to emit the
ninja graph, and the dev kit is built by that very graph. The flags then
come out empty and the sources they select are dropped with no
diagnostic, so what ends up in the binary depends on whether the output
directory is warm. No build dependency can fix this, as the parsing is
what produces the rules.

Signed-off-by: Andrii Shtompel <andrii_shtompel@epam.com>
Reviewed-by: Jerome Forissier <jerome.forissier@arm.com>
Acked-by: Tadd Kao <tadd.kao@mediatek.com>

(cherry picked from commit a2646d3)
@andrew2311
andrew2311 force-pushed the rcar-gen5_4.4.0-xt-android branch from e8fa4ba to 8ae1a55 Compare August 6, 2026 13:01
@lorc
lorc merged commit 591fa9e into xen-troops:renesas/rcar-gen5_4.4.0-android-xt Aug 6, 2026
1 of 9 checks 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.

2 participants