lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK7LNAR=MT0Uw29_mjNPnNtS9VhbF553W=WNk-9TeoYB6+k81A@mail.gmail.com>
Date:   Sat, 6 Mar 2021 15:07:16 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Viresh Kumar <viresh.kumar@...aro.org>
Cc:     Michal Marek <michal.lkml@...kovi.net>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        David Gibson <david@...son.dropbear.id.au>,
        Frank Rowand <frowand.list@...il.com>,
        Michal Simek <michal.simek@...inx.com>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Anmar Oueja <anmar.oueja@...aro.org>,
        Bill Mills <bill.mills@...aro.org>,
        Rob Herring <robh@...nel.org>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V9 2/4] kbuild: Add generic rule to apply fdtoverlay

On Wed, Mar 3, 2021 at 1:36 PM Viresh Kumar <viresh.kumar@...aro.org> wrote:
>
> From: Rob Herring <robh@...nel.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@...nel.org>
> Co-developed-by: Viresh Kumar <viresh.kumar@...aro.org>
> Signed-off-by: Viresh Kumar <viresh.kumar@...aro.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ