summaryrefslogtreecommitdiffstats
path: root/meta/classes/image-combined-dbg.bbclass
diff options
context:
space:
mode:
authorVictor Kamensky <kamensky@cisco.com>2018-04-05 11:25:26 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-04-07 11:44:50 +0100
commita35416cafdeac76d69fd55960850966e0f7d55e7 (patch)
treefded2bfecec4294c21842f14522bd45c136b54fa /meta/classes/image-combined-dbg.bbclass
parentf08ef6e1b5c1b847693bc5bfdcfa9a3f6484e577 (diff)
downloadpoky-a35416cafdeac76d69fd55960850966e0f7d55e7.tar.gz
image: add image-combined-dbg helper class
There is IMAGE_GEN_DEBUGFS="1" variable that enables build of additional rootfs-dbg and additional archive that contains complimentary symbols files for a given image. But the issue with this resulting directory and tarball that before use it has to be combined with original image content. It is required since all cross debugging tools like gdb, perf, and systemtap need file system that contains both target executables/libraries and their symbols. Those tools need to find executable/library first and through it debuglink note find corresponding symbols file. image-combined-dbg when added to USER_CLASSES just copies final resulting rootfs back into rootfs-dbg creating combined target and debug symbols rootfs that can be used for debugging directly. (From OE-Core rev: 7ccb077f51c9232de70e5c6f9897fd9986e3be9d) Signed-off-by: Victor Kamensky <kamensky@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/image-combined-dbg.bbclass')
-rw-r--r--meta/classes/image-combined-dbg.bbclass9
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/classes/image-combined-dbg.bbclass b/meta/classes/image-combined-dbg.bbclass
new file mode 100644
index 0000000000..f4772f7ea1
--- /dev/null
+++ b/meta/classes/image-combined-dbg.bbclass
@@ -0,0 +1,9 @@
1IMAGE_PREPROCESS_COMMAND_append = " combine_dbg_image; "
2
3combine_dbg_image () {
4 if [ "${IMAGE_GEN_DEBUGFS}" = "1" -a -e ${IMAGE_ROOTFS}-dbg ]; then
5 # copy target files into -dbg rootfs, so it can be used for
6 # debug purposes directly
7 tar -C ${IMAGE_ROOTFS} -cf - . | tar -C ${IMAGE_ROOTFS}-dbg -xf -
8 fi
9}