Skip to content

Commit d5615e4

Browse files
robherringmasahir0y
authored andcommitted
builddeb: Fix inclusion of dtbs in debian package
Commit 37c8a5f ("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: 37c8a5f ("kbuild: consolidate Devicetree dtb build rules") Reported-by: Nuno Gonçalves <nunojpg@gmail.com> Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
1 parent 8ef14c2 commit d5615e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/package/builddeb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ else
8383
fi
8484
cp "$($MAKE -s -f $srctree/Makefile image_name)" "$tmpdir/$installed_image_path"
8585

86-
if grep -q "^CONFIG_OF=y" $KCONFIG_CONFIG ; then
86+
if grep -q "^CONFIG_OF_EARLY_FLATTREE=y" $KCONFIG_CONFIG ; then
8787
# Only some architectures with OF support have this target
88-
if grep -q dtbs_install "${srctree}/arch/$SRCARCH/Makefile"; then
88+
if [ -d "${srctree}/arch/$SRCARCH/boot/dts" ]; then
8989
$MAKE KBUILD_SRC= INSTALL_DTBS_PATH="$tmpdir/usr/lib/$packagename" dtbs_install
9090
fi
9191
fi

0 commit comments

Comments
 (0)