public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Eugeniu Rosca <erosca@de.adit-jv.com>
To: Masahiro Yamada <masahiroy@kernel.org>, <linux-kbuild@vger.kernel.org>
Cc: 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 <erosca@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: Fri, 16 Jun 2023 21:45:05 +0200	[thread overview]
Message-ID: <20230616194505.GA27753@lxhi-065> (raw)
In-Reply-To: <20200625170434.635114-2-masahiroy@kernel.org>

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

-- 
Best regards,
Eugeniu Rosca

  parent reply	other threads:[~2023-06-16 20:04 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 [this message]
2023-06-17 18:09     ` Masahiro Yamada
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=20230616194505.GA27753@lxhi-065 \
    --to=erosca@de.adit-jv.com \
    --cc=Matthias.Thomae@de.bosch.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=masahiroy@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox