From de6c8e584f623fc4bbda89d819fab5bb0b2a57a8 Mon Sep 17 00:00:00 2001
From: James Hilliard <james.hilliard1@gmail.com>
Date: Mon, 2 May 2022 02:26:56 -0600
Subject: [PATCH] linux: do not allow selecting RTAI for latest/cip kernels

RTAI is only supported on very specific kernel versions that are
different from the latest/cip kernel versions, so we should not
allow selecting RTAI when building with latest/cip kernels.

Fixes:
 - http://autobuild.buildroot.net/results/412/412492e19b41f95ff2445df6b7564cb0fa48873b
 - http://autobuild.buildroot.net/results/32c/32c9ffd8e965eb690ca0b0471e9c1cc16bb2fa66
 - http://autobuild.buildroot.net/results/0bc/0bc178dcb11aa23e5f8bf75c958d8a56c6c38964

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
(cherry picked from commit e5ff1de64e60f6ab2faaa751378fce0ec6bf1010)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 linux/Config.ext.in | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/linux/Config.ext.in b/linux/Config.ext.in
index 734a52a533..5b968b0bcb 100644
--- a/linux/Config.ext.in
+++ b/linux/Config.ext.in
@@ -48,6 +48,9 @@ comment "xenomai needs a uClibc or glibc toolchain w/ threads"
 # RTAI
 config BR2_LINUX_KERNEL_EXT_RTAI
 	bool "RTAI Real-time patch"
+	depends on !BR2_LINUX_KERNEL_LATEST_VERSION
+	depends on !BR2_LINUX_KERNEL_LATEST_CIP_VERSION
+	depends on !BR2_LINUX_KERNEL_LATEST_CIP_RT_VERSION
 	select BR2_PACKAGE_RTAI
 	help
 	  RTAI Kernel part.