From 03d20776efc20a04a5191a4f39965079a4d60b3c Mon Sep 17 00:00:00 2001 From: Yann Gautier Date: Mon, 28 Mar 2022 13:37:01 +0200 Subject: [PATCH] fix(st): remove extra chars from dtc version In some implementations of dtc tool (e.g. with yocto), there can be a 'v' at the beginning of the version, and a '+' at the end. Just keep numbers then, with a grep -o. Signed-off-by: Yann Gautier Change-Id: I180e97ab75ba3e5ceacb4b1961a1f22788b428a3 --- 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 9e732d6b7..a8905341d 100644 --- a/plat/st/stm32mp1/platform.mk +++ b/plat/st/stm32mp1/platform.mk @@ -146,7 +146,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)