From patchwork Tue Jun 9 23:12:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ralph Siemsen X-Patchwork-Id: 1306339 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=netwinder.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=TvQYXPbk; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49hQsF2wh4z9sRR for ; Wed, 10 Jun 2020 09:13:19 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id A6CE523340; Tue, 9 Jun 2020 23:13:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xUnO37ZaWq4k; Tue, 9 Jun 2020 23:13:13 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id BC1732276C; Tue, 9 Jun 2020 23:13:12 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 0A4A01BF473 for ; Tue, 9 Jun 2020 23:13:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 0524587CD9 for ; Tue, 9 Jun 2020 23:13:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g6LzV4nzgcCk for ; Tue, 9 Jun 2020 23:13:09 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by whitealder.osuosl.org (Postfix) with ESMTPS id 1113587AD5 for ; Tue, 9 Jun 2020 23:13:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=aJ9ZcqPeli1yE0Qcc38Rw3RuvhM9RkJ1eorfWNOVYSk=; b=TvQYXPbkoxSB8YeoSR9wstDvd0 qhVXyhogbhn0L7uT/wwmPabvrUy20pgojZQQo5f+jTi+gDZFqzOgwl8R0yIBq2S3eEt72Lz0Qrwii diIbhpa3RDE9/l50pJx5Cr6l9fqJLwes0Bpr4k/jTI+O40NFHBuj37Nvo8HekMrgqr+nkIyRJ0G0F s3jmlr4Fy8KlTHE7s5BB++Am3Xv8rEa+Q0SfT+0Hsy08CI+AI2XFiBoqTz6CBU/zOWVE5tNIuBkKu +ZeQoYj28ZK0ct5/H6+1gBIDfI4Cg/5RxOae3dukoDHm4woSNcxeS1OaD0fThmPRV9RB6L1dzVoh/ z5P+fYkw==; Received: from rfs.netwinder.org ([206.248.184.2] helo=harvey.netwinder.org) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jinQZ-0004v8-85; Tue, 09 Jun 2020 23:13:07 +0000 From: Ralph Siemsen To: buildroot@busybox.net Date: Tue, 9 Jun 2020 19:12:57 -0400 Message-Id: <20200609231257.275131-1-ralphs@netwinder.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by merlin.infradead.org. See http://www.infradead.org/rpr.html Subject: [Buildroot] [PATCH] package/systemtap: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ralph Siemsen Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" SystemTap provides a simple command line interface and scripting language for writing instrumentation for a live running kernel plus user-space applications. This is a minimal implementation; not all supported features of systemtap are enabled. --- Note that I am not a systemtap expert, in fact, I only got involved helping someone else get this to build under buildroot. Hence YMMV. Yann requested that I post this patch to the list, so here we are. package/Config.in | 1 + package/systemtap/Config.in | 10 ++++++++++ package/systemtap/systemtap.mk | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 package/systemtap/Config.in create mode 100644 package/systemtap/systemtap.mk diff --git a/package/Config.in b/package/Config.in index c328d9f153..90b1b1b730 100644 --- a/package/Config.in +++ b/package/Config.in @@ -135,6 +135,7 @@ menu "Debugging, profiling and benchmark" source "package/stress-ng/Config.in" source "package/sysdig/Config.in" source "package/sysprof/Config.in" + source "package/systemtap/Config.in" source "package/tcf-agent/Config.in" source "package/tinymembench/Config.in" source "package/trace-cmd/Config.in" diff --git a/package/systemtap/Config.in b/package/systemtap/Config.in new file mode 100644 index 0000000000..9194b86caf --- /dev/null +++ b/package/systemtap/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_SYSTEMTAP + bool "systemtap" + select BR2_PACKAGE_ELFUTILS # -ldw + select BR2_PACKAGE_PYTHON3 + help + SystemTap provides a simple command line interface and scripting + language for writing instrumentation for a live running kernel + plus user-space applications. + + https://sourceware.org/systemtap/ diff --git a/package/systemtap/systemtap.mk b/package/systemtap/systemtap.mk new file mode 100644 index 0000000000..d9228f25ca --- /dev/null +++ b/package/systemtap/systemtap.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# systemtap +# +################################################################################ + +SYSTEMTAP_VERSION= release-4.2 +SYSTEMTAP_SITE = https://sourceware.org/git/systemtap.git +SYSTEMTAP_SITE_METHOD = git +SYSTEMTAP_DEPENDENCIES = elfutils python3 + +# Systemtap includes cpython support. To cross-compile this +# seems to require setting _PYTHON_SYSCONFIGDATA_NAME. The +# following was adapted from package/pkg-python.mk + +SYSTEMTAP_MAKE_ENV = \ + PATH=$(BR_PATH) \ + $(TARGET_CONFIGURE_OPTS) \ + LDSHARED="$(TARGET_CROSS)gcc -shared" \ + PYTHONPATH="$(if $(BR2_PACKAGE_PYTHON3),$(PYTHON3_PATH),$(PYTHON_PATH))" \ + PYTHONNOUSERSITE=1 \ + _PYTHON_SYSCONFIGDATA_NAME="$(PKG_PYTHON_SYSCONFIGDATA_NAME)" \ + _python_sysroot=$(STAGING_DIR) \ + _python_prefix=/usr \ + _python_exec_prefix=/usr + +# Note that systemtap has additional optional dependencies, +# such as libvirt and xml for vir support, java support, and +# avahi and nss for compile server support. These are not +# currently handled by this build script. + +$(eval $(autotools-package))