diff options
author | Jerome Forissier <jerome.forissier@linaro.org> | 2017-11-20 13:27:18 +0100 |
---|---|---|
committer | Jérôme Forissier <jerome.forissier@linaro.org> | 2017-11-22 16:39:27 +0100 |
commit | 29cff5cf09aa5a10c7242b398586235453954728 (patch) | |
tree | a27509b0ca55477a4d03a3e7fe6f531a75d5670f /mk/config.mk | |
parent | 3f9b05f6f300e95214cb4d3d0bc0bc550fa43d74 (diff) |
core: GET_OS_REVISION: return SHA1 of current Git commit
When processing an OPTEE_SMC_CALL_GET_OS_REVISION request, return the
abbreviated SHA1 of the current Git commit as the third parameter (a2).
If the SHA1 cannot be determined or CFG_OS_REV_REPORTS_GIT_SHA1 is
disabled, set a2 to zero meaning "not specified".
This allows the TEE driver to report more precise information about the
TEE at probe time.
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>
Diffstat (limited to 'mk/config.mk')
-rw-r--r-- | mk/config.mk | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mk/config.mk b/mk/config.mk index 3d66d931..d7a35eb8 100644 --- a/mk/config.mk +++ b/mk/config.mk @@ -92,8 +92,17 @@ CFG_TEE_API_VERSION ?= GPD-1.1-dev # Implementation description (implementation-dependent) CFG_TEE_IMPL_DESCR ?= OPTEE +# Should OPTEE_SMC_CALL_GET_OS_REVISION return a build identifier to Normal +# World? +CFG_OS_REV_REPORTS_GIT_SHA1 ?= y + # Trusted OS implementation version TEE_IMPL_VERSION ?= $(shell git describe --always --dirty=-dev 2>/dev/null || echo Unknown) +ifeq ($(CFG_OS_REV_REPORTS_GIT_SHA1),y) +TEE_IMPL_GIT_SHA1 := 0x$(shell git rev-parse --short=8 HEAD 2>/dev/null || echo 0) +else +TEE_IMPL_GIT_SHA1 := 0x0 +endif # The following values are not extracted from the "git describe" output because # we might be outside of a Git environment, or the tree may have been cloned # with limited depth not including any tag, so there is really no guarantee |