From 857345496bf1d4870320e856ae75104e166d78d1 Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Sat, 20 May 2023 21:43:39 +0200 Subject: [PATCH] tfa-layerscape: fix fiptool's build A missing '\' caused the remaining parameters not to be passed to make. This fixes the following error: | gcc -c [...] fiptool.c -o fiptool.o | In file included from fiptool.h:16, | from fiptool.c:19: |fiptool_platform.h:19:11: fatal error: openssl/sha.h: No such file or directory | 19 | # include | | ^~~~~~~~~~~~~~~ |compilation terminated. |make[3]: *** [Makefile:58: fiptool.o] Error 1 as the HOST_CFLAGS are no longer passed. then, HOST_CFLAGS is specified as a command argument, this is a specific problem of our built since appending these needs the override directive. Fixes: df28bfe03247 ("tfa-layerscape: Change to github and use the latest tag") Signed-off-by: Christian Lamparter --- package/boot/tfa-layerscape/Makefile | 2 +- .../patches/001-fiptool-hostbuild-fixes.patch | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/package/boot/tfa-layerscape/Makefile b/package/boot/tfa-layerscape/Makefile index c1ef217f47..3509658869 100644 --- a/package/boot/tfa-layerscape/Makefile +++ b/package/boot/tfa-layerscape/Makefile @@ -25,7 +25,7 @@ HOST_CFLAGS += -Wall -Werror -pedantic -std=c99 define Host/Compile $(MAKE) -C \ $(HOST_BUILD_DIR)/tools/fiptool \ - PLAT_FIPTOOL_HELPER_MK="$(HOST_BUILD_DIR)/tools/nxp/plat_fiptool/plat_fiptool.mk" + PLAT_FIPTOOL_HELPER_MK="$(HOST_BUILD_DIR)/tools/nxp/plat_fiptool/plat_fiptool.mk" \ CFLAGS="$(HOST_CFLAGS)" \ LDFLAGS="$(HOST_LDFLAGS)" \ HOSTCCFLAGS="$(HOST_CFLAGS)" diff --git a/package/boot/tfa-layerscape/patches/001-fiptool-hostbuild-fixes.patch b/package/boot/tfa-layerscape/patches/001-fiptool-hostbuild-fixes.patch index 8e7375cfa2..50ce6528d7 100644 --- a/package/boot/tfa-layerscape/patches/001-fiptool-hostbuild-fixes.patch +++ b/package/boot/tfa-layerscape/patches/001-fiptool-hostbuild-fixes.patch @@ -88,3 +88,19 @@ @${ECHO_BLANK_LINE} @echo "Built $@ successfully" @${ECHO_BLANK_LINE} +--- a/tools/nxp/plat_fiptool/plat_fiptool.mk 2023-05-20 22:28:28.079945619 +0200 ++++ b/tools/nxp/plat_fiptool/plat_fiptool.mk 2023-05-20 22:26:59.443307771 +0200 +@@ -22,11 +22,11 @@ INCLUDE_PATHS += -I${PLAT_DEF_UUID_OID_C + $(shell rm ${PLAT_DEF_UUID_CONFIG_FILE_PATH}/${PLAT_DEF_UUID_CONFIG_FILE_NAME}.o) + + ifeq (${PLAT_DEF_OID},yes) +-HOSTCCFLAGS += -DPLAT_DEF_OID ++override HOSTCCFLAGS += -DPLAT_DEF_OID + endif + + ifeq (${PLAT_DEF_UUID},yes) +-HOSTCCFLAGS += -DPLAT_DEF_FIP_UUID ++override HOSTCCFLAGS += -DPLAT_DEF_FIP_UUID + PLAT_OBJECTS += ${PLAT_DEF_UUID_CONFIG_FILE_PATH}/${PLAT_DEF_UUID_CONFIG_FILE_NAME}.o + endif + -- 2.30.2