tfa-layerscape: fix create_pbl and byte_swap host build
authorBiwen Li <biwen.li@nxp.com>
Fri, 26 Jul 2019 08:23:53 +0000 (16:23 +0800)
committerPetr Štetiar <ynezz@true.cz>
Sat, 27 Jul 2019 05:14:09 +0000 (07:14 +0200)
commite0f468864bf65f5767df46a0fd7862c3a0265459
treea5b0f0e77477acd1bce1e20a246c68c863a01972
parent94e9084e1ee586fed993896c71a4327518987152
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>
(cherry picked from commit 83d5ca2186f7801d94f336e09f8db0a2c5c5d97f)
package/boot/tfa-layerscape/Makefile
package/boot/tfa-layerscape/patches/002-plat-nxp-tools-fix-a-makefile-bug-that-will-use-defa.patch [new file with mode: 0644]
package/boot/tfa-layerscape/patches/003-plat-nxp-tools-fix-create_pbl-and-byte_swap-host-bui.patch [new file with mode: 0644]