summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
Diffstat (limited to 'linux')
-rw-r--r--linux/Config.ext.in15
-rw-r--r--linux/linux-ext-xenomai.mk30
2 files changed, 45 insertions, 0 deletions
diff --git a/linux/Config.ext.in b/linux/Config.ext.in
index 50e801d67..893edb58b 100644
--- a/linux/Config.ext.in
+++ b/linux/Config.ext.in
@@ -1,3 +1,18 @@
menu "Linux Kernel Extensions"
+# Xenomai
+config BR2_LINUX_KERNEL_EXT_XENOMAI
+ bool "Adeos/Xenomai Real-time patch"
+ select BR2_PACKAGE_XENOMAI
+ help
+ Xenomai Kernel part.
+
+config BR2_LINUX_KERNEL_EXT_XENOMAI_ADEOS_PATCH
+ depends on BR2_LINUX_KERNEL_EXT_XENOMAI
+ string "Path for Adeos patch file"
+ help
+ Optionally, explicitly specify the Adeos patch to use.
+ Download it at http://download.gna.org/adeos/patches/v2.6/$(ARCH)/
+ and verify that your kernel version in buildroot matches.
+
endmenu
diff --git a/linux/linux-ext-xenomai.mk b/linux/linux-ext-xenomai.mk
new file mode 100644
index 000000000..e855deddf
--- /dev/null
+++ b/linux/linux-ext-xenomai.mk
@@ -0,0 +1,30 @@
+##################################################
+# Linux Adeos/Xenomai extensions
+#
+# Patch the linux kernel with xenomai extension
+##################################################
+
+ifeq ($(BR2_LINUX_KERNEL_EXT_XENOMAI),y)
+# Add dependency to xenomai (user-space) which provide ksrc part
+LINUX_DEPENDENCIES += xenomai
+
+# Adeos patch version
+XENOMAI_ADEOS_PATCH = $(call qstrip,$(BR2_LINUX_KERNEL_EXT_XENOMAI_ADEOS_PATCH))
+ifeq ($(XENOMAI_ADEOS_PATCH),)
+XENOMAI_ADEOS_OPT = --default
+else
+XENOMAI_ADEOS_OPT = --adeos=$(XENOMAI_ADEOS_PATCH)
+endif
+
+# Prepare kernel patch
+define XENOMAI_PREPARE_KERNEL
+ $(XENOMAI_DIR)/scripts/prepare-kernel.sh \
+ --linux=$(LINUX_DIR) \
+ --arch=$(KERNEL_ARCH) \
+ $(XENOMAI_ADEOS_OPT) \
+ --verbose
+endef
+
+LINUX_POST_EXTRACT_HOOKS += XENOMAI_PREPARE_KERNEL
+
+endif #BR2_LINUX_EXT_XENOMAI