2013-06-07 04:13:46 -06:00
|
|
|
################################################################################
|
2011-09-17 14:22:52 -06:00
|
|
|
# Linux Adeos/Xenomai extensions
|
|
|
|
#
|
|
|
|
# Patch the linux kernel with xenomai extension
|
2013-06-07 04:13:46 -06:00
|
|
|
################################################################################
|
2011-09-17 14:22:52 -06:00
|
|
|
|
|
|
|
ifeq ($(BR2_LINUX_KERNEL_EXT_XENOMAI),y)
|
|
|
|
# Add dependency to xenomai (user-space) which provide ksrc part
|
linux: fix extensions
Since the move to the kconfig-package infra, linux extensions are
broken.
In our linux package, extensions are applied as pre-patch hooks.
Before the kconfig-package infra, we had custom rules for the
linux-*config targets, which were of the form:
linux-menuconfig: linux-configure
$(MAKE) -C $(LINUX_DIR) menuconfig
This caused the linux tree to be fully configured before running the
configurators, and thus linux dependencies were entirely fullfilled, and
extensions were properly applied.
Since we migrated (in dff25ea), the kconfig-package infra introduces a
(hidden, internal) intermediate step 'kconfig-fixup' and decorelates the
kconfig-part of the configuration from the actual package-part of the
configuration:
linux-configure -------> kconfig-fixup --> .config --> $(LINUX_CONFIG_FILE)
/
linux-menuconfig --'
As thus, this (very useful!) use-case breaks (starting from a clean
Buildroot tree):
make menuconfig
-> enable a kernel and at least one extension
-> save and exit
make linux-menuconfig
-> extensions are not available
Fix that by using the newly-introduced patch-dependencies, so that
extensions are available before we try to patch the linux kernel.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-03-14 08:25:19 -06:00
|
|
|
LINUX_PATCH_DEPENDENCIES += xenomai
|
2011-09-17 14:22:52 -06:00
|
|
|
|
|
|
|
# Adeos patch version
|
|
|
|
XENOMAI_ADEOS_PATCH = $(call qstrip,$(BR2_LINUX_KERNEL_EXT_XENOMAI_ADEOS_PATCH))
|
|
|
|
ifeq ($(XENOMAI_ADEOS_PATCH),)
|
2014-09-27 13:32:50 -06:00
|
|
|
XENOMAI_ADEOS_OPTS = --default
|
2011-09-17 14:22:52 -06:00
|
|
|
else
|
2014-09-27 13:32:50 -06:00
|
|
|
XENOMAI_ADEOS_OPTS = --adeos=$(XENOMAI_ADEOS_PATCH)
|
2011-09-17 14:22:52 -06:00
|
|
|
endif
|
|
|
|
|
|
|
|
# Prepare kernel patch
|
|
|
|
define XENOMAI_PREPARE_KERNEL
|
|
|
|
$(XENOMAI_DIR)/scripts/prepare-kernel.sh \
|
|
|
|
--linux=$(LINUX_DIR) \
|
|
|
|
--arch=$(KERNEL_ARCH) \
|
2014-09-27 13:32:50 -06:00
|
|
|
$(XENOMAI_ADEOS_OPTS) \
|
2011-09-17 14:22:52 -06:00
|
|
|
--verbose
|
|
|
|
endef
|
|
|
|
|
2011-09-19 14:10:53 -06:00
|
|
|
LINUX_PRE_PATCH_HOOKS += XENOMAI_PREPARE_KERNEL
|
2011-09-17 14:22:52 -06:00
|
|
|
|
|
|
|
endif #BR2_LINUX_EXT_XENOMAI
|