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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK7LNAS3nQjQ8-4HEGfnRbgWSmLrT5EHFzXs-YXjfB7LRHO8ZA@mail.gmail.com>
Date: Fri, 19 Jan 2024 14:30:47 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Rob Herring <robh@...nel.org>
Cc: linux-kbuild@...r.kernel.org, devicetree@...r.kernel.org, 
	Simon Glass <sjg@...omium.org>, Nathan Chancellor <nathan@...nel.org>, 
	Nick Desaulniers <ndesaulniers@...gle.com>, Nicolas Schier <nicolas@...sle.eu>, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4] kbuild: simplify dtbs_install by reading the list of
 compiled DTBs

On Wed, Jan 17, 2024 at 11:52 PM Rob Herring <robh@...nel.org> wrote:
>
> On Tue, Jan 09, 2024 at 09:07:35PM +0900, Masahiro Yamada wrote:
> > Retrieve the list of *.dtb(o) files from arch/*/boot/dts/dtbs-list
> > instead of traversing the directory tree again.
>
> Don't you need dtbs-list in .gitignore?


Yes.


1/4 added it.












> >
> > Please note that 'make dtbs_install' installs *.dtb(o) files directly
> > added to dtb-y because scripts/Makefile.dtbinst installs $(dtb-y)
> > without expanding the -dtbs suffix.
> >
> > This commit preserves this behavior.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
> > ---
> >
> >  Makefile                 |  2 +-
> >  scripts/Kbuild.include   |  6 ------
> >  scripts/Makefile.dtbinst | 32 ++++++++++++++++++--------------
> >  3 files changed, 19 insertions(+), 21 deletions(-)
> >
> > diff --git a/Makefile b/Makefile
> > index db7f9e34a24e..dae6825b8082 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -1407,7 +1407,7 @@ endif
> >  dtbs_check: dtbs
> >
> >  dtbs_install:
> > -     $(Q)$(MAKE) $(dtbinst)=$(dtstree) dst=$(INSTALL_DTBS_PATH)
> > +     $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.dtbinst obj=$(dtstree)
> >
> >  ifdef CONFIG_OF_EARLY_FLATTREE
> >  all: dtbs
> > diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
> > index 7778cc97a4e0..2f331879816b 100644
> > --- a/scripts/Kbuild.include
> > +++ b/scripts/Kbuild.include
> > @@ -113,12 +113,6 @@ endef
> >  # $(Q)$(MAKE) $(build)=dir
> >  build := -f $(srctree)/scripts/Makefile.build obj
> >
> > -###
> > -# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.dtbinst obj=
> > -# Usage:
> > -# $(Q)$(MAKE) $(dtbinst)=dir
> > -dtbinst := -f $(srctree)/scripts/Makefile.dtbinst obj
> > -
> >  ###
> >  # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.clean obj=
> >  # Usage:
> > diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst
> > index 4405d5b67578..67956f6496a5 100644
> > --- a/scripts/Makefile.dtbinst
> > +++ b/scripts/Makefile.dtbinst
> > @@ -8,32 +8,36 @@
> >  #   $INSTALL_PATH/dtbs/$KERNELRELEASE
> >  # ==========================================================================
> >
> > -src := $(obj)
> > -
> >  PHONY := __dtbs_install
> >  __dtbs_install:
> >
> >  include include/config/auto.conf
> >  include $(srctree)/scripts/Kbuild.include
> > -include $(kbuild-file)
> >
> > -dtbs    := $(addprefix $(dst)/, $(dtb-y) $(if $(CONFIG_OF_ALL_DTBS),$(dtb-)))
> > -subdirs := $(addprefix $(obj)/, $(subdir-y) $(subdir-m))
> > -
> > -__dtbs_install: $(dtbs) $(subdirs)
> > -     @:
> > +dst := $(INSTALL_DTBS_PATH)
> >
> >  quiet_cmd_dtb_install = INSTALL $@
> >        cmd_dtb_install = install -D $< $@
> >
> > -$(dst)/%.dtb: $(obj)/%.dtb
> > +$(dst)/%: $(obj)/%
> >       $(call cmd,dtb_install)
> >
> > -$(dst)/%.dtbo: $(obj)/%.dtbo
> > -     $(call cmd,dtb_install)
> > +dtbs := $(patsubst $(obj)/%,%,$(call read-file, $(obj)/dtbs-list))
> >
> > -PHONY += $(subdirs)
> > -$(subdirs):
> > -     $(Q)$(MAKE) $(dtbinst)=$@ dst=$(if $(CONFIG_ARCH_WANT_FLAT_DTB_INSTALL),$(dst),$(patsubst $(obj)/%,$(dst)/%,$@))
> > +ifdef CONFIG_ARCH_WANT_FLAT_DTB_INSTALL
> > +
> > +define gen_install_rules
> > +$(dst)/%: $(obj)/$(1)%
> > +     $$(call cmd,dtb_install)
> > +endef
> > +
> > +$(foreach d, $(sort $(dir $(dtbs))), $(eval $(call gen_install_rules,$(d))))
> > +
> > +dtbs := $(notdir $(dtbs))
> > +
> > +endif # CONFIG_ARCH_WANT_FLAT_DTB_INSTALL
> > +
> > +__dtbs_install: $(addprefix $(dst)/, $(dtbs))
> > +     @:
> >
> >  .PHONY: $(PHONY)
> > --
> > 2.40.1
> >



-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ