diff options
author | Petr Štetiar <ynezz@true.cz> | 2019-07-24 14:00:39 +0000 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2019-07-27 07:13:59 +0200 |
commit | 94e9084e1ee586fed993896c71a4327518987152 (patch) | |
tree | 05274fe5c7f45ab76c6e03f5fcac83a06d4ba376 /package/boot/tfa-layerscape/patches | |
parent | 0a64b70e4e95d585df3ef79d04cc6e48c8919d7c (diff) | |
download | upstream-94e9084e1ee586fed993896c71a4327518987152.tar.gz upstream-94e9084e1ee586fed993896c71a4327518987152.tar.bz2 upstream-94e9084e1ee586fed993896c71a4327518987152.zip |
tfa-layerscape: fix fiptool host build
fiptool is a host tool, used in a firmware generation pipeline, but it's
not treated as such, leading to the build breakage on the hosts which
don't have {Open,Libre}SSL dev package installed:
In file included from fiptool.h:16:0,
from fiptool.c:19:
fiptool_platform.h:18:27: fatal error: openssl/sha.h:
No such file or directory
# include <openssl/sha.h>
So this patch promotes fiptool into the host tool with proper host
include and library paths under STAGING_DIR.
Ref: https://github.com/openwrt/openwrt/pull/2267
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit b8249cef9fedb1e2e3ed4f1b16382c6815e08df1)
Diffstat (limited to 'package/boot/tfa-layerscape/patches')
-rw-r--r-- | package/boot/tfa-layerscape/patches/001-fiptool-hostbuild-fixes.patch | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/package/boot/tfa-layerscape/patches/001-fiptool-hostbuild-fixes.patch b/package/boot/tfa-layerscape/patches/001-fiptool-hostbuild-fixes.patch new file mode 100644 index 0000000000..0567e5869b --- /dev/null +++ b/package/boot/tfa-layerscape/patches/001-fiptool-hostbuild-fixes.patch @@ -0,0 +1,71 @@ +--- a/Makefile ++++ b/Makefile +@@ -448,10 +448,6 @@ endif + CRTTOOLPATH ?= tools/cert_create + CRTTOOL ?= ${CRTTOOLPATH}/cert_create${BIN_EXT} + +-# Variables for use with Firmware Image Package +-FIPTOOLPATH ?= tools/fiptool +-FIPTOOL ?= ${FIPTOOLPATH}/fiptool${BIN_EXT} +- + ################################################################################ + # Include BL specific makefiles + ################################################################################ +@@ -661,14 +657,12 @@ endif + clean: + @echo " CLEAN" + $(call SHELL_REMOVE_DIR,${BUILD_PLAT}) +- ${Q}${MAKE} --no-print-directory -C ${FIPTOOLPATH} clean + ${Q}${MAKE} PLAT=${PLAT} --no-print-directory -C ${CRTTOOLPATH} clean + + realclean distclean: + @echo " REALCLEAN" + $(call SHELL_REMOVE_DIR,${BUILD_BASE}) + $(call SHELL_DELETE_ALL, ${CURDIR}/cscope.*) +- ${Q}${MAKE} --no-print-directory -C ${FIPTOOLPATH} clean + ${Q}${MAKE} PLAT=${PLAT} --no-print-directory -C ${CRTTOOLPATH} clean + + checkcodebase: locate-checkpatch +@@ -717,7 +711,7 @@ certificates: ${CRT_DEPS} ${CRTTOOL} + @${ECHO_BLANK_LINE} + endif + +-${BUILD_PLAT}/${FIP_NAME}: ${FIP_DEPS} ${FIPTOOL} ++${BUILD_PLAT}/${FIP_NAME}: ${FIP_DEPS} + ${Q}${FIPTOOL} create ${FIP_ARGS} $@ + ${Q}${FIPTOOL} info $@ + @${ECHO_BLANK_LINE} +@@ -733,21 +727,16 @@ fwu_certificates: ${FWU_CRT_DEPS} ${CRTT + @${ECHO_BLANK_LINE} + endif + +-${BUILD_PLAT}/${FWU_FIP_NAME}: ${FWU_FIP_DEPS} ${FIPTOOL} ++${BUILD_PLAT}/${FWU_FIP_NAME}: ${FWU_FIP_DEPS} + ${Q}${FIPTOOL} create ${FWU_FIP_ARGS} $@ + ${Q}${FIPTOOL} info $@ + @${ECHO_BLANK_LINE} + @echo "Built $@ successfully" + @${ECHO_BLANK_LINE} + +-fiptool: ${FIPTOOL} + fip: ${BUILD_PLAT}/${FIP_NAME} + fwu_fip: ${BUILD_PLAT}/${FWU_FIP_NAME} + +-.PHONY: ${FIPTOOL} +-${FIPTOOL}: +- ${Q}${MAKE} CPPFLAGS="-DVERSION='\"${VERSION_STRING}\"'" --no-print-directory -C ${FIPTOOLPATH} +- + cscope: + @echo " CSCOPE" + ${Q}find ${CURDIR} -name "*.[chsS]" > cscope.files +--- a/tools/fiptool/Makefile ++++ b/tools/fiptool/Makefile +@@ -37,7 +37,7 @@ all: ${PROJECT} fip_create + + ${PROJECT}: ${OBJECTS} Makefile + @echo " LD $@" +- ${Q}${HOSTCC} ${OBJECTS} -o $@ ${LDLIBS} ++ ${Q}${HOSTCC} ${OBJECTS} -o $@ ${LDLIBS} $(LDFLAGS) + @${ECHO_BLANK_LINE} + @echo "Built $@ successfully" + @${ECHO_BLANK_LINE} |