From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96589C6778D for ; Tue, 11 Sep 2018 15:40:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4448E20866 for ; Tue, 11 Sep 2018 15:40:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="z7dB9g6A" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4448E20866 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727865AbeIKUkP (ORCPT ); Tue, 11 Sep 2018 16:40:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:54732 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726981AbeIKUkO (ORCPT ); Tue, 11 Sep 2018 16:40:14 -0400 Received: from mail-qt0-f180.google.com (mail-qt0-f180.google.com [209.85.216.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 27FE220896; Tue, 11 Sep 2018 15:40:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1536680421; bh=nUdRa2GZMl/vIJ/aXz//ZUz1Z56ZGs5/inYrg4Jpmmw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=z7dB9g6AqF2Rh+QcRCQV6tR/bYmWjldPmKQqYoEMxEUH6DRMVws5oVR937OAOVzIN 398Kvm38gF8t5tKptnoFJhBbmNjh5BT1ltIralrQIy2wtHYULusdFiidghY+pRcY3y VprQf8QksU4JQY6UpmIqM9zJkQVyzXmKQNENJPYo= Received: by mail-qt0-f180.google.com with SMTP id o15-v6so28673579qtk.6; Tue, 11 Sep 2018 08:40:21 -0700 (PDT) X-Gm-Message-State: APzg51DcEnUuRKL2pt5lDLdf/jJw/ndI0yR5EKQeP6RQFAombVfAm5gQ SQQwttDAu1/v5WGa/eT13bJrm3RpJ8fHfccgfg== X-Google-Smtp-Source: ANB0VdbI4+2Kwc4KDe+gT15iLXZI7ixWvkk3Tr9ih69wHGm7FZfAaUX1VsiXmx93SKLNypQ7Untbz/TiuQLE4FQ554Q= X-Received: by 2002:a0c:d5d3:: with SMTP id h19-v6mr19244034qvi.218.1536680420205; Tue, 11 Sep 2018 08:40:20 -0700 (PDT) MIME-Version: 1.0 References: <20180910150403.19476-1-robh@kernel.org> <20180910150403.19476-7-robh@kernel.org> In-Reply-To: <20180910150403.19476-7-robh@kernel.org> From: Rob Herring Date: Tue, 11 Sep 2018 10:40:07 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 6/9] kbuild: consolidate Devicetree dtb build rules To: devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , Masahiro Yamada Cc: Frank Rowand , Michal Marek , Vineet Gupta , Russell King , Catalin Marinas , Yoshinori Sato , Michal Simek , Ralf Baechle , James Hogan , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Chris Zankel , Max Filippov , Linux Kbuild mailing list , arcml , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , "moderated list:H8/300 ARCHITECTURE" , Linux-MIPS , nios2-dev@lists.rocketboards.org, linuxppc-dev , linux-xtensa@linux-xtensa.org, Will Deacon , Paul Burton , Ley Foon Tan Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 10, 2018 at 10:04 AM Rob Herring wrote: > > There is nothing arch specific about building dtb files other than their > location under /arch/*/boot/dts/. Keeping each arch aligned is a pain. > The dependencies and supported targets are all slightly different. > Also, a cross-compiler for each arch is needed, but really the host > compiler preprocessor is perfectly fine for building dtbs. Move the > build rules to a common location and remove the arch specific ones. This > is done in a single step to avoid warnings about overriding rules. > > The build dependencies had been a mixture of 'scripts' and/or 'prepare'. > These pull in several dependencies some of which need a target compiler > (specifically devicetable-offsets.h) and aren't needed to build dtbs. > All that is really needed is dtc, so adjust the dependencies to only be > dtc. > > This change enables support 'dtbs_install' on some arches which were > missing the target. [...] > @@ -1215,6 +1215,33 @@ kselftest-merge: > $(srctree)/tools/testing/selftests/*/config > +$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig > > +# --------------------------------------------------------------------------- > +# Devicetree files > + > +ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/boot/dts/),) > +dtstree := arch/$(SRCARCH)/boot/dts > +endif > + > +ifdef CONFIG_OF_EARLY_FLATTREE This can be true when dtstree is unset. So this line should be this instead to fix the 0-day reported error: ifneq ($(dtstree),) > + > +%.dtb : scripts_dtc > + $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ > + > +PHONY += dtbs dtbs_install > +dtbs: scripts_dtc > + $(Q)$(MAKE) $(build)=$(dtstree) > + > +dtbs_install: dtbs > + $(Q)$(MAKE) $(dtbinst)=$(dtstree) > + > +all: dtbs > + > +endif