The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / linux / linux-ext-rtai.mk
diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/linux/linux-ext-rtai.mk b/cirros-testvm/src-cirros/buildroot-2015.05/linux/linux-ext-rtai.mk
new file mode 100644 (file)
index 0000000..0cc1232
--- /dev/null
@@ -0,0 +1,30 @@
+################################################################################
+# Linux RTAI extensions
+#
+# Patch the linux kernel with RTAI extension
+################################################################################
+
+LINUX_EXTENSIONS += rtai
+
+ifeq ($(KERNEL_ARCH),i386)
+RTAI_ARCH = x86
+else ifeq ($(KERNEL_ARCH),x86_64)
+RTAI_ARCH = x86
+else ifeq ($(KERNEL_ARCH),powerpc)
+RTAI_ARCH = ppc
+else
+RTAI_ARCH = $(KERNEL_ARCH)
+endif
+
+# Prepare kernel patch
+define RTAI_PREPARE_KERNEL
+       kver=`$(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) --no-print-directory -s kernelversion` ; \
+       if test -f $(RTAI_DIR)/base/arch/$(RTAI_ARCH)/patches/hal-linux-$${kver}-*patch ; then \
+               $(APPLY_PATCHES) $(LINUX_DIR)                           \
+                       $(RTAI_DIR)/base/arch/$(RTAI_ARCH)/patches/     \
+                       hal-linux-$${kver}-*patch ; \
+       else \
+               echo "No RTAI patch for your kernel version" ; \
+               exit 1 ; \
+       fi
+endef