Merge "feat(bl): add interface to query TF-A semantic ver" into integration

This commit is contained in:
Madhukar Pappireddy 2022-08-11 18:02:30 +02:00 committed by TrustedFirmware Code Review
commit 8f23476e39
5 changed files with 16 additions and 3 deletions

View file

@ -9,6 +9,7 @@
#
VERSION_MAJOR := 2
VERSION_MINOR := 7
VERSION := ${VERSION_MAJOR}.${VERSION_MINOR}
# Default goal is build all images
.DEFAULT_GOAL := all
@ -322,7 +323,7 @@ endif
ifeq (${BUILD_STRING},)
BUILD_STRING := $(shell git describe --always --dirty --tags 2> /dev/null)
endif
VERSION_STRING := v${VERSION_MAJOR}.${VERSION_MINOR}(${BUILD_TYPE}):${BUILD_STRING}
VERSION_STRING := v${VERSION}(${BUILD_TYPE}):${BUILD_STRING}
ifeq (${AARCH32_INSTRUCTION_SET},A32)
TF_CFLAGS_aarch32 += -marm

View file

@ -269,3 +269,12 @@ void print_entry_point_info(const entry_point_info_t *ep_info)
#endif
#undef PRINT_IMAGE_ARG
}
/*
* This function is for returning the TF-A version
*/
const char *get_version(void)
{
extern const char version[];
return version;
}

View file

@ -178,6 +178,7 @@ void dyn_disable_auth(void);
extern const char build_message[];
extern const char version_string[];
const char *get_version(void);
void print_entry_point_info(const entry_point_info_t *ep_info);
uintptr_t page_align(uintptr_t value, unsigned dir);

View file

@ -499,7 +499,8 @@ ifdef MAKE_BUILD_STRINGS
$(call MAKE_BUILD_STRINGS, $(BUILD_DIR)/build_message.o)
else
@echo 'const char build_message[] = "Built : "$(BUILD_MESSAGE_TIMESTAMP); \
const char version_string[] = "${VERSION_STRING}";' | \
const char version_string[] = "${VERSION_STRING}"; \
const char version[] = "${VERSION}";' | \
$$(CC) $$(TF_CFLAGS) $$(CFLAGS) -xc -c - -o $(BUILD_DIR)/build_message.o
endif
ifneq ($(findstring armlink,$(notdir $(LD))),)

View file

@ -1,5 +1,5 @@
#
# Copyright (c) 2016-2020, ARM Limited and Contributors. All rights reserved.
# Copyright (c) 2016-2022, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@ -81,6 +81,7 @@ BUILD_STRING ?= development build
# by defining the MAKE_BUILD_STRINGS macro.
BUILT_TIME_DATE_STRING = const char build_message[] = "Built : "${BUILD_MESSAGE_TIMESTAMP};
VERSION_STRING_MESSAGE = const char version_string[] = "${VERSION_STRING}";
const char version[] = "${VERSION}";
define MAKE_BUILD_STRINGS
@echo $$(BUILT_TIME_DATE_STRING) $$(VERSION_STRING_MESSAGE) | \
$$(CC) $$(TF_CFLAGS) $$(CFLAGS) -x c -c - -o $1