aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/tfa-layerscape/Makefile
diff options
context:
space:
mode:
authorBiwen Li <biwen.li@nxp.com>2019-07-26 16:23:53 +0800
committerPetr Štetiar <ynezz@true.cz>2019-07-26 15:21:58 +0200
commit83d5ca2186f7801d94f336e09f8db0a2c5c5d97f (patch)
tree403e38e1dc7f2b3cae105684f5c1348c5ef8a1b2 /package/boot/tfa-layerscape/Makefile
parenta1c6a316d2997b6bbee520fb1bf21f3b994f9e52 (diff)
downloadupstream-83d5ca2186f7801d94f336e09f8db0a2c5c5d97f.tar.gz
upstream-83d5ca2186f7801d94f336e09f8db0a2c5c5d97f.tar.bz2
upstream-83d5ca2186f7801d94f336e09f8db0a2c5c5d97f.zip
tfa-layerscape: fix create_pbl and byte_swap host build
- make create_pbl and byte_swap as host tools - fix a bug that maybe use the cross compiler to compile create_pbl and byte_swap: # -a option appends the image for Chassis 3 devices in case of non secure boot aarch64-openwrt-linux-musl-gcc -Wall -Werror -pedantic -std=c99 -O2 -DVERSION=v1.5(release):reboot-10604-ge9216b3336 -D_GNU_SOURCE -D_XOPEN_SOURCE=700 -c -o create_pbl.o create_pbl.c cc1: note: someone does not honour COPTS correctly, passed 0 times LD create_pbl /usr/bin/ld: create_pbl.o: Relocations in generic ELF (EM: 183) /usr/bin/ld: create_pbl.o: Relocations in generic ELF (EM: 183) /usr/bin/ld: create_pbl.o: Relocations in generic ELF (EM: 183) create_pbl.o: error adding symbols: File in wrong format collect2: error: ld returned 1 exit status Makefile:43: recipe for target create_pbl failed make[4]: *** [create_pbl] Error 1 plat/nxp/tools/pbl_ch2.mk:45: recipe for target pbl failed make[3]: *** [pbl] Error 2 - add tfa- prefix to all tools in order to avoid future clashes with other toolnames Signed-off-by: Biwen Li <biwen.li@nxp.com> [added missing HOST_CFLAGS, added tfa- prefix to the tools] Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'package/boot/tfa-layerscape/Makefile')
-rw-r--r--package/boot/tfa-layerscape/Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/package/boot/tfa-layerscape/Makefile b/package/boot/tfa-layerscape/Makefile
index 8d62fbcf61..28014e87f2 100644
--- a/package/boot/tfa-layerscape/Makefile
+++ b/package/boot/tfa-layerscape/Makefile
@@ -48,7 +48,9 @@ define Build/Compile
fip pbl PLAT=$(PLAT) BOOT_MODE=$(BOOT_MODE) \
RCW=$(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-rcw.bin \
BL33=$(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-uboot.bin \
- FIPTOOL=$(STAGING_DIR_HOST)/bin/fiptool
+ FIPTOOL=$(STAGING_DIR_HOST)/bin/tfa-fiptool \
+ CREATE_PBL=$(STAGING_DIR_HOST)/bin/tfa-create-pbl \
+ BYTE_SWAP=$(STAGING_DIR_HOST)/bin/tfa-byte-swap
endef
HOST_CFLAGS += -Wall -Werror -pedantic -std=c99
@@ -57,10 +59,15 @@ define Host/Compile
$(HOST_BUILD_DIR)/tools/fiptool \
CFLAGS="$(HOST_CFLAGS)" \
LDFLAGS="$(HOST_LDFLAGS)"
+ $(MAKE) -C \
+ $(HOST_BUILD_DIR)/plat/nxp/tools \
+ CFLAGS="$(HOST_CFLAGS)"
endef
define Host/Install
- $(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/fiptool/fiptool $(STAGING_DIR_HOST)/bin/
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/fiptool/fiptool $(STAGING_DIR_HOST)/bin/tfa-fiptool
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/plat/nxp/tools/create_pbl $(STAGING_DIR_HOST)/bin/tfa-create-pbl
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/plat/nxp/tools/byte_swap $(STAGING_DIR_HOST)/bin/tfa-byte-swap
endef
define Package/tfa-layerscape/ls1012ardb