Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] pkg-kernel-module: Die when kernel modules are disabled
@ 2015-08-14  9:58 Noé Rubinstein
  2015-08-14 22:53 ` Yann E. MORIN
  0 siblings, 1 reply; 2+ messages in thread
From: Noé Rubinstein @ 2015-08-14  9:58 UTC (permalink / raw)
  To: 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 <nrubinstein@aldebaran.com>
---
 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..e7dc33e 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; \
+		false; \
+	fi
 	$$(foreach d,$$($(2)_MODULE_SUBDIRS), \
 		$$(LINUX_MAKE_ENV) $$($$(PKG)_MAKE) \
 			-C $$(LINUX_DIR) \
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-14 22:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-14  9:58 [Buildroot] [PATCH] pkg-kernel-module: Die when kernel modules are disabled Noé Rubinstein
2015-08-14 22:53 ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox