From patchwork Thu Apr 5 18:25:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Victor Kamensky \(kamensky\)" X-Patchwork-Id: 132881 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp6606105ljb; Thu, 5 Apr 2018 11:26:15 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/2k1sKmUTkB/BERQGwvDsUCCmtyq0j8hoXAdZOoysRuLn9Z2fVu0ids2yI+GlwIDRySbpn X-Received: by 10.167.131.147 with SMTP id u19mr17692241pfm.99.1522952775173; Thu, 05 Apr 2018 11:26:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522952775; cv=none; d=google.com; s=arc-20160816; b=LosWV4Lr9QPTC8sx/IqgzHtS3uHVaLxoil+QHwKNbqecPtrM/yUA7jKvTBz+GV3TLI LvzPqRH9qD1llBYlVNCXd1TWmOYy0xr/xVc8z+WfYdTqJMDI0eZtQrMYwLC8Q/iiWr8L 26ZNiKEIgQ6Az9+YiGi2Af0DcPEsBaRPVGwiTANGlr+H5hU3XECmiU3bGDoGtbqrCpPU cX7gV7EX8HqZbL+RObeDWxMmHGqBe67DN/wVipz55B32xbieIwmvrn1RG/5S3mFq1jJV LjXBP+JaleknmBzrDHfFff0kLebc+g9RNVmMi40YizKsM5MU0aU7i6ZXF0F8H9/5/zE1 1O1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to:arc-authentication-results; bh=WPxAEJTIc6ZyxXWdfqGxSRamPn/tu2sW33vgEAr1C6o=; b=AvwppUOTmDnsNmisNwL9oJ3zvGHYeFhUjOdeT5KvTeoBd8FVeRv8kKPP3+Le/0nieJ drM3Ry7eYZJxUl+/i2I30UiUaOHnhXjcqH6uBffetBNSjfYm2mNTx/rLiRj7z8ENzk12 C40lgwanLgI0aYkWbZoxd0uznneWM8+JeEP3pnbn6qVsMP5Syo8JQSRAJd6otzMeU2g+ UPF+RvrGRVq94xnKUOP6DbW8ncYuI+Cu4oRzR0EeDdJ7nFhPq6KIgDqhWelycs6hQ3zX QNH/W4n2HFOGZHfK4FTSDe4dGDRC/zHMsvF88Sa7F4azR8kePzRaGQYIKzogDHTzmiGa wJmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@cisco.com header.s=iport header.b=RdpmI4bu; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cisco.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id q2si5816513pga.198.2018.04.05.11.26.14; Thu, 05 Apr 2018 11:26:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=fail header.i=@cisco.com header.s=iport header.b=RdpmI4bu; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cisco.com Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id D69277506C; Thu, 5 Apr 2018 18:26:08 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from rcdn-iport-9.cisco.com (rcdn-iport-9.cisco.com [173.37.86.80]) by mail.openembedded.org (Postfix) with ESMTP id 7BC6674F1E for ; Thu, 5 Apr 2018 18:25:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1608; q=dns/txt; s=iport; t=1522952741; x=1524162341; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=0XkiMuSFI44IcA07WbWmGrCmlEg8oj/0P1YaUOAssiU=; b=RdpmI4buWdtA1vNMSr5I0egH56G9l2Di614y0GGRZ7m9rtvyzR9jioV3 /BL2CB/wYquuYHCBx/gz5FyOy6ZN3Ha9cuSLkA3LL4BR7EVAidnAhsIGW Xu9C+GZrPvrGjgph8BkKFRiMF0GweEGfijUQYKq3SPdfrYyPkm0Qoff8N o=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DHAABYacZa/5tdJa1cGQEBAQEBAQEBAQEBAQcBAQEBAYNCgVAoi1+NCYMDklWBeguFAwKCPiE0GAECAQEBAQEBAmwohSMGeRBRVxmFDa5ciEOCJYdqghODXIVvhGggAoxWimoIjjECjDuPXAIREwGBJRw4gVJNIxWCfZBuHzCNGwEB X-IronPort-AV: E=Sophos;i="5.48,411,1517875200"; d="scan'208";a="370205795" Received: from rcdn-core-4.cisco.com ([173.37.93.155]) by rcdn-iport-9.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Apr 2018 18:25:41 +0000 Received: from kamensky-w541.cisco.com ([10.24.32.120]) (authenticated bits=0) by rcdn-core-4.cisco.com (8.14.5/8.14.5) with ESMTP id w35IPUvi013347 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NO); Thu, 5 Apr 2018 18:25:40 GMT From: Victor Kamensky To: openembedded-core@lists.openembedded.org Date: Thu, 5 Apr 2018 11:25:26 -0700 Message-Id: <1522952730-5967-2-git-send-email-kamensky@cisco.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522952730-5967-1-git-send-email-kamensky@cisco.com> References: <1522952730-5967-1-git-send-email-kamensky@cisco.com> X-Authenticated-User: kamensky@cisco.com Cc: Alexander Kanavin Subject: [OE-core] [PATCH v3 1/5] image: add image-combined-dbg helper class X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org 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. Signed-off-by: Victor Kamensky --- meta/classes/image-combined-dbg.bbclass | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 meta/classes/image-combined-dbg.bbclass -- 2.7.4 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/classes/image-combined-dbg.bbclass b/meta/classes/image-combined-dbg.bbclass new file mode 100644 index 0000000..f4772f7 --- /dev/null +++ b/meta/classes/image-combined-dbg.bbclass @@ -0,0 +1,9 @@ +IMAGE_PREPROCESS_COMMAND_append = " combine_dbg_image; " + +combine_dbg_image () { + if [ "${IMAGE_GEN_DEBUGFS}" = "1" -a -e ${IMAGE_ROOTFS}-dbg ]; then + # copy target files into -dbg rootfs, so it can be used for + # debug purposes directly + tar -C ${IMAGE_ROOTFS} -cf - . | tar -C ${IMAGE_ROOTFS}-dbg -xf - + fi +}