trusted-firmware-a.mk: pass DTC path similar to u-boot.mk
authorDaniel Golle <daniel@makrotopia.org>
Thu, 11 Aug 2022 21:29:52 +0000 (23:29 +0200)
committerDaniel Golle <daniel@makrotopia.org>
Sun, 28 Aug 2022 18:01:55 +0000 (19:01 +0100)
Instead of relying on dtc being provided by the build host use the
dtc from $(LINUX_DIR) similar to how it's done also in u-boot.mk.
For this to work kernel.mk now needs to be included before
trusted-firmware-a.mk, add this include to all affected packages.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
include/trusted-firmware-a.mk
package/boot/arm-trusted-firmware-bcm63xx/Makefile
package/boot/arm-trusted-firmware-mediatek/Makefile
package/boot/arm-trusted-firmware-mvebu/Makefile
package/boot/arm-trusted-firmware-sunxi/Makefile

index d95250452b14b12a9efd3262a3bf164fa6c1bfbc..46fc52b15e400b2243ae3a243502592ccc6df26b 100644 (file)
@@ -72,10 +72,13 @@ define Build/Configure/Trusted-Firmware-A
        $(INSTALL_DIR) $(STAGING_DIR)/usr/include
 endef
 
+DTC=$(wildcard $(LINUX_DIR)/scripts/dtc/dtc)
+
 define Build/Compile/Trusted-Firmware-A
        +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
                CROSS_COMPILE=$(TARGET_CROSS) \
                OPENSSL_DIR=$(STAGING_DIR_HOST) \
+               $(if $(DTC),DTC="$(DTC)") \
                PLAT=$(PLAT) \
                BUILD_STRING="OpenWrt v$(PKG_VERSION)-$(PKG_RELEASE) ($(VARIANT))" \
                $(TFA_MAKE_FLAGS)
index 12571e8d963e2d37908ca1e3152cb60796244286..7db1fbfff0c7c40c0ad58c61fa0c042a7715e118 100644 (file)
@@ -13,6 +13,7 @@ PKG_MIRROR_HASH:=9d5d04f572b1b6ddc6eb3064b9cb09f5fe982e82d350790041d35316349af12
 
 PKG_MAINTAINER:=Rafał Miłecki <rafal@milecki.pl>
 
+include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/trusted-firmware-a.mk
 include $(INCLUDE_DIR)/package.mk
 
index 30488333f8b567ade7c84a4685a44750e43b03d7..48feae4b60a6b3fe338408beec4bc9117f7051b2 100644 (file)
@@ -19,6 +19,7 @@ PKG_MIRROR_HASH:=4af9ce8e11511afee7f588cc982946c06339edbfa47afef6a7f3e2231ac9f34
 
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 
+include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/trusted-firmware-a.mk
 include $(INCLUDE_DIR)/package.mk
 
index 9a7e1340a921d9c092db6e9e1648bcbf2a7f4dc1..dba4836a6b98867976f3eeeb695528b362603c38 100644 (file)
@@ -13,6 +13,7 @@ PKG_HASH:=53422dc649153838e03820330ba17cb10afe3e330ecde0db11e4d5f1361a33e6
 
 PKG_MAINTAINER:=Vladimir Vid <vladimir.vid@sartura.hr>
 
+include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/trusted-firmware-a.mk
 include $(INCLUDE_DIR)/package.mk
 
index 0abfbae7501420a3ba12a386d92fb729198b57d7..178b3958b822e56d0cdaff78b3f508120fb0d27d 100644 (file)
@@ -21,6 +21,7 @@ PKG_LICENSE_FILES:=license.md
 
 PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de>
 
+include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/trusted-firmware-a.mk
 include $(INCLUDE_DIR)/package.mk