All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: Eugeniu Rosca <erosca@de.adit-jv.com>
Cc: linux-kbuild@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
	devicetree@vger.kernel.org, Frank Rowand <frowand.list@gmail.com>,
	Matthias.Thomae@de.bosch.com, yyankovskyi@de.adit-jv.com,
	Eugeniu Rosca <roscaeugeniu@gmail.com>
Subject: Re: [PATCH 1/4] dt-bindings: fix error in 'make clean' after 'make dt_binding_check'
Date: Sun, 18 Jun 2023 03:09:56 +0900	[thread overview]
Message-ID: <CAK7LNAR8G1PxsdUi6dnbrDcbCKixkARgbHm94xskgNgWJ7aMTQ@mail.gmail.com> (raw)
In-Reply-To: <20230616194505.GA27753@lxhi-065>

On Sat, Jun 17, 2023 at 4:45 AM Eugeniu Rosca <erosca@de.adit-jv.com> wrote:
>
> Dear Yamada-san,
> Dear Kbuild experts,
>
> On Fri, Jun 26, 2020 at 02:04:31AM +0900, Masahiro Yamada wrote:
> > We are having more and more schema files.
> >
> > Commit 8b6b80218b01 ("dt-bindings: Fix command line length limit
> > calling dt-mk-schema") fixed the 'Argument list too long' error of
> > the schema checks, but the same error happens while cleaning too.
> >
> > 'make clean' after 'make dt_binding_check' fails as follows:
> >
> >   $ make dt_binding_check
> >     [ snip ]
> >   $ make clean
> >   make[2]: execvp: /bin/sh: Argument list too long
> >   make[2]: *** [scripts/Makefile.clean:52: __clean] Error 127
> >   make[1]: *** [scripts/Makefile.clean:66: Documentation/devicetree/bindings] Error 2
> >   make: *** [Makefile:1763: _clean_Documentation] Error 2
> >
> > 'make dt_binding_check' generates so many .example.dts, .dt.yaml files,
> > which are passed to the 'rm' command when you run 'make clean'.
> >
> > I added a small hack to use the 'find' command to clean up most of the
> > build artifacts before they are processed by scripts/Makefile.clean
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > ---
> >
> >  Documentation/devicetree/bindings/Makefile | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/Makefile b/Documentation/devicetree/bindings/Makefile
> > index a63898954068..f20d234aec46 100644
> > --- a/Documentation/devicetree/bindings/Makefile
> > +++ b/Documentation/devicetree/bindings/Makefile
> > @@ -53,3 +53,8 @@ $(obj)/processed-schema.yaml: $(DT_SCHEMA_FILES) check_dtschema_version FORCE
> >       $(call if_changed,mk_schema)
> >
> >  extra-y += processed-schema.yaml
> > +
> > +# Hack: avoid 'Argument list too long' error for 'make clean'. Remove most of
> > +# build artifacts here before they are processed by scripts/Makefile.clean
> > +clean-files = $(shell find $(obj) \( -name '*.example.dts' -o \
> > +                     -name '*.example.dt.yaml' \) -delete 2>/dev/null)
>
> JFYI, we are running into the "Argument list too long" simply by trying to
> clean an out-of-tree module (with lots of artifacts though), as below.
> Seems to be happening on vanilla (v6.4-rc6-199-gb73056e9f82ebd) too.
> Just in case there are any known hacks (or similar reports), please let us know.
>
> $ make -C /data/linux-src M=my_module clean
>
> make: Entering directory '/data/linux-src'
> make -f ./scripts/Makefile.clean obj=my_module
> set -e;  echo '  CLEAN   my_module';  rm -rf [~1k filenames / 200k char]
> make[1]: /bin/sh: Argument list too long
> make[1]: *** [scripts/Makefile.clean:45: __clean] Error 127


I sumitted a patch
https://patchwork.kernel.org/project/linux-kbuild/patch/20230617153025.1653851-1-masahiroy@kernel.org/

I do not know whether it will solve your problem or not.

Your module Makefile has ~1k files to remove.

It may still exceed ARG_MAX limit.




> --
> Best regards,
> Eugeniu Rosca



-- 
Best Regards
Masahiro Yamada

  reply	other threads:[~2023-06-17 18:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-25 17:04 [PATCH 0/4] dt-bindings: fix 'make clean' and improve dt-schema check rules Masahiro Yamada
2020-06-25 17:04 ` [PATCH 1/4] dt-bindings: fix error in 'make clean' after 'make dt_binding_check' Masahiro Yamada
2020-06-29 21:24   ` Rob Herring
2023-06-16 19:45   ` Eugeniu Rosca
2023-06-17 18:09     ` Masahiro Yamada [this message]
2023-06-19  9:27       ` Eugeniu Rosca
2020-06-25 17:04 ` [PATCH 2/4] dt-bindings: do not build processed-schema.yaml for " Masahiro Yamada
2020-06-29 21:24   ` Rob Herring
2020-06-25 17:04 ` [PATCH 3/4] dt-bindings: copy process-schema-examples.yaml to process-schema.yaml Masahiro Yamada
2020-06-29 21:25   ` Rob Herring
2020-06-25 17:04 ` [PATCH 4/4] dt-bindings: split DT schema check rules Masahiro Yamada
2020-06-29 20:49   ` Rob Herring
2020-06-30  1:51     ` Masahiro Yamada

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=CAK7LNAR8G1PxsdUi6dnbrDcbCKixkARgbHm94xskgNgWJ7aMTQ@mail.gmail.com \
    --to=masahiroy@kernel.org \
    --cc=Matthias.Thomae@de.bosch.com \
    --cc=devicetree@vger.kernel.org \
    --cc=erosca@de.adit-jv.com \
    --cc=frowand.list@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=roscaeugeniu@gmail.com \
    --cc=yyankovskyi@de.adit-jv.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.