From 8df95d926e963601c727defeb4ab90ce2368da70 Mon Sep 17 00:00:00 2001 From: =?utf8?q?No=C3=A9=20Rubinstein?= Date: Mon, 17 Aug 2015 09:10:44 +0200 Subject: [PATCH] pkg-kernel-module: die if kernel module support is disabled MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Test the configuration of the kernel to see if loadable module support is enabled, and error out otherwise. This makes build failures of external kernel modules less confusing. [Thomas: tweak the commit log.] Signed-off-by: Noé Rubinstein Acked-by: "Yann E. MORIN" Signed-off-by: Thomas Petazzoni --- 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 5fb19be808..6fb7704e32 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) \ -- 2.30.2