Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1576534pxb; Thu, 4 Mar 2021 15:17:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJxGEorjee7i7d4V7SdKSBbRxU7D2YAaYV0mEA3jhlRGyoYl7VATnaRHMNYoAjKfk0NvvKIR X-Received: by 2002:a05:6638:d8a:: with SMTP id l10mr6680645jaj.2.1614899867567; Thu, 04 Mar 2021 15:17:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614899867; cv=none; d=google.com; s=arc-20160816; b=EMNoBorgqz3+HtpRNQhO7Xnv+GSgqsfIBBM7OlTuHPHNgfmbcNt9ww+20AqqwELIha b9SHTxFjfwdexP4gfTJAtP61nM6ZJK9G9Lx+hrW5GGIxnjUl1MF7epYbti0mzif28VCe 9RG1YxX/0jW7Y3CzW5mKo3SckszvCxeDC1NJBE2EtKoVletmDJi6YHxojgmteveMR/wf YE4jtkp+cVNh3qC4eCn0ijDDAGMMgmK9Yb2s4fR6U6NqDLkkeiDtmYKCk3WH7ca8DyAE cI1jlVBFqDxirqg8L8WVXTJnZYg7URCW0Wkc3BdghTOTg7xehizw7+3B4Cmsg0rj91im EKDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=ydOaHK4WbXFZR/Zhm4NkRAdn9Nr1Up0uaDVYzRfkDGE=; b=O7freI5+xHHamcDxSXQe8koglLSrJLHfi5R4lZJEqiRpk3ITnor0Hb+imR7LMDpYs9 cWnDgXB+fW7hWAsRqlESFrpTdnGp3RENLWQzoHuHdqeXXycUI29Naa4uzuNiSyNDGRtB jtqCHWbj+R18JhZoOHNZXrlsMQq1sGAh0NvX5L0sfKY3eFp6XiQfaO25M0wjR9yIwYyz SkjnYM2kGo1gN/JCTQk3YfcOdMTkq7G9fpYx/UZ1ofeDQQlxSna5LI0s9Y5s0sOl6SNA H+IuWJpDTlHUasCkmYeRIUK5pELmaiKbTZ0NRnp++OL8bibdccVIjdF3lOX0Ii8PpVvy V2BA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g16si633177ion.86.2021.03.04.15.17.33; Thu, 04 Mar 2021 15:17:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1573815AbhCCQ3p (ORCPT + 99 others); Wed, 3 Mar 2021 11:29:45 -0500 Received: from mail-ot1-f46.google.com ([209.85.210.46]:46384 "EHLO mail-ot1-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352585AbhCCLzD (ORCPT ); Wed, 3 Mar 2021 06:55:03 -0500 Received: by mail-ot1-f46.google.com with SMTP id u3so5059601otg.13 for ; Wed, 03 Mar 2021 03:54:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ydOaHK4WbXFZR/Zhm4NkRAdn9Nr1Up0uaDVYzRfkDGE=; b=SAnAD/P5gACNIiBkZxCoafEyj0xOBiiIyi3snp+E03thNMK3YLPHF8vh7X6R7ANYTJ WuDN9qI1cFBDtzh3pCeg5PMNc1o7u5nI9pRifHAmj7YxyOa56EQXFVCKnv7pva7BrGQM EcRnY1tzJhyPjwAIUSDoKmMobTj6+nflCB40dyRVZ6/HYsxUHs4MSkhtQX9VzbdGoMe4 MYmklLZ+3VyS40rC0ZubgcfvE0zHdeoGJBlTcbtNzktqxko42PBvdXWk+lknCYGauyBm nW/6BGNDswB5e6O5ADEgmfpyMdb9ibit7XbSF+QBZfHLIGHiFc6C0MXcypaAS1PaGyHG yiyA== X-Gm-Message-State: AOAM530BZeMAQ5lVEmd7+CvTrrez0wDIvfVv5AezniNcQpH2uLAt6+bt dcdKVz2ePFZNk9FLppQKyeN6FK+tjeotJU2v2+B+L5CH0zA= X-Received: by 2002:ab0:66c3:: with SMTP id d3mr14344471uaq.2.1614768301840; Wed, 03 Mar 2021 02:45:01 -0800 (PST) MIME-Version: 1.0 References: <434ba2467dd0cd011565625aeb3450650afe0aae.1611904394.git.viresh.kumar@linaro.org> <20210205092507.fdxotdjlq5rjs2yh@vireshk-i7> <20210205095545.woevnkxg3ar7ctys@vireshk-i7> <20210205210814.GA3707622@robh.at.kernel.org> <02728dac-5666-9c2b-bd46-9c2eabbb2ed8@gmail.com> <20210303052125.uh32ndnu5d6mem7c@vireshk-i7> In-Reply-To: <20210303052125.uh32ndnu5d6mem7c@vireshk-i7> From: Geert Uytterhoeven Date: Wed, 3 Mar 2021 11:44:50 +0100 Message-ID: Subject: Re: [PATCH V7 4/6] kbuild: Add support to build overlays (%.dtbo) To: Viresh Kumar Cc: Frank Rowand , Rob Herring , Pantelis Antoniou , Masahiro Yamada , Michal Marek , Vincent Guittot , Linux Kernel Mailing List , Anmar Oueja , Bill Mills , David Gibson , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , linux-kbuild Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Viresh, On Wed, Mar 3, 2021 at 6:21 AM Viresh Kumar wrote: > On 24-02-21, 19:32, Frank Rowand wrote: > > I overlooked this and mistakenly thought that the move to .dtbo also > > involved changing to .dtso. My bad. > > > > My favorite color here is to use .dtso for the source file that will > > be compiled to create a .dtbo. > > > > Linus has already accepted patch 4/6 to 5.12-rc1, so changing to .dtso > > will require another patch. > > Looks like this is what many people desire, lets do it and make it a > standard even if it wasn't followed earlier. > > What about this ? Thanks, looks good to me, and works for me, so Reviewed-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven > --- a/scripts/Makefile.lib > +++ b/scripts/Makefile.lib > @@ -337,7 +337,7 @@ $(obj)/%.dtb.S: $(obj)/%.dtb FORCE > > quiet_cmd_dtc = DTC $@ > cmd_dtc = $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ > - $(DTC) -O $(patsubst .%,%,$(suffix $@)) -o $@ -b 0 \ > + $(DTC) -I dts -O $(patsubst .%,%,$(suffix $@)) -o $@ -b 0 \ > $(addprefix -i,$(dir $<) $(DTC_INCLUDE)) $(DTC_FLAGS) \ > -d $(depfile).dtc.tmp $(dtc-tmp) ; \ > cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) > @@ -348,6 +348,9 @@ $(obj)/%.dtb: $(src)/%.dts $(DTC) FORCE > $(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE > $(call if_changed_dep,dtc) > > +$(obj)/%.dtbo: $(src)/%.dtso $(DTC) FORCE > + $(call if_changed_dep,dtc) > + > overlay-y := $(addprefix $(obj)/, $(overlay-y)) > > quiet_cmd_fdtoverlay = DTOVL $@ > @@ -373,6 +376,9 @@ endef > $(obj)/%.dt.yaml: $(src)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE > $(call if_changed_rule,dtc,yaml) > > +$(obj)/%.dt.yaml: $(src)/%.dtso $(DTC) $(DT_TMP_SCHEMA) FORCE I'm wondering if "dt.yaml" should be changed to "dto.yaml" (here and in the existing rule earlier in Makefile.lib), to avoid issues if both foo.dts and foo.dtso exist? Unlikely, but it might happen... > I had to keep the original line as is: > > $(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE > > to support the unittest stuff as there are no dtso files there. There > are few things we can do here: > > - Don't follow the dtso/dtbo convention for unittest, build files as > dtb only and everything will continue to work I suppose as > fdtoverlay won't complain. > > - Keep the above line in Makefile, this doesn't sound right, isn't it > ? > > - Make .dts links for unittest file, maybe from the Makefile itself. > > - Something else ? Rename unittest .dts files to .dtso where applicable? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds