Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp152959imm; Wed, 5 Sep 2018 16:56:41 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdali7uoyyhhAJlMdmpVO8PU7uFC6MoWNXR3euuCJvYgnQFwFInYrLRZ6C2++Z79GabzDHJf X-Received: by 2002:a65:49cc:: with SMTP id t12-v6mr126946pgs.27.1536191801811; Wed, 05 Sep 2018 16:56:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536191801; cv=none; d=google.com; s=arc-20160816; b=XdEzvJbgoT/oxx34zI6K/Sc6Vk/TgCMABhXY0J5tnK/OeuvO7RsaXSCnMTxUUSepQz GGuBwpNIeK440MSydZHIjqVR8PRr0rO4SHVSc6KsopAedKhD9r9b0jNtxe2JTFR+Dxav GV1rC+YDXmGu7KMIofoMKOzUxrPfs/TcY18vw98Lfy2urEF4nroLMvAFLRAmEBdKNFJ2 0ANgLwxHMo1hO8XRXh5nJafsIIy7CiN19Q8DoyuCabhhDB/46LvJTq5B0rkCz5lTWneF 4H92zuIhszjYWeaXnmoU5tx5apOueyMQ86niNkZWYZUOnjK5aTMzcxBefIHP6zzM/DHA gFyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=IMXV4BrLUnHreRSVouV+RzNcdCX3xRFRfEwzX4J4BRQ=; b=bwjmSUxo47AOXl8b5Qvy6qmtwQJ5qHKMleoTR9l+5yNY915COLE7ww3pkJg+tsNbFH uD1Otl9Y7l0SRDgQ2pWuCpnUE5j/VtXOi6tMjp1XAOw1nf4p9SlE5RnV8YekmZaCjhIp Vyf93b++6c55IodfgjgPR0BXqwXxh04KNrDiGC4Q14/IToQ+hhG7IjMxdmNVyOtSG1a3 VFgSXB3J8c8doooC3GQzzjke9/ZiNc0pgLf7WezmFlmopWOHepuSApBQ6UBvRtDqsZ2p bzZlT1cjGaNmr9IDgvBemQlu3l79Wd4oxfzJNmxekFSOFsZB9iq9POQZweEPpndImJ+3 3l9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n6-v6si3317440pla.398.2018.09.05.16.56.26; Wed, 05 Sep 2018 16:56:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726289AbeIFE0E (ORCPT + 99 others); Thu, 6 Sep 2018 00:26:04 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:41205 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725957AbeIFE0D (ORCPT ); Thu, 6 Sep 2018 00:26:03 -0400 Received: by mail-oi0-f65.google.com with SMTP id k12-v6so17090436oiw.8; Wed, 05 Sep 2018 16:53:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=IMXV4BrLUnHreRSVouV+RzNcdCX3xRFRfEwzX4J4BRQ=; b=LtwPxo5kRvn6WldC6s3T9a5+9chdZ4w8xpFDC3/1RJTDVI+TdE0duLX4iFkb2UTPem lJkBKb2E9qP47cxaf3ereXD7ZI+1NlTcI5C95L4bgYiQUu48qTekXihYd4924tFZKmzx aEv7LXgeQAThOzY2zhLKmWqFwexjsUkSM46VLhuTZP6bC5NU/9IP8aDmt7ME18UODFO0 XtWUVBfuOlTDBVmnnxN5/2jVMQUKT/yD3itp/IInzyUqjpiqK1F+UsSne3rFgVEz0mTL trE3czQZyB1//cLWg2D6wSOo/suc5kRhlT8ytObr4isyxKDEkdoCJVKio8WmYgbuPETu 3wQQ== X-Gm-Message-State: APzg51CIjvf1o/WZ4jWxsL73kgRRkUkX75s8bHUqoGZv07YJE/rA8AUu Ie+s2rI1oZ7+NH9udSTq13014V8= X-Received: by 2002:aca:6c4f:: with SMTP id h76-v6mr138064oic.214.1536191610773; Wed, 05 Sep 2018 16:53:30 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id h186-v6sm3860624oib.55.2018.09.05.16.53.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 16:53:30 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Masahiro Yamada Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linuxppc-dev@lists.ozlabs.org Subject: [PATCH v2 1/9] powerpc: build .dtb files in dts directory Date: Wed, 5 Sep 2018 18:53:19 -0500 Message-Id: <20180905235327.5996-2-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180905235327.5996-1-robh@kernel.org> References: <20180905235327.5996-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Align powerpc with other architectures which build the dtb files in the same directory as the dts files. This is also in line with most other build targets which are located in the same directory as the source. This move will help enable the 'dtbs' target which builds all the dtbs regardless of kernel config. This transition could break some scripts if they expect dtb files in the old location. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Rob Herring --- Please ack so I can take the whole series via the DT tree. arch/powerpc/Makefile | 2 +- arch/powerpc/boot/Makefile | 49 ++++++++++++++++------------------ arch/powerpc/boot/dts/Makefile | 1 + 3 files changed, 25 insertions(+), 27 deletions(-) create mode 100644 arch/powerpc/boot/dts/Makefile diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 11a1acba164a..53ea887eb34e 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -294,7 +294,7 @@ bootwrapper_install: $(Q)$(MAKE) $(build)=$(boot) $(patsubst %,$(boot)/%,$@) %.dtb: scripts - $(Q)$(MAKE) $(build)=$(boot) $(patsubst %,$(boot)/%,$@) + $(Q)$(MAKE) $(build)=$(boot)/dts $(patsubst %,$(boot)/dts/%,$@) # Used to create 'merged defconfigs' # To use it $(call) it with the first argument as the base defconfig diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 0fb96c26136f..b201d93e1725 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -381,11 +381,11 @@ $(addprefix $(obj)/, $(sort $(filter zImage.%, $(image-y)))): vmlinux $(wrapperb $(call if_changed,wrap,$(subst $(obj)/zImage.,,$@)) # dtbImage% - a dtbImage is a zImage with an embedded device tree blob -$(obj)/dtbImage.initrd.%: vmlinux $(wrapperbits) $(obj)/%.dtb FORCE - $(call if_changed,wrap,$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz) +$(obj)/dtbImage.initrd.%: vmlinux $(wrapperbits) $(obj)/dts/%.dtb FORCE + $(call if_changed,wrap,$*,,$(obj)/dts/$*.dtb,$(obj)/ramdisk.image.gz) -$(obj)/dtbImage.%: vmlinux $(wrapperbits) $(obj)/%.dtb FORCE - $(call if_changed,wrap,$*,,$(obj)/$*.dtb) +$(obj)/dtbImage.%: vmlinux $(wrapperbits) $(obj)/dts/%.dtb FORCE + $(call if_changed,wrap,$*,,$(obj)/dts/$*.dtb) # This cannot be in the root of $(src) as the zImage rule always adds a $(obj) # prefix @@ -395,36 +395,33 @@ $(obj)/vmlinux.strip: vmlinux $(obj)/uImage: vmlinux $(wrapperbits) FORCE $(call if_changed,wrap,uboot) -$(obj)/uImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits) FORCE - $(call if_changed,wrap,uboot-$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz) +$(obj)/uImage.initrd.%: vmlinux $(obj)/dts/%.dtb $(wrapperbits) FORCE + $(call if_changed,wrap,uboot-$*,,$(obj)/dts/$*.dtb,$(obj)/ramdisk.image.gz) -$(obj)/uImage.%: vmlinux $(obj)/%.dtb $(wrapperbits) FORCE - $(call if_changed,wrap,uboot-$*,,$(obj)/$*.dtb) +$(obj)/uImage.%: vmlinux $(obj)/dts/%.dtb $(wrapperbits) FORCE + $(call if_changed,wrap,uboot-$*,,$(obj)/dts/$*.dtb) -$(obj)/cuImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits) FORCE - $(call if_changed,wrap,cuboot-$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz) +$(obj)/cuImage.initrd.%: vmlinux $(obj)/dts/%.dtb $(wrapperbits) FORCE + $(call if_changed,wrap,cuboot-$*,,$(obj)/dts/$*.dtb,$(obj)/ramdisk.image.gz) -$(obj)/cuImage.%: vmlinux $(obj)/%.dtb $(wrapperbits) FORCE - $(call if_changed,wrap,cuboot-$*,,$(obj)/$*.dtb) +$(obj)/cuImage.%: vmlinux $(obj)/dts/%.dtb $(wrapperbits) FORCE + $(call if_changed,wrap,cuboot-$*,,$(obj)/dts/$*.dtb) -$(obj)/simpleImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits) FORCE - $(call if_changed,wrap,simpleboot-$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz) +$(obj)/simpleImage.initrd.%: vmlinux $(obj)/dts/%.dtb $(wrapperbits) FORCE + $(call if_changed,wrap,simpleboot-$*,,$(obj)/dts/$*.dtb,$(obj)/ramdisk.image.gz) -$(obj)/simpleImage.%: vmlinux $(obj)/%.dtb $(wrapperbits) FORCE - $(call if_changed,wrap,simpleboot-$*,,$(obj)/$*.dtb) +$(obj)/simpleImage.%: vmlinux $(obj)/dts/%.dtb $(wrapperbits) FORCE + $(call if_changed,wrap,simpleboot-$*,,$(obj)/dts/$*.dtb) -$(obj)/treeImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits) FORCE - $(call if_changed,wrap,treeboot-$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz) +$(obj)/treeImage.initrd.%: vmlinux $(obj)/dts/%.dtb $(wrapperbits) FORCE + $(call if_changed,wrap,treeboot-$*,,$(obj)/dts/$*.dtb,$(obj)/ramdisk.image.gz) -$(obj)/treeImage.%: vmlinux $(obj)/%.dtb $(wrapperbits) FORCE - $(call if_changed,wrap,treeboot-$*,,$(obj)/$*.dtb) +$(obj)/treeImage.%: vmlinux $(obj)/dts/%.dtb $(wrapperbits) FORCE + $(call if_changed,wrap,treeboot-$*,,$(obj)/dts/$*.dtb) -# Rule to build device tree blobs -$(obj)/%.dtb: $(src)/dts/%.dts FORCE - $(call if_changed_dep,dtc) - -$(obj)/%.dtb: $(src)/dts/fsl/%.dts FORCE - $(call if_changed_dep,dtc) +# Needed for the above targets to work with dts/fsl/ files +$(obj)/dts/%.dtb: $(obj)/dts/fsl/%.dtb + @cp $< $@ # If there isn't a platform selected then just strip the vmlinux. ifeq (,$(image-y)) diff --git a/arch/powerpc/boot/dts/Makefile b/arch/powerpc/boot/dts/Makefile new file mode 100644 index 000000000000..f66554cd5c45 --- /dev/null +++ b/arch/powerpc/boot/dts/Makefile @@ -0,0 +1 @@ +# SPDX-License-Identifier: GPL-2.0 -- 2.17.1