devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [RFC][PATCH] kbuild: Generate symbols for DTO application in DTBs
       [not found] <20220407110522.122393-1-marex@denx.de>
@ 2022-04-07 12:30 ` Masahiro Yamada
  2022-04-10  0:07   ` Marek Vasut
  0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2022-04-07 12:30 UTC (permalink / raw)
  To: Marek Vasut, DTML; +Cc: Linux Kbuild mailing list, Rob Herring

Hi Marek.
(+CC Rob, DT ML)

On Thu, Apr 7, 2022 at 8:05 PM Marek Vasut <marex@denx.de> wrote:
>
> Emit symbols section in DTBs to permit symbol resolution when applying DTOs.

I CCed DT folks, but if I remember correctly, adding -@ globally
was NACKed because it would increase blob size for platforms that
do not need overlay.


> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Masahiro Yamada <masahiroy@kernel.org>
> ---
> NOTE: I am sending this as RFC, because I suspect there is a better way how
>       to pass extra flags to DTC during kernel build ?
>       Maybe from shell environment somehow ?


For local use, yes, you can add -@ from the command line.

Try this:

    DTC_FLAGS=-@  make ARCH=arm64 dtbs


This is undocumented tip, but it seems to work
for the current code.



>       Or maybe b7e70391a5451 ("arm64: tegra: Enable device-tree overlay support")
>       is the way to go about this ?


Since commit 15d16d6dadf6947ac7f9a686c615995c5a426ce2,
adding -@ is automatic for platforms that support overlay.


If  <platform>-dtbs exists, -@ is automatically added.

See arch/arm64/boot/dts/xilinx/Makefile
as an example code.





> ---
>  arch/arm/boot/dts/Makefile   | 3 +++
>  arch/arm64/boot/dts/Makefile | 3 +++
>  2 files changed, 6 insertions(+)
>
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 252353fb4e3b3..2d50302d077dd 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -1,4 +1,7 @@
>  # SPDX-License-Identifier: GPL-2.0
> +
> +DTC_FLAGS += -@
> +
>  dtb-$(CONFIG_ARCH_ALPINE) += \
>         alpine-db.dtb
>  dtb-$(CONFIG_MACH_ARTPEC6) += \
> diff --git a/arch/arm64/boot/dts/Makefile b/arch/arm64/boot/dts/Makefile
> index 1ba04e31a4387..f7b3c86517a0e 100644
> --- a/arch/arm64/boot/dts/Makefile
> +++ b/arch/arm64/boot/dts/Makefile
> @@ -1,4 +1,7 @@
>  # SPDX-License-Identifier: GPL-2.0
> +
> +DTC_FLAGS += -@
> +
>  subdir-y += actions
>  subdir-y += allwinner
>  subdir-y += altera
> --
> 2.35.1
>


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [RFC][PATCH] kbuild: Generate symbols for DTO application in DTBs
  2022-04-07 12:30 ` [RFC][PATCH] kbuild: Generate symbols for DTO application in DTBs Masahiro Yamada
@ 2022-04-10  0:07   ` Marek Vasut
  0 siblings, 0 replies; 2+ messages in thread
From: Marek Vasut @ 2022-04-10  0:07 UTC (permalink / raw)
  To: Masahiro Yamada, DTML; +Cc: Linux Kbuild mailing list, Rob Herring

On 4/7/22 14:30, Masahiro Yamada wrote:
> Hi Marek.
> (+CC Rob, DT ML)

Hi,

> On Thu, Apr 7, 2022 at 8:05 PM Marek Vasut <marex@denx.de> wrote:
>>
>> Emit symbols section in DTBs to permit symbol resolution when applying DTOs.
> 
> I CCed DT folks, but if I remember correctly, adding -@ globally
> was NACKed because it would increase blob size for platforms that
> do not need overlay.
> 
> 
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> Cc: Masahiro Yamada <masahiroy@kernel.org>
>> ---
>> NOTE: I am sending this as RFC, because I suspect there is a better way how
>>        to pass extra flags to DTC during kernel build ?
>>        Maybe from shell environment somehow ?
> 
> 
> For local use, yes, you can add -@ from the command line.
> 
> Try this:
> 
>      DTC_FLAGS=-@  make ARCH=arm64 dtbs
> 
> 
> This is undocumented tip, but it seems to work
> for the current code.

This is real nice (and very much what I need), thank you.

>>        Or maybe b7e70391a5451 ("arm64: tegra: Enable device-tree overlay support")
>>        is the way to go about this ?
> 
> 
> Since commit 15d16d6dadf6947ac7f9a686c615995c5a426ce2,
> adding -@ is automatic for platforms that support overlay.
> 
> 
> If  <platform>-dtbs exists, -@ is automatically added.
> 
> See arch/arm64/boot/dts/xilinx/Makefile
> as an example code.

Is it now allowed to start upstreaming DT overlays then ?
That would be nice too.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-10  0:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20220407110522.122393-1-marex@denx.de>
2022-04-07 12:30 ` [RFC][PATCH] kbuild: Generate symbols for DTO application in DTBs Masahiro Yamada
2022-04-10  0:07   ` Marek Vasut

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).