From: Masahiro Yamada <masahiroy@kernel.org>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Michal Marek <michal.lkml@markovi.net>,
Vincent Guittot <vincent.guittot@linaro.org>,
David Gibson <david@gibson.dropbear.id.au>,
Frank Rowand <frowand.list@gmail.com>,
Michal Simek <michal.simek@xilinx.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Anmar Oueja <anmar.oueja@linaro.org>,
Bill Mills <bill.mills@linaro.org>, Rob Herring <robh@kernel.org>,
Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V9 2/4] kbuild: Add generic rule to apply fdtoverlay
Date: Sat, 6 Mar 2021 15:07:16 +0900 [thread overview]
Message-ID: <CAK7LNAR=MT0Uw29_mjNPnNtS9VhbF553W=WNk-9TeoYB6+k81A@mail.gmail.com> (raw)
In-Reply-To: <263ac0777bee9384b66fb4e74ed3abdc45a1bb82.1614745266.git.viresh.kumar@linaro.org>
On Wed, Mar 3, 2021 at 1:36 PM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> From: Rob Herring <robh@kernel.org>
>
> Add a generic rule to apply fdtoverlay in Makefile.lib, so every
> platform doesn't need to carry the complex rule.
>
> The platform's Makefile only needs to have this now:
>
> DTC_FLAGS_foo_base += -@
> foo-dtbs := foo_base.dtb foo_overlay1.dtbo foo_overlay2.dtbo
> dtb-y := foo.dtb
>
> We don't want to run schema checks on foo.dtb (as foo.dts doesn't exist)
> and the Makefile is updated accordingly.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> Co-developed-by: Viresh Kumar <viresh.kumar@linaro.org>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> scripts/Makefile.lib | 24 ++++++++++++++++++++++--
> 1 file changed, 22 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index a2658242d956..c430fbb36763 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -58,6 +58,10 @@ real-search = $(foreach m,$(1), $(if $(strip $(call suffix-search,$(m),$(2) -)),
> real-obj-y := $(call real-search, $(obj-y),-objs -y)
> real-obj-m := $(call real-search, $(obj-m),-objs -y -m)
>
> +# List all dtbs to be generated by fdtoverlay
> +overlay-y := $(foreach m,$(dtb-y), $(if $(strip $($(m:.dtb=-dtbs))),$(m),))
> +overlay-$(CONFIG_OF_ALL_DTBS) += $(foreach m,$(dtb-), $(if $(strip $($(m:.dtb=-dtbs))),$(m),))
This does not benefit from 1/4.
Squashing the following will shorten the code.
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index e12633f4057d..44a1652ddcd7 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -58,10 +58,6 @@ real-search = $(foreach m,$(1), $(if $(strip $(call
suffix-search,$(m),$(2) -)),
real-obj-y := $(call real-search, $(obj-y),-objs -y)
real-obj-m := $(call real-search, $(obj-m),-objs -y -m)
-# List all dtbs to be generated by fdtoverlay
-overlay-y := $(foreach m,$(dtb-y), $(if $(strip $($(m:.dtb=-dtbs))),$(m),))
-overlay-$(CONFIG_OF_ALL_DTBS) += $(foreach m,$(dtb-), $(if $(strip
$($(m:.dtb=-dtbs))),$(m),))
-
always-y += $(always-m)
# hostprogs-always-y += foo
@@ -75,13 +71,16 @@ always-y += $(hostprogs-always-y) $(hostprogs-always-m)
userprogs += $(userprogs-always-y) $(userprogs-always-m)
always-y += $(userprogs-always-y) $(userprogs-always-m)
+# If CONFIG_OF_ALL_DTBS is enabled, all DT blobs are built
+dtb-$(CONFIG_OF_ALL_DTBS) += $(dtb-)
+
+# List all dtbs to be generated by fdtoverlay
+overlay-y := $(foreach m,$(dtb-y), $(if $(strip $($(m:.dtb=-dtbs))),$(m),))
+
# DTB
# Add base dtb and overlay dtbo
dtb-y += $(foreach m,$(overlay-y), $($(m:.dtb=-dtbs)))
-# If CONFIG_OF_ALL_DTBS is enabled, all DT blobs are built
-dtb-$(CONFIG_OF_ALL_DTBS) += $(dtb-)
-
always-y += $(dtb-y)
ifneq ($(CHECK_DTBS),)
--
Best Regards
Masahiro Yamada
next prev parent reply other threads:[~2021-03-06 6:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-03 4:36 [PATCH V9 0/4] dt: Add fdtoverlay rule and statically build unittest Viresh Kumar
2021-03-03 4:36 ` [PATCH V9 1/4] kbuild: Simplify builds with CONFIG_OF_ALL_DTBS Viresh Kumar
2021-03-05 16:46 ` Masahiro Yamada
2021-03-03 4:36 ` [PATCH V9 2/4] kbuild: Add generic rule to apply fdtoverlay Viresh Kumar
2021-03-03 10:49 ` Geert Uytterhoeven
2021-03-03 10:56 ` Viresh Kumar
2021-03-06 6:07 ` Masahiro Yamada [this message]
2021-03-03 4:36 ` [PATCH V9 3/4] of: unittest: Create overlay_common.dtsi and testcases_common.dtsi Viresh Kumar
2021-03-03 4:36 ` [PATCH V9 4/4] of: unittest: Statically apply overlays using fdtoverlay Viresh Kumar
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='CAK7LNAR=MT0Uw29_mjNPnNtS9VhbF553W=WNk-9TeoYB6+k81A@mail.gmail.com' \
--to=masahiroy@kernel.org \
--cc=anmar.oueja@linaro.org \
--cc=bill.mills@linaro.org \
--cc=david@gibson.dropbear.id.au \
--cc=frowand.list@gmail.com \
--cc=geert@linux-m68k.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.lkml@markovi.net \
--cc=michal.simek@xilinx.com \
--cc=robh@kernel.org \
--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).