From patchwork Sat Jun 6 22:20:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 481685 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 37C001401CB for ; Sun, 7 Jun 2015 08:21:36 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=kVKzcb5+; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 082D095E77; Sat, 6 Jun 2015 22:21:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pnvWxQKrI8V6; Sat, 6 Jun 2015 22:21:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id C6CBA95D77; Sat, 6 Jun 2015 22:21:17 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 3FDC11C220A for ; Sat, 6 Jun 2015 22:21:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3C74FA43F6 for ; Sat, 6 Jun 2015 22:21:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id i1X3omMYsUxX for ; Sat, 6 Jun 2015 22:21:03 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 50E27A43E5 for ; Sat, 6 Jun 2015 22:21:03 +0000 (UTC) Received: by wiga1 with SMTP id a1so51191612wig.0 for ; Sat, 06 Jun 2015 15:21:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=EJ3L1dIbPuTzlhHUBL2891QkLAhFFBdwZJlJHZOZFus=; b=kVKzcb5+O79gRm0+xZRWI3NRW7D9jhrLv2RYm9bvFrHC4QH68yss+E4TVMWKAUyuNb KIAOnxsk50qvY/+ZB4HU2U8iFs1O4teCUa9UAIdfbYDbm90BG1KQMWGpwv98Umv+E9Lh j7sqSo7b6gSWwIWZylZpzETCrQvLUC+vh5USS2xm2wooI/hdLkD7GHmJimM/BiV5o9xN /zRPPms/MrmQ+Gj48dhFT5yfYCN9pIUfrkHq/txIMEr0ic3R3e/PzFZerP+9xvJF++/Q mjU281r0VCOQIA8EKfczPj54f8EZN42ZWg6Eu30P5zNLUnA+inngeObE0xArTeboTrBv /Wgw== X-Received: by 10.180.97.7 with SMTP id dw7mr8573820wib.74.1433629262035; Sat, 06 Jun 2015 15:21:02 -0700 (PDT) Received: from gourin.bzh.lan (ns304657.ip-46-105-103.eu. [46.105.103.66]) by mx.google.com with ESMTPSA id r6sm4276358wiy.13.2015.06.06.15.21.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 06 Jun 2015 15:21:01 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Sun, 7 Jun 2015 00:20:47 +0200 Message-Id: X-Mailer: git-send-email 1.9.1 In-Reply-To: References: Cc: Thomas Petazzoni , "Yann E. MORIN" Subject: [Buildroot] [PATCH 11/11] package/sysdig: use kernel-module helper X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This has the benefit of making sysdig actually buildable, otherwise it fails because it tries to use the kernel headers from the host: make: *** /lib/modules/3.13.0-53-generic/build: No such file or directory. Stop. make[5]: *** [all] Error 2 make[4]: *** [driver/CMakeFiles/driver] Error 2 make[3]: *** [driver/CMakeFiles/driver.dir/all] Error 2 Signed-off-by: "Yann E. MORIN" Cc: Thomas Petazzoni --- package/sysdig/sysdig.mk | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/package/sysdig/sysdig.mk b/package/sysdig/sysdig.mk index fb348ff..fde1810 100644 --- a/package/sysdig/sysdig.mk +++ b/package/sysdig/sysdig.mk @@ -10,13 +10,27 @@ SYSDIG_LICENSE = GPLv2 SYSDIG_LICENSE_FILES = COPYING SYSDIG_CONF_OPTS = -DUSE_BUNDLED_LUAJIT=OFF -DUSE_BUNDLED_ZLIB=OFF \ -DUSE_BUNDLED_JSONCPP=OFF -SYSDIG_DEPENDENCIES = zlib luajit jsoncpp linux +SYSDIG_DEPENDENCIES = zlib luajit jsoncpp SYSDIG_SUPPORTS_IN_SOURCE_BUILD = NO -define SYSDIG_INSTALL_DRIVER - $(MAKE) -C $(SYSDIG_BUILDDIR) $(LINUX_MAKE_FLAGS) KERNELDIR="$(LINUX_DIR)" install_driver +# sysdig creates the module Makefile from a template, which contains a +# single place-holder, KBUILD_FLAGS, wich is only replaced with two +# things: +# - debug flags, which we don't care about here, +# - 'sysdig-feature' flags, which are never set, so always empty +# So, just replace the place-holder with the only meaningful value: nothing. +define SYSDIG_KERNEL_MAKEFILE + $(INSTALL) -m 0644 $(@D)/driver/Makefile.in $(@D)/driver/Makefile + $(SED) 's/@KBUILD_FLAGS@//;' $(@D)/driver/Makefile endef +SYSDIG_POST_PATCH_HOOKS += SYSDIG_KERNEL_MAKEFILE -SYSDIG_POST_INSTALL_TARGET_HOOKS += SYSDIG_INSTALL_DRIVER +# Don't build the driver as part of the 'standard' procedure, we'll +# build it on our own with the kernel-module infra. +SYSDIG_CONF_OPTS += -DBUILD_DRIVER=OFF +SYSDIG_MODULE_SUBDIRS = driver +SYSDIG_MODULE_MAKE_OPTS = KERNELDIR=$(LINUX_DIR) + +$(eval $(kernel-module)) $(eval $(cmake-package))