aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2020-09-23 03:25:30 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2020-12-02 23:46:01 +0100
commitd346beb08c3a7867497000dc382635ee8ea0eedb (patch)
treec3adc2a0d10078a81536dae4f9c177ef9388276b /package/boot
parenta44a2f9e93a92304ee1b457aaa63ba8172a1135a (diff)
downloadupstream-d346beb08c3a7867497000dc382635ee8ea0eedb.tar.gz
upstream-d346beb08c3a7867497000dc382635ee8ea0eedb.tar.bz2
upstream-d346beb08c3a7867497000dc382635ee8ea0eedb.zip
build: Extract trusted-firmware-a.mk
The include/trusted-firmware-a.mk file is based on the include/u-boot.mk file and should be used to build a Trusted Firmware-A (TFA) which was previously named Arm trusted firmware. This is useful for targets where the TFA is board specific like for Marvell SoCs and probably also NXP Layerscape SoCs. This also makes use of this abstraction in the arm-trusted-firmware-mvebu package to build board specific ATF binaries. The ATF binaries will be automatically activated and build when the board is selected in the normal build or all boards are selected. This should also activate the build when build bot creates images. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'package/boot')
-rw-r--r--package/boot/arm-trusted-firmware-mvebu/Makefile158
1 files changed, 71 insertions, 87 deletions
diff --git a/package/boot/arm-trusted-firmware-mvebu/Makefile b/package/boot/arm-trusted-firmware-mvebu/Makefile
index 38dd9d1635..1f84b8eb19 100644
--- a/package/boot/arm-trusted-firmware-mvebu/Makefile
+++ b/package/boot/arm-trusted-firmware-mvebu/Makefile
@@ -7,149 +7,170 @@
include $(TOPDIR)/rules.mk
-PKG_NAME:=arm-trusted-firmware-mvebu
PKG_VERSION:=2.3
PKG_RELEASE:=1
-
-PKG_SOURCE:=trusted-firmware-a-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot
PKG_HASH:=37f917922bcef181164908c470a2f941006791c0113d738c498d39d95d543b21
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/trusted-firmware-a-$(PKG_VERSION)
-
-PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILES:=docs/license.rst
PKG_MAINTAINER:=Vladimir Vid <vladimir.vid@sartura.hr>
+include $(INCLUDE_DIR)/trusted-firmware-a.mk
include $(INCLUDE_DIR)/package.mk
-define Package/arm-trusted-firmware-mvebu
- SECTION:=boot
- CATEGORY:=Boot Loaders
- DEPENDS:=@TARGET_mvebu_cortexa53
- VARIANT:=$(subst arm-trusted-firmware-mvebu-,,$(1))
+define Trusted-Firmware-A/Default
+ BUILD_TARGET:=mvebu
+ BUILD_SUBTARGET:=cortexa53
+ TFA_IMAGE:=flash-image.bin uart-images.tgz
+ UBOOT:=
+ DDR_TOPOLOGY:=
+ CLOCKSPRESET:=
endef
-define Package/arm-trusted-firmware-mvebu-espressobin-512mb
- $(Package/arm-trusted-firmware-mvebu)
- TITLE:=ARM Trusted Firmware for Marvell ESPRESSObin (512MB)
+
+define Trusted-Firmware-A/espressobin-512mb
+ NAME:=Marvell ESPRESSObin (512MB)
DEPENDS:=+u-boot-espressobin
+ BUILD_DEVICES:=globalscale_espressobin
UBOOT:=espressobin
DDR_TOPOLOGY:=0
CLOCKSPRESET:=CPU_800_DDR_800
PLAT:=a3700
endef
-define Package/arm-trusted-firmware-mvebu-espressobin-v3-v5-1gb-1cs
- $(Package/arm-trusted-firmware-mvebu)
- TITLE:=ARM Trusted Firmware for Marvell ESPRESSObin V3-V5 (1GB 1CS)
+define Trusted-Firmware-A/espressobin-v3-v5-1gb-1cs
+ NAME:=Marvell ESPRESSObin V3-V5 (1GB 1CS)
DEPENDS:=+u-boot-espressobin
+ BUILD_DEVICES:=globalscale_espressobin
UBOOT:=espressobin
DDR_TOPOLOGY:=4
CLOCKSPRESET:=CPU_800_DDR_800
PLAT:=a3700
endef
-define Package/arm-trusted-firmware-mvebu-espressobin-v3-v5-1gb-1cs-emmc
- $(Package/arm-trusted-firmware-mvebu)
- TITLE:=ARM Trusted Firmware for Marvell ESPRESSObin V3-V5 (1GB 1CS, eMMC)
+define Trusted-Firmware-A/espressobin-v3-v5-1gb-1cs-emmc
+ NAME:=Marvell ESPRESSObin V3-V5 (1GB 1CS, eMMC)
DEPENDS:=+u-boot-espressobin-emmc
+ BUILD_DEVICES:=globalscale_espressobin-emmc
UBOOT:=espressobin-emmc
DDR_TOPOLOGY:=4
CLOCKSPRESET:=CPU_800_DDR_800
PLAT:=a3700
endef
-define Package/arm-trusted-firmware-mvebu-espressobin-v3-v5-1gb-2cs
- $(Package/arm-trusted-firmware-mvebu)
- TITLE:=ARM Trusted Firmware for Marvell ESPRESSObin V3-V5 (1GB, 2CS)
+define Trusted-Firmware-A/espressobin-v3-v5-1gb-2cs
+ NAME:=Marvell ESPRESSObin V3-V5 (1GB, 2CS)
DEPENDS:=+u-boot-espressobin
+ BUILD_DEVICES:=globalscale_espressobin
UBOOT:=espressobin
DDR_TOPOLOGY:=2
CLOCKSPRESET:=CPU_800_DDR_800
PLAT:=a3700
endef
-define Package/arm-trusted-firmware-mvebu-espressobin-v3-v5-1gb-2cs-emmc
- $(Package/arm-trusted-firmware-mvebu)
- TITLE:=ARM Trusted Firmware for Marvell ESPRESSObin V3-V5 (1GB 2CS, eMMC)
+define Trusted-Firmware-A/espressobin-v3-v5-1gb-2cs-emmc
+ NAME:=Marvell ESPRESSObin V3-V5 (1GB 2CS, eMMC)
DEPENDS:=+u-boot-espressobin-emmc
+ BUILD_DEVICES:=globalscale_espressobin-emmc
UBOOT:=espressobin-emmc
DDR_TOPOLOGY:=2
CLOCKSPRESET:=CPU_800_DDR_800
PLAT:=a3700
endef
-define Package/arm-trusted-firmware-mvebu-espressobin-v3-v5-2gb
- $(Package/arm-trusted-firmware-mvebu)
- TITLE:=ARM Trusted Firmware for Marvell ESPRESSObin V3-V5 (2GB)
+define Trusted-Firmware-A/espressobin-v3-v5-2gb
+ NAME:=Marvell ESPRESSObin V3-V5 (2GB)
DEPENDS:=+u-boot-espressobin
+ BUILD_DEVICES:=globalscale_espressobin
UBOOT:=espressobin
DDR_TOPOLOGY:=7
CLOCKSPRESET:=CPU_800_DDR_800
PLAT:=a3700
endef
-define Package/arm-trusted-firmware-mvebu-espressobin-v3-v5-2gb-emmc
- $(Package/arm-trusted-firmware-mvebu)
- TITLE:=ARM Trusted Firmware for Marvell ESPRESSObin V3-V5 (2GB, eMMC)
+define Trusted-Firmware-A/espressobin-v3-v5-2gb-emmc
+ NAME:=Marvell ESPRESSObin V3-V5 (2GB, eMMC)
DEPENDS:=+u-boot-espressobin-emmc
+ BUILD_DEVICES:=globalscale_espressobin-emmc
UBOOT:=espressobin-emmc
DDR_TOPOLOGY:=7
CLOCKSPRESET:=CPU_800_DDR_800
PLAT:=a3700
endef
-define Package/arm-trusted-firmware-mvebu-espressobin-v7-1gb
- $(Package/arm-trusted-firmware-mvebu)
- TITLE:=ARM Trusted Firmware for Marvell ESPRESSObin V7 (1GB)
+define Trusted-Firmware-A/espressobin-v7-1gb
+ NAME:=Marvell ESPRESSObin V7 (1GB)
DEPENDS:=+u-boot-espressobin
+ BUILD_DEVICES:=globalscale_espressobin-v7
UBOOT:=espressobin
DDR_TOPOLOGY:=5
CLOCKSPRESET:=CPU_800_DDR_800
PLAT:=a3700
endef
-define Package/arm-trusted-firmware-mvebu-espressobin-v7-1gb-emmc
- $(Package/arm-trusted-firmware-mvebu)
- TITLE:=ARM Trusted Firmware for Marvell ESPRESSObin V7 (1GB, eMMC)
+define Trusted-Firmware-A/espressobin-v7-1gb-emmc
+ NAME:=Marvell ESPRESSObin V7 (1GB, eMMC)
DEPENDS:=+u-boot-espressobin
+ BUILD_DEVICES:=globalscale_espressobin-v7-emmc
UBOOT:=espressobin-emmc
DDR_TOPOLOGY:=5
CLOCKSPRESET:=CPU_800_DDR_800
PLAT:=a3700
endef
-define Package/arm-trusted-firmware-mvebu-espressobin-v7-2gb
- $(Package/arm-trusted-firmware-mvebu)
- TITLE:=ARM Trusted Firmware for Marvell ESPRESSObin V7 (2GB)
+define Trusted-Firmware-A/espressobin-v7-2gb
+ NAME:=Marvell ESPRESSObin V7 (2GB)
DEPENDS:=+u-boot-espressobin
+ BUILD_DEVICES:=globalscale_espressobin-v7
UBOOT:=espressobin
DDR_TOPOLOGY:=6
CLOCKSPRESET:=CPU_800_DDR_800
PLAT:=a3700
endef
-define Package/arm-trusted-firmware-mvebu-espressobin-v7-2gb-emmc
- $(Package/arm-trusted-firmware-mvebu)
- TITLE:=ARM Trusted Firmware for Marvell ESPRESSObin V7 (2GB, eMMC)
+define Trusted-Firmware-A/espressobin-v7-2gb-emmc
+ NAME:=Marvell ESPRESSObin V7 (2GB, eMMC)
DEPENDS:=+u-boot-espressobin
+ BUILD_DEVICES:=globalscale_espressobin-v7-emmc
UBOOT:=espressobin-emmc
DDR_TOPOLOGY:=6
CLOCKSPRESET:=CPU_800_DDR_800
PLAT:=a3700
endef
-define Package/arm-trusted-firmware-mvebu-udpu
- $(Package/arm-trusted-firmware-mvebu)
- TITLE:=ARM Trusted Firmware for Methode uDPU
+define Trusted-Firmware-A/udpu
+ NAME:=Methode uDPU
DEPENDS:=+u-boot-uDPU
+ BUILD_DEVICES:=methode_udpu
UBOOT:=uDPU
DDR_TOPOLOGY:=0
CLOCKSPRESET:=CPU_1000_DDR_800
PLAT:=a3700
endef
+
+TFA_TARGETS:= \
+ espressobin-512mb \
+ espressobin-v3-v5-1gb-1cs \
+ espressobin-v3-v5-1gb-1cs-emmc \
+ espressobin-v3-v5-1gb-2cs \
+ espressobin-v3-v5-1gb-2cs-emmc \
+ espressobin-v3-v5-2gb \
+ espressobin-v3-v5-2gb-emmc \
+ espressobin-v7-1gb \
+ espressobin-v7-1gb-emmc \
+ espressobin-v7-2gb \
+ espressobin-v7-2gb-emmc \
+ udpu
+
+TFA_MAKE_FLAGS += \
+ CROSS_CM3=$(STAGING_DIR_IMAGE)/$(LINARO_NAME)-$(LINARO_RELEASE).$(LINARO_VERSION)/bin/arm-linux-gnueabi- \
+ BL33=$(STAGING_DIR_IMAGE)/$(UBOOT)-u-boot.bin \
+ MV_DDR_PATH=$(STAGING_DIR_IMAGE)/$(MV_DDR_NAME) \
+ WTP=$(STAGING_DIR_IMAGE)/$(A3700_UTILS_NAME) \
+ DDR_TOPOLOGY=$(DDR_TOPOLOGY) \
+ CLOCKSPRESET=$(CLOCKSPRESET) \
+ all \
+ fip
+
A3700_UTILS_NAME:=a3700-utils
A3700_UTILS_RELEASE:=09679790
A3700_UTILS_SOURCE=$(A3700_UTILS_NAME)-$(A3700_UTILS_RELEASE).tar.bz2
@@ -201,41 +222,4 @@ define Build/Prepare
$(TAR) -C $(STAGING_DIR_IMAGE) -xf $(DL_DIR)/$(LINARO_SOURCE)
endef
-export GCC_HONOUR_COPTS=s
-
-TARGET_CFLAGS = ""
-
-define Build/Compile
- $(eval $(Package/arm-trusted-firmware-mvebu-$(BUILD_VARIANT))) \
- $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
- CROSS_COMPILE=$(TARGET_CROSS) \
- OPENSSL_DIR=$(STAGING_DIR_HOST) \
- CROSS_CM3=$(STAGING_DIR_IMAGE)/$(LINARO_NAME)-$(LINARO_RELEASE).$(LINARO_VERSION)/bin/arm-linux-gnueabi- \
- BL33=$(STAGING_DIR_IMAGE)/$(UBOOT)-u-boot.bin \
- MV_DDR_PATH=$(STAGING_DIR_IMAGE)/$(MV_DDR_NAME) \
- WTP=$(STAGING_DIR_IMAGE)/$(A3700_UTILS_NAME) \
- DDR_TOPOLOGY=$(DDR_TOPOLOGY) \
- CLOCKSPRESET=$(CLOCKSPRESET) \
- PLAT=$(PLAT) \
- all \
- fip
-endef
-
-define Build/InstallDev
- $(INSTALL_DIR) $(BIN_DIR)/flash-image-$(BUILD_VARIANT)
- $(CP) $(PKG_BUILD_DIR)/build/$(PLAT)/release/flash-image.bin $(BIN_DIR)/flash-image-$(BUILD_VARIANT)/
- $(CP) $(PKG_BUILD_DIR)/build/$(PLAT)/release/uart-images.tgz $(BIN_DIR)/flash-image-$(BUILD_VARIANT)/
-endef
-
-$(eval $(call BuildPackage,arm-trusted-firmware-mvebu-espressobin-512mb))
-$(eval $(call BuildPackage,arm-trusted-firmware-mvebu-espressobin-v3-v5-1gb-1cs))
-$(eval $(call BuildPackage,arm-trusted-firmware-mvebu-espressobin-v3-v5-1gb-1cs-emmc))
-$(eval $(call BuildPackage,arm-trusted-firmware-mvebu-espressobin-v3-v5-1gb-2cs))
-$(eval $(call BuildPackage,arm-trusted-firmware-mvebu-espressobin-v3-v5-1gb-2cs-emmc))
-$(eval $(call BuildPackage,arm-trusted-firmware-mvebu-espressobin-v3-v5-2gb))
-$(eval $(call BuildPackage,arm-trusted-firmware-mvebu-espressobin-v3-v5-2gb-emmc))
-$(eval $(call BuildPackage,arm-trusted-firmware-mvebu-espressobin-v7-1gb))
-$(eval $(call BuildPackage,arm-trusted-firmware-mvebu-espressobin-v7-1gb-emmc))
-$(eval $(call BuildPackage,arm-trusted-firmware-mvebu-espressobin-v7-2gb))
-$(eval $(call BuildPackage,arm-trusted-firmware-mvebu-espressobin-v7-2gb-emmc))
-$(eval $(call BuildPackage,arm-trusted-firmware-mvebu-udpu))
+$(eval $(call BuildPackage/Trusted-Firmware-A))