aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2014-08-22 09:51:03 -0400
committerMichal Marek <mmarek@suse.cz>2014-08-26 10:01:07 -0400
commit2d0871396995139b37f9ceb153c8b07589148343 (patch)
tree8bf5b2cff8797d56d8a6cff9b0405655da2b6f5f /scripts
parent8e170655b517ba49bf4d015008474bcc2f425b20 (diff)
builddeb: put the dbg files into the correct directory
Since the conversion of objtree to use relative pathnames (commit 7e1c04779e, "kbuild: Use relative path for $(objtree)"), the debug info files have been ending up in /debian/dbgtmp/ in the regular linux-image package instead of the debug files package. Fix up the paths so that the debug files end up in the -dbg package. This is based on a similar patch by Darrick. Reported-and-tested-by: "Darrick J. Wong" <darrick.wong@oracle.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/package/builddeb22
1 files changed, 10 insertions, 12 deletions
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 35d5a5877d04..7c0e6e46905d 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -152,18 +152,16 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
152 rmdir "$tmpdir/lib/modules/$version" 152 rmdir "$tmpdir/lib/modules/$version"
153 fi 153 fi
154 if [ -n "$BUILD_DEBUG" ] ; then 154 if [ -n "$BUILD_DEBUG" ] ; then
155 ( 155 for module in $(find $tmpdir/lib/modules/ -name *.ko -printf '%P\n'); do
156 cd $tmpdir 156 module=lib/modules/$module
157 for module in $(find lib/modules/ -name *.ko); do 157 mkdir -p $(dirname $dbg_dir/usr/lib/debug/$module)
158 mkdir -p $(dirname $dbg_dir/usr/lib/debug/$module) 158 # only keep debug symbols in the debug file
159 # only keep debug symbols in the debug file 159 $OBJCOPY --only-keep-debug $tmpdir/$module $dbg_dir/usr/lib/debug/$module
160 $OBJCOPY --only-keep-debug $module $dbg_dir/usr/lib/debug/$module 160 # strip original module from debug symbols
161 # strip original module from debug symbols 161 $OBJCOPY --strip-debug $tmpdir/$module
162 $OBJCOPY --strip-debug $module 162 # then add a link to those
163 # then add a link to those 163 $OBJCOPY --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $tmpdir/$module
164 $OBJCOPY --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module 164 done
165 done
166 )
167 fi 165 fi
168fi 166fi
169 167