meta-st-stm32mp/recipes-bsp/trusted-firmware-a/tf-a-stm32mp/0001-correct-DTC-version-de...

27 lines
1002 B
Diff

From a9163bb270c27524c36cfc216ddb61169a7ccef8 Mon Sep 17 00:00:00 2001
From: Christophe Priouzeau <christophe.priouzeau@foss.st.com>
Date: Fri, 29 Apr 2022 16:57:28 +0200
Subject: [PATCH] correct DTC version detection
Signed-off-by: Christophe Priouzeau <christophe.priouzeau@foss.st.com>
---
plat/st/stm32mp1/platform.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plat/st/stm32mp1/platform.mk b/plat/st/stm32mp1/platform.mk
index 55acd6742..2db7b506c 100644
--- a/plat/st/stm32mp1/platform.mk
+++ b/plat/st/stm32mp1/platform.mk
@@ -109,7 +109,7 @@ endif
endif
$(eval DTC_V = $(shell $(DTC) -v | awk '{print $$NF}'))
-$(eval DTC_VERSION = $(shell printf "%d" $(shell echo ${DTC_V} | cut -d- -f1 | sed "s/\./0/g")))
+$(eval DTC_VERSION = $(shell printf "%d" $(shell echo ${DTC_V} | cut -d- -f1 | sed "s/\./0/g" | grep -o [0-9]*)))
DTC_CPPFLAGS += ${INCLUDES}
DTC_FLAGS += -Wno-unit_address_vs_reg
ifeq ($(shell test $(DTC_VERSION) -ge 10601; echo $$?),0)
--
2.25.1