4903c98cde1389c8ef4418d7e4b2cefe3bd45206
[openwrt/openwrt.git] / package / boot / arm-trusted-firmware-sunxi / Makefile
1 #
2 # Copyright (C) 2017 Hauke Mehrtens
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_VERSION:=2.10
11 PKG_RELEASE:=1
12
13 PKG_HASH:=88215a62291b9ba87da8e50b077741103cdc08fb6c9e1ebd34dfaace746d3201
14
15 PKG_LICENSE:=BSD-3-Clause
16 PKG_LICENSE_FILES:=license.md
17
18 PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de>
19
20 include $(INCLUDE_DIR)/kernel.mk
21 include $(INCLUDE_DIR)/trusted-firmware-a.mk
22 include $(INCLUDE_DIR)/package.mk
23
24 define Trusted-Firmware-A/Default
25 BUILD_TARGET:=sunxi
26 BUILD_SUBTARGET:=cortexa53
27 endef
28
29 define Trusted-Firmware-A/sunxi-a64
30 NAME:=Allwinner A64
31 PLAT:=sun50i_a64
32 endef
33
34 define Trusted-Firmware-A/sunxi-h6
35 NAME:=Allwinner H6
36 PLAT:=sun50i_h6
37 endef
38
39 define Trusted-Firmware-A/sunxi-h616
40 NAME:=Allwinner H616
41 PLAT:=sun50i_h616
42 endef
43
44 TFA_TARGETS:= \
45 sunxi-a64 \
46 sunxi-h6 \
47 sunxi-h616
48
49 TFA_MAKE_FLAGS+= \
50 $(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-no-warn-rwx-segments")
51
52 define Package/trusted-firmware-a/install
53 $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
54 $(INSTALL_DATA) $(PKG_BUILD_DIR)/build/$(PLAT)/release/bl31.bin $(STAGING_DIR_IMAGE)/bl31_$(BUILD_VARIANT).bin
55 endef
56
57 $(eval $(call BuildPackage/Trusted-Firmware-A))