From: Nicolas Schier <nsc@kernel.org>
To: Nathan Chancellor <nathan@kernel.org>
Cc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>,
linux-kbuild@vger.kernel.org,
Masahiro Yamada <masahiroy@kernel.org>,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
Rob Herring <robh@kernel.org>
Subject: Re: [PATCH] kbuild: fix compilation of dtb specified on command-line without make rule
Date: Fri, 21 Nov 2025 20:46:44 +0100 [thread overview]
Message-ID: <aSDBpKUe_nJq3h21@derry.ads.avm.de> (raw)
In-Reply-To: <20251121064256.GB571346@ax162>
[-- Attachment #1: Type: text/plain, Size: 1932 bytes --]
On Thu, Nov 20, 2025 at 11:42:56PM -0700, Nathan Chancellor wrote:
> + Rob, as he reviewed e7e2941300d2
>
> On Thu, Nov 20, 2025 at 03:06:43PM +0100, Thomas De Schampheleire wrote:
> > Since commit e7e2941300d2 ("kbuild: split device tree build rules into
> > scripts/Makefile.dtbs"), it is no longer possible to compile a device tree
> > blob that is not specified in a make rule
> > like:
> > dtb-$(CONFIG_FOO) += foo.dtb
> >
> > Before the mentioned commit, one could copy a dts file to e.g.
> > arch/arm64/boot/dts/ (or a new subdirectory) and then convert it to a dtb
> > file using:
> > make ARCH=arm64 foo.dtb
> >
> > In this scenario, both 'dtb-y' and 'dtb-' are empty, and the inclusion of
> > scripts/Makefile.dtbs relies on 'targets' to contain the MAKECMDGOALS. The
> > value of 'targets', however, is only final later in the code.
> >
> > Move the conditional include of scripts/Makefile.dtbs down to where the
> > value of 'targets' is final.
> >
> > Fixes: e7e2941300d2 ("kbuild: split device tree build rules into scripts/Makefile.dtbs")
> > Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
>
> Huh, TIL that .c and .S files can be built in the same way...
>
> $ touch init/foo.c init/bar.S
> $ make init/foo.o init/bar.o
> $ ls init/.foo.o.cmd init/.bar.o.cmd
> init/.bar.o.cmd
> init/.foo.o.cmd
>
> I do not necessarily love splitting up the conditional includes from
> each other but I am not sure it can be avoided... Nicolas, are you okay
> with me taking this as a fix or do you want to take it via kbuild-next?
> If the latter:
>
> Reviewed-by: Nathan Chancellor <nathan@kernel.org>
I am ok with you taking it via kbuild-fixed, thanks.
Kind regards,
Nicolas
PS: If I combine this here with [1], [1] does not work any more.
[1]: https://lore.kernel.org/linux-kbuild/20251120204812.1983452-4-robh@kernel.org
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2025-11-21 19:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20251120140645.478623-1-thomas.de_schampheleire@nokia.com>
2025-11-21 6:42 ` [PATCH] kbuild: fix compilation of dtb specified on command-line without make rule Nathan Chancellor
2025-11-21 19:46 ` Nicolas Schier [this message]
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=aSDBpKUe_nJq3h21@derry.ads.avm.de \
--to=nsc@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=nathan@kernel.org \
--cc=robh@kernel.org \
--cc=thomas.de_schampheleire@nokia.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