From patchwork Sun Nov 12 06:51:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elliott Mitchell X-Patchwork-Id: 1863974 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=ewrVgWQ/; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SVQh61V8vz1yRV for ; Wed, 15 Nov 2023 12:34:46 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:To:Subject:Date:From: References:In-Reply-To:Message-Id:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BAzgpOQlTAAzHwe/OragMRrCqH+cZAiWaCiGaThllKg=; b=ewrVgWQ/XNyR2Q euvmei4a/TC5WrXbAhLdUudOpd0zc0yLKSiFZLfluCkmrHgBxUwM5LlAIcdM9V92hV6QxyNSDKM+5 szdkf2uV7uS3IcaLZESKghC353Uwd5QX8LEGnlb7DPPsddHzHpbYC32VrCVB6y+gOc7UBnPFNhMun Vl/XROfLCpBOMMZXQvDj0l85hZxV6jIAknJrT5KUQxe6z3j+NA/q7Q56TD9YKP13AvWQIeuO6IJ3b +asnbwVLUBvos0QAUT52gWQdUnPnnRqXmIOYJyyleVKUqyHEJFSfqqJJK6dFzEH+dyAxMF4LmDs2C SMvc0H2akHmlT/voaLog==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r34mH-00H9As-28; Wed, 15 Nov 2023 01:33:13 +0000 Received: from mailhost.m5p.com ([74.104.188.4]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r34mD-00H99A-2Q for openwrt-devel@lists.openwrt.org; Wed, 15 Nov 2023 01:33:11 +0000 Received: from m5p.com (mailhost.m5p.com [IPv6:2001:470:1f07:15ff:0:0:0:f7]) by mailhost.m5p.com (8.17.1/8.15.2) with ESMTPS id 3AF1X2sb088843 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Tue, 14 Nov 2023 20:33:07 -0500 (EST) (envelope-from ehem@m5p.com) Received: (from ehem@localhost) by m5p.com (8.17.1/8.15.2/Submit) id 3AF1X2oC088842; Tue, 14 Nov 2023 17:33:02 -0800 (PST) (envelope-from ehem) Message-Id: In-Reply-To: References: From: Elliott Mitchell Date: Sat, 11 Nov 2023 22:51:08 -0800 Subject: [PATCH 10/20] [WIP] build: use dtc from $(LINUX_OBJ_DIR) To: openwrt-devel@lists.openwrt.org X-Spam-Status: No, score=0.0 required=10.0 tests=KHOP_HELO_FCRDNS autolearn=unavailable autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on mattapan.m5p.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231114_173309_960085_D736941B X-CRM114-Status: UNSURE ( 8.66 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: As an executable built from source, the Device-Tree Compiler lives in the object directory. Update references to point there. Signed-off-by: Elliott Mitchell --- include/image-commands.mk | 6 +++--- include/image.mk | 2 +- include/trusted-firmware-a.mk | 2 +- include/u-boot.mk | 2 +- package/firmware/l [...] Content analysis details: (-0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org As an executable built from source, the Device-Tree Compiler lives in the object directory. Update references to point there. Signed-off-by: Elliott Mitchell --- include/image-commands.mk | 6 +++--- include/image.mk | 2 +- include/trusted-firmware-a.mk | 2 +- include/u-boot.mk | 2 +- package/firmware/layerscape/ls-dpl/Makefile | 2 +- target/imagebuilder/Makefile | 10 +++++----- target/linux/bcm4908/image/Makefile | 6 +++--- target/linux/ipq40xx/image/generic.mk | 2 +- target/linux/layerscape/image/Makefile | 2 +- target/linux/mediatek/image/filogic.mk | 2 +- target/linux/ramips/image/mt7621.mk | 2 +- 11 files changed, 19 insertions(+), 19 deletions(-) diff --git a/include/image-commands.mk b/include/image-commands.mk index d07c882761..b90881d001 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -315,7 +315,7 @@ define Build/fit $(if $(DEVICE_DTS_OVERLAY),$(foreach dtso,$(DEVICE_DTS_OVERLAY), -O $(dtso):$(KERNEL_BUILD_DIR)/image-$(dtso).dtbo)) \ -c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config-1") \ -A $(LINUX_KARCH) -v $(LINUX_VERSION) - PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage $(if $(findstring external,$(word 3,$(1))),\ + PATH=$(LINUX_OBJ_DIR)/scripts/dtc:$(PATH) mkimage $(if $(findstring external,$(word 3,$(1))),\ -E -B 0x1000 $(if $(findstring static,$(word 3,$(1))),-p 0x1000)) -f $@.its $@.new @mv $@.new $@ endef @@ -501,14 +501,14 @@ endef define Build/qsdk-ipq-factory-nand $(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh \ $@.its ubi $@ - PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new + PATH=$(LINUX_OBJ_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new @mv $@.new $@ endef define Build/qsdk-ipq-factory-nor $(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh \ $@.its hlos $(IMAGE_KERNEL) rootfs $(IMAGE_ROOTFS) - PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new + PATH=$(LINUX_OBJ_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new @mv $@.new $@ endef diff --git a/include/image.mk b/include/image.mk index 635fad3584..794b32387d 100644 --- a/include/image.mk +++ b/include/image.mk @@ -190,7 +190,7 @@ define Image/BuildDTB/sub -I$(LINUX_DIR)/include/ \ -undef -D__DTS__ $(3) \ -o $(2).tmp $(1) - $(LINUX_DIR)/scripts/dtc/dtc -O dtb \ + $(LINUX_OBJ_DIR)/scripts/dtc/dtc -O dtb \ -i$(dir $(1)) $(4) \ $(if $(CONFIG_HAS_DT_OVERLAY_SUPPORT),-@) \ -o $(2) $(2).tmp diff --git a/include/trusted-firmware-a.mk b/include/trusted-firmware-a.mk index 0c0118e092..60acc5b255 100644 --- a/include/trusted-firmware-a.mk +++ b/include/trusted-firmware-a.mk @@ -72,7 +72,7 @@ define Build/Configure/Trusted-Firmware-A $(INSTALL_DIR) $(STAGING_DIR)/usr/include endef -DTC=$(wildcard $(LINUX_DIR)/scripts/dtc/dtc) +DTC=$(wildcard $(LINUX_OBJ_DIR)/scripts/dtc/dtc) define Build/Compile/Trusted-Firmware-A +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ diff --git a/include/u-boot.mk b/include/u-boot.mk index 2b8106410f..8269e6c0ff 100644 --- a/include/u-boot.mk +++ b/include/u-boot.mk @@ -88,7 +88,7 @@ define Build/Configure/U-Boot +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) $(UBOOT_CONFIGURE_VARS) oldconfig) endef -DTC=$(wildcard $(LINUX_DIR)/scripts/dtc/dtc) +DTC=$(wildcard $(LINUX_OBJ_DIR)/scripts/dtc/dtc) define Build/Compile/U-Boot +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ diff --git a/package/firmware/layerscape/ls-dpl/Makefile b/package/firmware/layerscape/ls-dpl/Makefile index 6c53b45417..5ef802e4f2 100644 --- a/package/firmware/layerscape/ls-dpl/Makefile +++ b/package/firmware/layerscape/ls-dpl/Makefile @@ -30,7 +30,7 @@ endef MAKE_PATH:=config MAKE_VARS+= \ - PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) + PATH=$(LINUX_OBJ_DIR)/scripts/dtc:$(PATH) define Build/InstallDev $(INSTALL_DIR) $(STAGING_DIR_IMAGE) diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile index 3bbadc7204..59698d868c 100644 --- a/target/imagebuilder/Makefile +++ b/target/imagebuilder/Makefile @@ -16,7 +16,7 @@ IB_NAME:=$(VERSION_DIST_SANITIZED)-imagebuilder-$(if $(CONFIG_VERSION_FILENAMES) PKG_BUILD_DIR:=$(BUILD_DIR)/$(IB_NAME) IB_KDIR:=$(patsubst $(TOPDIR)/%,$(PKG_BUILD_DIR)/%,$(KERNEL_BUILD_DIR)) IB_LDIR:=$(patsubst $(TOPDIR)/%,$(PKG_BUILD_DIR)/%,$(LINUX_DIR)) -IB_DTSDIR:=$(patsubst $(TOPDIR)/%,$(PKG_BUILD_DIR)/%,$(LINUX_DIR))/arch/$(LINUX_KARCH)/boot/dts/ +IB_DTSDIR:=$(patsubst $(TOPDIR)/%,$(PKG_BUILD_DIR)/%,$(LINUX_SRC_DIR))/arch/$(LINUX_KARCH)/boot/dts/ IB_IDIR:=$(patsubst $(TOPDIR)/%,$(PKG_BUILD_DIR)/%,$(STAGING_DIR_IMAGE)) BUNDLER_PATH := $(subst $(space),:,$(filter-out $(TOPDIR)/%,$(subst :,$(space),$(PATH)))) @@ -90,12 +90,12 @@ endif -cp $(LINUX_DIR)/.config $(IB_LDIR)/ rm -f $(IB_KDIR)/root.* rm -f $(IB_KDIR)/vmlinux.debug - if [ -x $(LINUX_DIR)/scripts/dtc/dtc ]; then \ + if [ -x $(LINUX_OBJ_DIR)/scripts/dtc/dtc ]; then \ $(INSTALL_DIR) $(IB_LDIR)/scripts/dtc; \ - $(INSTALL_BIN) $(LINUX_DIR)/scripts/dtc/dtc $(IB_LDIR)/scripts/dtc/dtc; \ + $(INSTALL_BIN) $(LINUX_OBJ_DIR)/scripts/dtc/dtc $(IB_LDIR)/scripts/dtc/dtc; \ fi - if [ -d $(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/dts ]; then \ - $(CP) -L $(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/dts/* $(IB_DTSDIR); \ + if [ -d $(LINUX_SRC_DIR)/arch/$(LINUX_KARCH)/boot/dts ]; then \ + $(CP) -L $(LINUX_SRC_DIR)/arch/$(LINUX_KARCH)/boot/dts/* $(IB_DTSDIR); \ fi $(SED) 's,^# REVISION:=.*,REVISION:=$(REVISION),g' $(PKG_BUILD_DIR)/include/version.mk $(SED) 's,^# SOURCE_DATE_EPOCH:=.*,SOURCE_DATE_EPOCH:=$(SOURCE_DATE_EPOCH),g' $(PKG_BUILD_DIR)/include/version.mk diff --git a/target/linux/bcm4908/image/Makefile b/target/linux/bcm4908/image/Makefile index 5d113919e8..87a3a6cb2e 100644 --- a/target/linux/bcm4908/image/Makefile +++ b/target/linux/bcm4908/image/Makefile @@ -17,8 +17,8 @@ define Build/bootfs cat $@ | $(STAGING_DIR_HOST)/bin/lzma e -eos -si -so > $@.tmp mv $@.tmp $@ sed -i "s=\$${kernel}=$@=" $(KDIR)/bootfs*.its* - PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $(KDIR)/bootfs-bcm4908.its $(KDIR)/bootfs-bcm4908.itb - PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $(KDIR)/bootfs-bcm4912.its $(KDIR)/bootfs-bcm4912.itb + PATH=$(LINUX_OBJ_DIR)/scripts/dtc:$(PATH) mkimage -f $(KDIR)/bootfs-bcm4908.its $(KDIR)/bootfs-bcm4908.itb + PATH=$(LINUX_OBJ_DIR)/scripts/dtc:$(PATH) mkimage -f $(KDIR)/bootfs-bcm4912.its $(KDIR)/bootfs-bcm4912.itb endef define Build/bcm4908asus @@ -58,7 +58,7 @@ define Build/pkgtb cp pkgtb-$(SOC).its $@.its sed -i "s=\$${bootfs}=$(KDIR)/bootfs-$(SOC).itb=" $@.its sed -i "s=\$${rootfs}=$@.rootfs=" $@.its - PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@ + PATH=$(LINUX_OBJ_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@ endef define Device/Default diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk index d79fda3156..2fe3371a6b 100644 --- a/target/linux/ipq40xx/image/generic.mk +++ b/target/linux/ipq40xx/image/generic.mk @@ -93,7 +93,7 @@ define Build/qsdk-ipq-factory-nand-askey askey_kernel $@.$1 \ askey_fs $(IMAGE_ROOTFS) \ ubifs $@ - PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new + PATH=$(LINUX_OBJ_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new @mv $@.new $@ endef diff --git a/target/linux/layerscape/image/Makefile b/target/linux/layerscape/image/Makefile index 27d64c81a0..f8525a1619 100644 --- a/target/linux/layerscape/image/Makefile +++ b/target/linux/layerscape/image/Makefile @@ -63,7 +63,7 @@ define Build/traverse-fit-ls1088 -D "TEN64" -n "ten64" -a $(FDT_LOADADDR) -c 1 \ -d $(DTB_DIR)/freescale/fsl-ls1088a-rdb.dtb \ -D "LS1088ARDB" -n "ls1088ardb" -a $(FDT_LOADADDR) -c 2 - PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new + PATH=$(LINUX_OBJ_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new @mv -f $@.new $@ endef diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index 0ef3e94575..9d3225f59f 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -86,7 +86,7 @@ endef define Build/zyxel-nwa-fit-filogic $(TOPDIR)/scripts/mkits-zyxel-fit-filogic.sh \ $@.its $@ "80 e1 ff ff ff ff ff ff ff ff" - PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new + PATH=$(LINUX_OBJ_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new @mv $@.new $@ endef diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 3dd6574bf1..ed6933ff70 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -170,7 +170,7 @@ endef define Build/zyxel-nwa-fit $(TOPDIR)/scripts/mkits-zyxel-fit.sh \ $@.its $@ "6b e1 6f e1 ff ff ff ff ff ff" - PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new + PATH=$(LINUX_OBJ_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new @mv $@.new $@ endef