Skip to contentSkip to conversation

builddeb: Fix inclusion of dtbs in debian package

PATCH In review Rob Herring 2 participants 2 messages Nov 7, 2018 – Nov 8, 2018 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 builddeb: Fix inclusion of dtbs in debian package

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")
Cc Masahiro Yamada <[email protected]>
Cc Michal Marek <[email protected]>
---
 scripts/package/builddeb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/package/builddeb +2 -2
index 90c9a8ac7adb..594b626d83d6 100755
@@ -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
Signature · 1 line
2.19.1
#1 lore raw
Quoted 13 lines · Rob Herring

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'.

Quoted 7 lines
Fixes 37c8a5fafa3b ("kbuild: consolidate Devicetree dtb build rules")
Cc Masahiro Yamada <[email protected]>
Cc Michal Marek <[email protected]>

---

Applied to linux-kbuild/fixes.
Thanks!

Signature · 2 lines
Best Regards
Masahiro Yamada