summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFathi Boudra <fathi.boudra@linaro.org>2015-01-11 03:52:13 +0200
committerFathi Boudra <fathi.boudra@linaro.org>2015-01-11 03:52:13 +0200
commitbfc72209763f445ef83b97932628eeef75d1cd49 (patch)
treed5cf1b49f7fdcfe6d0a7628c8184afe6e201e7c4
parentd4739b2bea237166282e247ec4d8f00fd79c1ef2 (diff)
downloadlci-build-tools-bfc72209763f445ef83b97932628eeef75d1cd49.tar.gz
builddeb: fix dtb copy
sync builddeb with 3.19 and fix device tree copy Change-Id: Ifc948f26e5cdb090872388e23512522802afef55 Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
-rw-r--r--build-scripts/builddeb33
1 files changed, 15 insertions, 18 deletions
diff --git a/build-scripts/builddeb b/build-scripts/builddeb
index 0d64196..3dfd2ba 100644
--- a/build-scripts/builddeb
+++ b/build-scripts/builddeb
@@ -37,7 +37,7 @@ create_package() {
s390*)
debarch=s390$(grep -q CONFIG_64BIT=y $KCONFIG_CONFIG && echo x || true) ;;
ppc*)
- debarch=powerpc ;;
+ debarch=$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo ppc64el || echo powerpc) ;;
parisc*)
debarch=hppa ;;
mips*)
@@ -64,7 +64,7 @@ create_package() {
fi
# Create the package
- dpkg-gencontrol -isp $forcearch -Vkernel:debarch="${debarch:-$(dpkg --print-architecture)}" -p$pname -P"$pdir"
+ dpkg-gencontrol $forcearch -Vkernel:debarch="${debarch:-$(dpkg --print-architecture)}" -p$pname -P"$pdir"
dpkg --build "$pdir" ..
}
@@ -155,18 +155,16 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
rmdir "$tmpdir/lib/modules/$version"
fi
if [ -n "$BUILD_DEBUG" ] ; then
- (
- cd $tmpdir
- for module in $(find lib/modules/ -name *.ko); do
- mkdir -p $(dirname $dbg_dir/usr/lib/debug/$module)
- # only keep debug symbols in the debug file
- $OBJCOPY --only-keep-debug $module $dbg_dir/usr/lib/debug/$module
- # strip original module from debug symbols
- $OBJCOPY --strip-debug $module
- # then add a link to those
- $OBJCOPY --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module
- done
- )
+ for module in $(find $tmpdir/lib/modules/ -name *.ko -printf '%P\n'); do
+ module=lib/modules/$module
+ mkdir -p $(dirname $dbg_dir/usr/lib/debug/$module)
+ # only keep debug symbols in the debug file
+ $OBJCOPY --only-keep-debug $tmpdir/$module $dbg_dir/usr/lib/debug/$module
+ # strip original module from debug symbols
+ $OBJCOPY --strip-debug $tmpdir/$module
+ # then add a link to those
+ $OBJCOPY --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $tmpdir/$module
+ done
fi
fi
@@ -334,10 +332,9 @@ EOF
fi
# Copy device tree files if generated
-stat arch/$ARCH/boot/dts/*.dtb && {
- mkdir -p "$tmpdir/lib/firmware/$version/device-tree"
- cp arch/$ARCH/boot/dts/*.dtb "$tmpdir/lib/firmware/$version/device-tree"
-}
+for dtb in `find arch/$ARCH/boot/dts/ -type f -name '*.dtb'`; do
+ install -D -p -m0644 ${dtb} "$tmpdir/lib/firmware/$version/device-tree/`basename ${dtb}`"
+done
# Copy boot wrapper files if built
if [ "$ARCH" = "arm64" ] ; then