summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Hieber <rhi@pengutronix.de>2021-01-14 23:50:49 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2021-01-15 08:29:04 +0100
commitcbba868c31f8be9ed521b19ea0e3095c13a19a17 (patch)
treee7ffeced5d11934bba1b19d35c54e38877548c03
parent17370255829bd922c2f311d3e0a12f7d059c758a (diff)
downloadptxdist-cbba868c31f8be9ed521b19ea0e3095c13a19a17.tar.gz
ptxdist-cbba868c31f8be9ed521b19ea0e3095c13a19a17.tar.xz
ptxd_make_image_common: optionally install debug packages into rootfs
Signed-off-by: Roland Hieber <rhi@pengutronix.de> Message-Id: <20210114225049.1634-1-rhi@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--rules/00debug-packages.in12
-rw-r--r--scripts/lib/ptxd_make_image_common.sh9
2 files changed, 21 insertions, 0 deletions
diff --git a/rules/00debug-packages.in b/rules/00debug-packages.in
index 64dd254f1..1e3ea0f48 100644
--- a/rules/00debug-packages.in
+++ b/rules/00debug-packages.in
@@ -10,3 +10,15 @@ config DEBUG_PACKAGES
are otherwise only available in nfsroot.
This is useful to run debug tools such as gdb, valgrind, perf
etc. on a normal (not nfsroot) rootfs.
+
+config DEBUG_PACKAGES_INSTALL
+ bool
+ select DEBUG_PACKAGES
+ prompt "install debug packages into rootfs"
+ help
+ Include debug symbols of all packages that are installed into the root
+ filesystem. This is needed if you want to run gdb, valgrind, etc. on
+ the target.
+
+ Debug symbols can take a certain amount of disk space, make sure your
+ root file system is big enough.
diff --git a/scripts/lib/ptxd_make_image_common.sh b/scripts/lib/ptxd_make_image_common.sh
index 1170226ae..551420080 100644
--- a/scripts/lib/ptxd_make_image_common.sh
+++ b/scripts/lib/ptxd_make_image_common.sh
@@ -48,6 +48,15 @@ Run first 'ptxdist clean root' then 'ptxdist images' again.
"
fi
+ if ptxd_get_ptxconf PTXCONF_DEBUG_PACKAGES_INSTALL > /dev/null; then
+ # some packages don't install binaries, so they don't have dbgsyms.
+ # don't complain about that.
+ ipkg_files="${image_ipkg_repo_dirs[@]/%//${1}-dbgsym_*.ipk}"
+ if ptxd_get_path ${ipkg_files[*]}; then
+ ptxd_reply_ipkg_files[${#ptxd_reply_ipkg_files[@]}]="${ptxd_reply}"
+ fi
+ fi
+
shift
done
}