mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] ptxd_make_image_common: optionally install debug packages into rootfs
@ 2021-01-14 22:50 Roland Hieber
  2021-01-15 11:18 ` [ptxdist] [APPLIED] " Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Roland Hieber @ 2021-01-14 22:50 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 rules/00debug-packages.in             | 12 ++++++++++++
 scripts/lib/ptxd_make_image_common.sh |  9 +++++++++
 2 files changed, 21 insertions(+)

diff --git a/rules/00debug-packages.in b/rules/00debug-packages.in
index 64dd254f15e9..1e3ea0f4837b 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 1170226aed70..551420080669 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
 }
-- 
2.30.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-15 11:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-14 22:50 [ptxdist] [PATCH] ptxd_make_image_common: optionally install debug packages into rootfs Roland Hieber
2021-01-15 11:18 ` [ptxdist] [APPLIED] " Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox