From patchwork Sun Aug 16 21:10:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?UTF-8?q?No=C3=A9=20Rubinstein?= X-Patchwork-Id: 507813 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 4927F140293 for ; Mon, 17 Aug 2015 17:11:00 +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=Nql9CjOR; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 552AE8AD05; Mon, 17 Aug 2015 07:10:59 +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 2FVlvj+bWcz5; Mon, 17 Aug 2015 07:10:58 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 21A738ACCD; Mon, 17 Aug 2015 07:10:58 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id F10E21C1E6D for ; Mon, 17 Aug 2015 07:10:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E06F88ACCD for ; Mon, 17 Aug 2015 07:10:56 +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 dsPutDJJCJAa for ; Mon, 17 Aug 2015 07:10:51 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by hemlock.osuosl.org (Postfix) with ESMTPS id 635FF8ABFA for ; Mon, 17 Aug 2015 07:10:51 +0000 (UTC) Received: by wicne3 with SMTP id ne3so62922029wic.0 for ; Mon, 17 Aug 2015 00:10:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=CbSqM67F6Wxn8jNo/Kzy2hPdcJadW+As64/75uQAu20=; b=Nql9CjORa9Jlfcm3ty/YCtvsmwSQnJW5gAtzDz21smkNTOqe38gNSYGnZG6e3m5ol3 xE5Q684fip38E41joRPbCca2kgO35N5MGpD2sYIgePeTCdy+dxwS8NqW17BEUzEmm3jk PZi7+iJGitZLyL1kNbgjPh1lZbR3zAhmu4ZuRlgEHUHMlfvmqimr16cR7z1QSaI5kTLH 6vbhww914zUSEN0kxBtBwv4Z4gEa0+MZKnBhi+oX6/0s61sU8iL2+QpGjnsCxRmfy1I+ hv9W9ZJ7zvkT7FQoMYzFPRmBBPMbMgytPxrX19Fly411j5JRzwp3I1aCMoRoRl7JdYeA Q72Q== X-Received: by 10.180.8.234 with SMTP id u10mr30757376wia.4.1439795449755; Mon, 17 Aug 2015 00:10:49 -0700 (PDT) Received: from nrubinstein-de.aldebaran.lan ([195.190.86.18]) by smtp.gmail.com with ESMTPSA id m4sm20417429wjb.37.2015.08.17.00.10.48 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Aug 2015 00:10:48 -0700 (PDT) From: "=?UTF-8?q?No=C3=A9=20Rubinstein?=" X-Google-Original-From: =?UTF-8?q?No=C3=A9=20Rubinstein?= To: buildroot@uclibc.org Date: Mon, 17 Aug 2015 09:10:44 +0200 Message-Id: <1439795444-32337-1-git-send-email-nrubinstein@aldebaran.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2] pkg-kernel-module: Die when kernel module are disabled 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: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Test the config of the kernel to see if loadable module support is enabled, and error out otherwise. This makes the build failure less confusing. Signed-off-by: NoƩ Rubinstein Acked-by: "Yann E. MORIN" --- package/pkg-kernel-module.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/pkg-kernel-module.mk b/package/pkg-kernel-module.mk index 5fb19be..6fb7704 100644 --- a/package/pkg-kernel-module.mk +++ b/package/pkg-kernel-module.mk @@ -60,6 +60,10 @@ $(2)_MODULE_SUBDIRS ?= . # includes and other support files (Booo!) define $(2)_KERNEL_MODULES_BUILD @$$(call MESSAGE,"Building kernel module(s)") + @if ! grep -Fqx 'CONFIG_MODULES=y' $(LINUX_DIR)/.config; then \ + echo "ERROR: Kernel does not support loadable modules"; \ + exit 1; \ + fi $$(foreach d,$$($(2)_MODULE_SUBDIRS), \ $$(LINUX_MAKE_ENV) $$($$(PKG)_MAKE) \ -C $$(LINUX_DIR) \