aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/tfa-layerscape/Makefile
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2019-07-24 14:00:39 +0000
committerPetr Štetiar <ynezz@true.cz>2019-07-25 07:48:10 +0200
commitb8249cef9fedb1e2e3ed4f1b16382c6815e08df1 (patch)
tree18b878e2e3d9e577e1fac00cbb91e559e945bce1 /package/boot/tfa-layerscape/Makefile
parentfe928c7a81810fd84210a5e9594b7fa8ce1064ce (diff)
downloadupstream-b8249cef9fedb1e2e3ed4f1b16382c6815e08df1.tar.gz
upstream-b8249cef9fedb1e2e3ed4f1b16382c6815e08df1.tar.bz2
upstream-b8249cef9fedb1e2e3ed4f1b16382c6815e08df1.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>
Diffstat (limited to 'package/boot/tfa-layerscape/Makefile')
-rw-r--r--package/boot/tfa-layerscape/Makefile19
1 files changed, 17 insertions, 2 deletions
diff --git a/package/boot/tfa-layerscape/Makefile b/package/boot/tfa-layerscape/Makefile
index 4f1c709fc6..8d62fbcf61 100644
--- a/package/boot/tfa-layerscape/Makefile
+++ b/package/boot/tfa-layerscape/Makefile
@@ -16,8 +16,9 @@ PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/at
PKG_SOURCE_VERSION:=7e34aebe658c7c3439d2d68b0ce6b9776e8e6996
PKG_MIRROR_HASH:=9cf0bc32fa589a0ee7c48c87898679e645341f29da1253d0ba5d2e82c6ea074d
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_BUILD_DEPENDS:=uboot-layerscape
+PKG_BUILD_DEPENDS:=uboot-layerscape tfa-layerscape/host
+include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
define Package/tfa-layerscape/Config
@@ -46,7 +47,20 @@ define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) CROSS_COMPILE=$(TARGET_CROSS) \
fip pbl PLAT=$(PLAT) BOOT_MODE=$(BOOT_MODE) \
RCW=$(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-rcw.bin \
- BL33=$(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-uboot.bin
+ BL33=$(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-uboot.bin \
+ FIPTOOL=$(STAGING_DIR_HOST)/bin/fiptool
+endef
+
+HOST_CFLAGS += -Wall -Werror -pedantic -std=c99
+define Host/Compile
+ $(MAKE) -C \
+ $(HOST_BUILD_DIR)/tools/fiptool \
+ CFLAGS="$(HOST_CFLAGS)" \
+ LDFLAGS="$(HOST_LDFLAGS)"
+endef
+
+define Host/Install
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/fiptool/fiptool $(STAGING_DIR_HOST)/bin/
endef
define Package/tfa-layerscape/ls1012ardb
@@ -132,6 +146,7 @@ TFAS := \
ls1088ardb-sdboot \
ls2088ardb
+$(eval $(call HostBuild))
$(foreach tfa,$(TFAS), \
$(eval $(Package/tfa-layerscape/$(tfa))) \
$(eval $(call Package/tfa-layerscape/Config,$(tfa),$(TITLE),$(BIN_BL2),$(BIN_FIP))) \