Skip to contentSkip to conversation

deb-pkg: Add device tree blobs to the package

PATCH In review Arnaud Patard (Rtp) 3 participants 3 messages Nov 8, 2013 – Nov 12, 2013 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 deb-pkg: Add device tree blobs to the package

When building a package with make deb-pkg (say, for arm), the dtb files are not added to the package. Given that things are still evolving on arm, it make sense to have them along with the kernel and modules.

---

scripts/package/builddeb +4 -0
Index: linux-next/scripts/package/builddeb
===================================================================
@@ -140,6 +140,10 @@ if [ -e $KBUILD_IMAGE ]; then
 else
 	cp arch/$ARCH/boot/$KBUILD_IMAGE "$tmpdir/$installed_image_path"
 fi
+if grep -q "^CONFIG_OF=y" .config ; then
+	mkdir -p "$tmpdir/usr/lib/$packagename"
+	find arch/$ARCH -name *.dtb -exec cp {} "$tmpdir/usr/lib/$packagename" \;
+fi
 
 if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
 	INSTALL_MOD_PATH="$tmpdir" $MAKE KBUILD_SRC= modules_install
#1 lore raw
Quoted 12 lines · Arnaud Patard

When building a package with make deb-pkg (say, for arm), the dtb files are not added to the package. Given that things are still evolving on arm, it make sense to have them along with the kernel and modules.

---

Index: linux-next/scripts/package/builddeb
===================================================================

scripts/package/builddeb if [ -e $KBUILD_IMAGE ]; then · line 146

Quoted 7 lines
scripts/package/builddeb +4 -0
@@ -140,6 +140,10 @@ if [ -e $KBUILD_IMAGE ]; then
 else
 	cp arch/$ARCH/boot/$KBUILD_IMAGE "$tmpdir/$installed_image_path"
 fi
+if grep -q "^CONFIG_OF=y" .config ; then
+	mkdir -p "$tmpdir/usr/lib/$packagename"
+	find arch/$ARCH -name *.dtb -exec cp {} "$tmpdir/usr/lib/$packagename" \;
+fi

I would quote the '*.dtb'. Otherwise I think this is reasonable.

Ben.

Quoted 4 lines
scripts/package/builddeb +0 -0
 if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
 	INSTALL_MOD_PATH="$tmpdir" $MAKE KBUILD_SRC= modules_install
 
Signature · 3 lines
Ben Hutchings
Horngren's Observation:
                   Among economists, the real world is often a special case.
#2 lore raw
Quoted 8 lines · Ben Hutchings
Quoted 7 lines · Arnaud Patard

When building a package with make deb-pkg (say, for arm), the dtb files are not added to the package. Given that things are still evolving on arm, it make sense to have them along with the kernel and modules.

---

Quoted 14 lines

scripts/package/builddeb if [ -e $KBUILD_IMAGE ]; then · line 146

Quoted 12 lines

Index: linux-next/scripts/package/builddeb
===================================================================

scripts/package/builddeb +4 -0
@@ -140,6 +140,10 @@ if [ -e $KBUILD_IMAGE ]; then
 else
 	cp arch/$ARCH/boot/$KBUILD_IMAGE "$tmpdir/$installed_image_path"
 fi
+if grep -q "^CONFIG_OF=y" .config ; then
+	mkdir -p "$tmpdir/usr/lib/$packagename"
+	find arch/$ARCH -name *.dtb -exec cp {} "$tmpdir/usr/lib/$packagename" \;
+fi

I would quote the '*.dtb'. Otherwise I think this is reasonable.

Good catch. Arnaud, can you send a v2 with this fix?

Thanks,
Michal