2013-06-07 12:13:46 +02:00
|
|
|
################################################################################
|
2011-09-17 22:22:58 +02:00
|
|
|
#
|
|
|
|
# Patch the linux kernel with RTAI extension
|
2018-04-01 07:08:22 +02:00
|
|
|
#
|
2013-06-07 12:13:46 +02:00
|
|
|
################################################################################
|
2011-09-17 22:22:58 +02:00
|
|
|
|
2015-03-14 15:25:21 +01:00
|
|
|
LINUX_EXTENSIONS += rtai
|
2011-09-17 22:22:58 +02:00
|
|
|
|
|
|
|
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 \
|
2018-04-01 07:08:23 +02:00
|
|
|
$(APPLY_PATCHES) $(LINUX_DIR) \
|
|
|
|
$(RTAI_DIR)/base/arch/$(RTAI_ARCH)/patches/ \
|
2011-09-17 22:22:58 +02:00
|
|
|
hal-linux-$${kver}-*patch ; \
|
|
|
|
else \
|
|
|
|
echo "No RTAI patch for your kernel version" ; \
|
|
|
|
exit 1 ; \
|
|
|
|
fi
|
|
|
|
endef
|