linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Rowand <frowand.list@gmail.com>
To: Viresh Kumar <viresh.kumar@linaro.org>,
	Masahiro Yamada <masahiroy@kernel.org>
Cc: Michal Marek <michal.lkml@markovi.net>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	David Gibson <david@gibson.dropbear.id.au>,
	Michal Simek <michal.simek@xilinx.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Anmar Oueja <anmar.oueja@linaro.org>,
	Bill Mills <bill.mills@linaro.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V11 3/5] kbuild: Allow .dtso format for overlay source files
Date: Fri, 12 Mar 2021 01:09:25 -0600	[thread overview]
Message-ID: <4d9bee7a-416e-50a1-65a5-0674ae83d42e@gmail.com> (raw)
In-Reply-To: <17c65559-865f-f742-660f-0ab30ed45d90@gmail.com>

On 3/12/21 1:03 AM, Frank Rowand wrote:
> Hi Viresh,
> 
> On 3/11/21 10:47 PM, Viresh Kumar wrote:
>> On 10-03-21, 20:24, Masahiro Yamada wrote:
>>> Even without "-I dts",
>>>
>>>    inform = guess_input_format(arg, "dts");
>>>
>>> seems to fall back to "dts" anyway,
>>> but I guess you wanted to make this explicit, correct?
>>
>>
>>>> +# Required for of unit-test files as they can't be renamed to .dtso
>>>
>>> If you go with *.dtso, I think you will rename
>>> all *.dts under the drivers/ directory.
>>>
>>> What is blocking you from making this consistent?
>>
>> What about this patch instead ? This localizes the dts->dtbo hack to
>> unitest's Makefile at least.
> 
> It is late here, so I am not going to take the time to actually try what
> I am going to suggest.  I apologize in advance if I send you off on a
> wild goose chase.
> 
> Would it work to create a .dtso file for each of the unittest overlay .dts
> files, where the .dtso would simply #include the .dts file.  Then the corresponding
> .dtbo files could be added to the obj-$(CONFIG_OF_OVERLAY) list.

I suggested having the .dtso files include the .dts file because that is a relatively
small and easy change to test.  What would probably make more sense is the rename
the existing overlay .dts files to be .dtso files and then for each overlay .dtso
file create a new .dts file that #includes the corresponding .dtso file.  This is
more work and churn, but easier to document that the .dts files are a hack that is
needed so that the corresponding .dtb.S files will be generated.

If it works, I am fine with either approach.

-Frank

> 
> I would like to avoid having the unitest-data/Makefile have different rules to
> build objects because then the normal build rule is not being tested.
> 
> -Frank
> 
>>
>> diff --git a/drivers/of/unittest-data/Makefile b/drivers/of/unittest-data/Makefile
>> index a5d2d9254b2c..9f3426ec3fab 100644
>> --- a/drivers/of/unittest-data/Makefile
>> +++ b/drivers/of/unittest-data/Makefile
>> @@ -86,3 +86,7 @@ static_test_1-dtbs := static_base_1.dtb $(apply_static_overlay_1)
>>  static_test_2-dtbs := static_base_2.dtb $(apply_static_overlay_2)
>>  
>>  dtb-$(CONFIG_OF_OVERLAY) += static_test_1.dtb static_test_2.dtb
>> +
>> +# Required for of unittest files as they can't be renamed to .dtso
>> +$(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE
>> +       $(call if_changed_dep,dtc)
>> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
>> index bc045a54a34e..77a9be055e51 100644
>> --- a/scripts/Makefile.lib
>> +++ b/scripts/Makefile.lib
>> @@ -347,7 +347,7 @@ cmd_dtc = $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ;
>>  $(obj)/%.dtb: $(src)/%.dts $(DTC) FORCE
>>         $(call if_changed_dep,dtc)
>>  
>> -$(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE
>> +$(obj)/%.dtbo: $(src)/%.dtso $(DTC) FORCE
>>         $(call if_changed_dep,dtc)
>>  
>>  overlay-y := $(addprefix $(obj)/, $(overlay-y))
>> @@ -375,6 +375,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
>> +       $(call if_changed_rule,dtc,yaml)
>> +
>>  dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
>>  
>>  # Bzip2
>>
> 


  reply	other threads:[~2021-03-12  7:10 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10  5:35 [PATCH V11 0/5] dt: Add fdtoverlay rule and statically build unittest Viresh Kumar
2021-03-10  5:35 ` [PATCH V11 1/5] kbuild: Simplify builds with CONFIG_OF_ALL_DTBS Viresh Kumar
2021-03-10  5:35 ` [PATCH V11 2/5] kbuild: Add generic rule to apply fdtoverlay Viresh Kumar
2021-03-10  5:35 ` [PATCH V11 3/5] kbuild: Allow .dtso format for overlay source files Viresh Kumar
2021-03-10 11:24   ` Masahiro Yamada
2021-03-10 11:29     ` Masahiro Yamada
2021-03-10 14:48       ` Viresh Kumar
2021-03-10 15:18         ` Masahiro Yamada
2021-03-12  3:52           ` Viresh Kumar
2021-03-10 14:47     ` Viresh Kumar
2021-03-10 15:15       ` Masahiro Yamada
2021-03-10 22:42         ` Frank Rowand
2021-03-12  4:47     ` Viresh Kumar
2021-03-12  7:03       ` Frank Rowand
2021-03-12  7:09         ` Frank Rowand [this message]
2021-03-12  7:13           ` Viresh Kumar
2021-03-13  5:11             ` Frank Rowand
2021-03-15  1:16               ` Frank Rowand
2021-03-15  6:40                 ` Viresh Kumar
2021-03-15 17:43                   ` Masahiro Yamada
2021-03-15 22:12                     ` Laurent Pinchart
2021-03-16  5:39                       ` Frank Rowand
2021-03-16  8:01                         ` Geert Uytterhoeven
2021-04-09  6:03                           ` Masahiro Yamada
2021-03-16  5:27                     ` Viresh Kumar
2021-03-16  5:36                   ` Frank Rowand
2021-03-16  5:42                     ` Viresh Kumar
2021-03-24  7:34                       ` Frank Rowand
2021-03-24 22:45                         ` Frank Rowand
2021-03-10  5:35 ` [PATCH V11 4/5] of: unittest: Create overlay_common.dtsi and testcases_common.dtsi Viresh Kumar
2021-03-10  5:35 ` [PATCH V11 5/5] of: unittest: Statically apply overlays using fdtoverlay Viresh Kumar
2021-03-11 23:27 ` [PATCH V11 0/5] dt: Add fdtoverlay rule and statically build unittest Frank Rowand
2021-03-12  4:31   ` Viresh Kumar
2021-03-12  6:46     ` Frank Rowand
2021-03-12  4:32 ` Viresh Kumar
2021-03-15 17:13 ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4d9bee7a-416e-50a1-65a5-0674ae83d42e@gmail.com \
    --to=frowand.list@gmail.com \
    --cc=anmar.oueja@linaro.org \
    --cc=bill.mills@linaro.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=michal.simek@xilinx.com \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).