[PATCH 2/2] arm: k3: config.mk: Read software revision information from file on HS

Andrew Davis afd at ti.com
Fri Jul 15 18:38:54 CEST 2022

Read the swrv.txt file from the TI Security Development Tools when
TI_SECURE_DEVICE is enabled. This allows us to set our software
revision in one place and have it used by all the tools that create
TI x509 boot certificates.

Signed-off-by: Andrew Davis <afd at ti.com>
 arch/arm/mach-k3/config.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/mach-k3/config.mk b/arch/arm/mach-k3/config.mk
index 4feb57992d..9306f2627d 100644
--- a/arch/arm/mach-k3/config.mk
+++ b/arch/arm/mach-k3/config.mk
@@ -30,6 +30,14 @@ endif
 # X509 SWRV default
+# On HS use SECDEV provided software revision or warn if not available
+ifneq ($(wildcard $(TI_SECURE_DEV_PKG)/keys/swrv.txt),)
+SWRV= $(shell cat $(TI_SECURE_DEV_PKG)/keys/swrv.txt)
+$(warning "WARNING: Software revision file not found. Default may not work on HS hardware.")
 # tiboot3.bin is mandated by ROM and ROM only supports R5 boot.
 # So restrict tiboot3.bin creation for CPU_V7R.

More information about the U-Boot mailing list