path: root/linux
diff options
authorGravatar McCabe, Robert J <robert.mccabe@rockwellcollins.com>2019-09-28 12:49:37 -0500
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2019-09-28 22:12:04 +0200
commitc26eafa96cabd597a5cce534133ee0ff996b800c (patch)
tree5a2a1a6ac974dfc7d8ce073d0ec7b69a706ed9db /linux
parenta07dd0e0f596d90e485fd6c7d42b71b36833a005 (diff)
linux: allow br2-externals to provide their own Linux extensions
Signed-off-by: McCabe, Robert J <robert.mccabe@rockwellcollins.com> Acked-by: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'linux')
1 files changed, 9 insertions, 4 deletions
diff --git a/linux/linux.mk b/linux/linux.mk
index 95bde1aba5..b9e72107df 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -514,14 +514,19 @@ endef
# Note: our package infrastructure uses the full-path of the last-scanned
# Makefile to determine what package we're currently defining, using the
-# last directory component in the path. As such, including other Makefile,
-# like below, before we call one of the *-package macro is usally not
-# working.
+# last directory component in the path. As such, including other Makefiles,
+# like below, before we call one of the *-package macros usually doesn't
+# work.
# However, since the files we include here are in the same directory as
# the current Makefile, we are OK. But this is a hard requirement: files
-# included here *must* be in the same directory!
+# included here *must* either be in this same directory OR within a
+# another directory with the name "linux" (in the BR2_EXTERNAL case).
include $(sort $(wildcard linux/linux-ext-*.mk))
+# Import linux-kernel-extensions from br2-externals
+include $(sort $(wildcard $(foreach ext,$(BR2_EXTERNAL_DIRS), \
+ $(ext)/linux/linux-ext-*.mk)))
$(if $(BR2_LINUX_KERNEL_EXT_$(call UPPERCASE,$(ext))),$(ext)))