1 ################################################################################
2 # Linux RTAI extensions
4 # Patch the linux kernel with RTAI extension
5 ################################################################################
7 ifeq ($(BR2_LINUX_KERNEL_EXT_RTAI
),y
)
8 # Add dependency to RTAI (user-space) which provide kernel patches
9 LINUX_DEPENDENCIES
+= rtai-patch
11 RTAI_PATCH
= $(call qstrip
,$(BR2_LINUX_KERNEL_EXT_RTAI_PATCH
))
13 ifeq ($(KERNEL_ARCH
),i386
)
15 else ifeq ($(KERNEL_ARCH
),x86_64
)
17 else ifeq ($(KERNEL_ARCH
),powerpc
)
20 RTAI_ARCH
= $(KERNEL_ARCH
)
23 # Prepare kernel patch
25 define RTAI_PREPARE_KERNEL
26 kver
=`$(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) --no-print-directory -s kernelversion` ; \
27 if
test -f
$(RTAI_DIR
)/base
/arch
/$(RTAI_ARCH
)/patches
/hal-linux-
$${kver}-*patch
; then \
28 support
/scripts
/apply-patches.sh
$(LINUX_DIR
) \
29 $(RTAI_DIR
)/base
/arch
/$(RTAI_ARCH
)/patches
/ \
30 hal-linux-
$${kver}-*patch
; \
32 echo
"No RTAI patch for your kernel version" ; \
37 define RTAI_PREPARE_KERNEL
38 support
/scripts
/apply-patches.sh \
40 $(dir $(RTAI_PATCH
)) \
41 $(notdir $(RTAI_PATCH
))
45 LINUX_PRE_PATCH_HOOKS
+= RTAI_PREPARE_KERNEL
47 endif #BR2_LINUX_EXT_RTAI