4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
10 PKG_NAME
:=tfa-layerscape
11 PKG_VERSION
:=lsdk-1903
15 PKG_SOURCE_URL
:=https
://source.codeaurora.org
/external
/qoriq
/qoriq-components
/atf
16 PKG_SOURCE_VERSION
:=7e34aebe658c7c3439d2d68b0ce6b9776e8e6996
17 PKG_MIRROR_HASH
:=9cf0bc32fa589a0ee7c48c87898679e645341f29da1253d0ba5d2e82c6ea074d
18 PKG_BUILD_DEPENDS
:=uboot-layerscape tfa-layerscape
/host
20 include $(INCLUDE_DIR
)/host-build.mk
21 include $(INCLUDE_DIR
)/package.mk
23 define Package
/tfa-layerscape
/Config
24 define Package
/tfa-
$(1)
26 CATEGORY
:=Boot Loaders
28 DEPENDS
:=@TARGET_layerscape_armv8_64b
+layerscape-rcw-
$(1)
36 define Package
/tfa-layerscape
/Install
37 define Package
/tfa-
$(1)/install
38 $(INSTALL_DIR
) $(STAGING_DIR_IMAGE
)
39 $(CP
) $(PKG_BUILD_DIR
)/$(BIN_BL2
) $(STAGING_DIR_IMAGE
)/$(1)-bl2.pbl
40 $(CP
) $(PKG_BUILD_DIR
)/$(BIN_FIP
) $(STAGING_DIR_IMAGE
)/$(1)-fip.bin
45 $(eval
$(Package
/tfa-layerscape
/$(BUILD_VARIANT
))) \
46 $(MAKE
) -C
$(PKG_BUILD_DIR
) CROSS_COMPILE
=$(TARGET_CROSS
) \
47 fip pbl PLAT
=$(PLAT
) BOOT_MODE
=$(BOOT_MODE
) \
48 RCW
=$(STAGING_DIR_IMAGE
)/$(BUILD_VARIANT
)-rcw.bin \
49 BL33
=$(STAGING_DIR_IMAGE
)/$(BUILD_VARIANT
)-uboot.bin \
50 FIPTOOL
=$(STAGING_DIR_HOST
)/bin
/tfa-fiptool \
51 CREATE_PBL
=$(STAGING_DIR_HOST
)/bin
/tfa-create-pbl \
52 BYTE_SWAP
=$(STAGING_DIR_HOST
)/bin
/tfa-byte-swap
55 HOST_CFLAGS
+= -Wall
-Werror
-pedantic
-std
=c99
58 $(HOST_BUILD_DIR
)/tools
/fiptool \
59 CFLAGS
="$(HOST_CFLAGS)" \
60 LDFLAGS
="$(HOST_LDFLAGS)"
62 $(HOST_BUILD_DIR
)/plat
/nxp
/tools \
63 CFLAGS
="$(HOST_CFLAGS)"
67 $(INSTALL_BIN
) $(HOST_BUILD_DIR
)/tools
/fiptool
/fiptool
$(STAGING_DIR_HOST
)/bin
/tfa-fiptool
68 $(INSTALL_BIN
) $(HOST_BUILD_DIR
)/plat
/nxp
/tools
/create_pbl
$(STAGING_DIR_HOST
)/bin
/tfa-create-pbl
69 $(INSTALL_BIN
) $(HOST_BUILD_DIR
)/plat
/nxp
/tools
/byte_swap
$(STAGING_DIR_HOST
)/bin
/tfa-byte-swap
72 define Package
/tfa-layerscape
/ls1012afrdm
73 TITLE
:=NXP LS1012AFRDM Trusted Firmware
76 BIN_BL2
:=build
/ls1012afrdm
/release
/bl2_qspi.pbl
77 BIN_FIP
:=build
/ls1012afrdm
/release
/fip.bin
80 define Package
/tfa-layerscape
/ls1012ardb
81 TITLE
:=NXP LS1012ARDB Trusted Firmware
84 BIN_BL2
:=build
/ls1012ardb
/release
/bl2_qspi.pbl
85 BIN_FIP
:=build
/ls1012ardb
/release
/fip.bin
88 define Package
/tfa-layerscape
/ls1012afrwy
89 TITLE
:=NXP LS1012AFRWY Trusted Firmware
92 BIN_BL2
:=build
/ls1012afrwy
/release
/bl2_qspi.pbl
93 BIN_FIP
:=build
/ls1012afrwy
/release
/fip.bin
96 define Package
/tfa-layerscape
/ls1043ardb
97 TITLE
:=NXP LS1043ARDB Trusted Firmware
100 BIN_BL2
:=build
/ls1043ardb
/release
/bl2_nor.pbl
101 BIN_FIP
:=build
/ls1043ardb
/release
/fip.bin
104 define Package
/tfa-layerscape
/ls1043ardb-sdboot
105 TITLE
:=NXP LS1043ARDB SD Boot Trusted Firmware
108 BIN_BL2
:=build
/ls1043ardb
/release
/bl2_sd.pbl
109 BIN_FIP
:=build
/ls1043ardb
/release
/fip.bin
112 define Package
/tfa-layerscape
/ls1046ardb
113 TITLE
:=NXP LS1046ARDB Trusted Firmware
116 BIN_BL2
:=build
/ls1046ardb
/release
/bl2_qspi.pbl
117 BIN_FIP
:=build
/ls1046ardb
/release
/fip.bin
120 define Package
/tfa-layerscape
/ls1046ardb-sdboot
121 TITLE
:=NXP LS1046ARDB SD Boot Trusted Firmware
124 BIN_BL2
:=build
/ls1046ardb
/release
/bl2_sd.pbl
125 BIN_FIP
:=build
/ls1046ardb
/release
/fip.bin
128 define Package
/tfa-layerscape
/ls1088ardb
129 TITLE
:=NXP LS1088ARDB Trusted Firmware
132 BIN_BL2
:=build
/ls1088ardb
/release
/bl2_qspi.pbl
133 BIN_FIP
:=build
/ls1088ardb
/release
/fip.bin
136 define Package
/tfa-layerscape
/ls1088ardb-sdboot
137 TITLE
:=NXP LS1088ARDB SD Boot Trusted Firmware
140 BIN_BL2
:=build
/ls1088ardb
/release
/bl2_sd.pbl
141 BIN_FIP
:=build
/ls1088ardb
/release
/fip.bin
144 define Package
/tfa-layerscape
/ls2088ardb
145 TITLE
:=NXP LS2088ARDB Trusted Firmware
148 BIN_BL2
:=build
/ls2088ardb
/release
/bl2_nor.pbl
149 BIN_FIP
:=build
/ls2088ardb
/release
/fip.bin
164 $(eval
$(call HostBuild
))
165 $(foreach tfa
,$(TFAS
), \
166 $(eval
$(Package
/tfa-layerscape
/$(tfa
))) \
167 $(eval
$(call Package
/tfa-layerscape
/Config
,$(tfa
),$(TITLE
),$(BIN_BL2
),$(BIN_FIP
))) \
168 $(eval
$(call Package
/tfa-layerscape
/Install
,$(tfa
))) \
169 $(eval
$(call BuildPackage
,tfa-
$(tfa
))) \