From 429f10e3367748abd33b4f6f9ee362c0ba74dd95 Mon Sep 17 00:00:00 2001 From: Yann Gautier Date: Fri, 22 Apr 2022 13:12:37 +0200 Subject: [PATCH] fix(stm32mp1): correct dtc version check Depending on the shell used, the grep command can fail, leading to a wrong dtc version detection. Correct that by adding quotes. Signed-off-by: Yann Gautier Change-Id: I329ec929559c94bf1bf99b127662c9d978e067cf --- 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 a8905341d..9e679899f 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" | grep -o [0-9]*))) +$(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)