mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 09:34:18 +00:00
feat(bl): add interface to query TF-A semantic ver
Adding interface for stand-alone semantic version of TF-A for exporting to RSS attestation, and potentially other areas as well. Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com> Change-Id: Ib4a2c47aa1e42a3b850185e674c90708a05cda53
This commit is contained in:
parent
1d867c14cb
commit
dddf4283b0
5 changed files with 16 additions and 3 deletions
3
Makefile
3
Makefile
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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))),)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue