linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] builddeb: Fix inclusion of dtbs in debian package
@ 2018-11-07 14:36 Rob Herring
  2018-11-08 15:26 ` Masahiro Yamada
  0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring @ 2018-11-07 14:36 UTC (permalink / raw)
  To: devicetree, linux-kernel
  Cc: Masahiro Yamada, Michal Marek, linux-kbuild, Nuno Gonçalves

Commit 37c8a5fafa3b ("kbuild: consolidate Devicetree dtb build rules")
moved the location of 'dtbs_install' target which caused dtbs to not be
installed when building debian package with 'bindeb-pkg' target. Update
the builddeb script to use the same logic that determines if there's a
'dtbs_install' target which is presence of the arch dts directory. Also,
use CONFIG_OF_EARLY_FLATTREE instead of CONFIG_OF as that's a better
indication of whether we are building dtbs.

This commit will also have the side effect of installing dtbs on any
arch that has dts files. Previously, it was dependent on whether the
arch defined 'dtbs_install'.

Fixes: 37c8a5fafa3b ("kbuild: consolidate Devicetree dtb build rules")
Reported-by: Nuno Gonçalves <nunojpg@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: linux-kbuild@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
 scripts/package/builddeb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 90c9a8ac7adb..594b626d83d6 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -83,9 +83,9 @@ else
 fi
 cp "$($MAKE -s image_name)" "$tmpdir/$installed_image_path"
 
-if grep -q "^CONFIG_OF=y" $KCONFIG_CONFIG ; then
+if grep -q "^CONFIG_OF_EARLY_FLATTREE=y" $KCONFIG_CONFIG ; then
 	# Only some architectures with OF support have this target
-	if grep -q dtbs_install "${srctree}/arch/$SRCARCH/Makefile"; then
+	if [ -d "${srctree}/arch/$SRCARCH/boot/dts" ]; then
 		$MAKE KBUILD_SRC= INSTALL_DTBS_PATH="$tmpdir/usr/lib/$packagename" dtbs_install
 	fi
 fi
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] builddeb: Fix inclusion of dtbs in debian package
  2018-11-07 14:36 [PATCH] builddeb: Fix inclusion of dtbs in debian package Rob Herring
@ 2018-11-08 15:26 ` Masahiro Yamada
  0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2018-11-08 15:26 UTC (permalink / raw)
  To: Rob Herring
  Cc: DTML, Linux Kernel Mailing List, Michal Marek,
	Linux Kbuild mailing list, nunojpg

On Wed, Nov 7, 2018 at 11:37 PM Rob Herring <robh@kernel.org> wrote:
>
> Commit 37c8a5fafa3b ("kbuild: consolidate Devicetree dtb build rules")
> moved the location of 'dtbs_install' target which caused dtbs to not be
> installed when building debian package with 'bindeb-pkg' target. Update
> the builddeb script to use the same logic that determines if there's a
> 'dtbs_install' target which is presence of the arch dts directory. Also,
> use CONFIG_OF_EARLY_FLATTREE instead of CONFIG_OF as that's a better
> indication of whether we are building dtbs.
>
> This commit will also have the side effect of installing dtbs on any
> arch that has dts files. Previously, it was dependent on whether the
> arch defined 'dtbs_install'.
>
> Fixes: 37c8a5fafa3b ("kbuild: consolidate Devicetree dtb build rules")
> Reported-by: Nuno Gonçalves <nunojpg@gmail.com>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: Michal Marek <michal.lkml@markovi.net>
> Cc: linux-kbuild@vger.kernel.org
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---

Applied to linux-kbuild/fixes.
Thanks!


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-08 15:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-07 14:36 [PATCH] builddeb: Fix inclusion of dtbs in debian package Rob Herring
2018-11-08 15:26 ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).