summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2024-03-01 10:56:05 +0100
committerMax Krummenacher <max.krummenacher@toradex.com>2024-03-13 15:56:59 +0100
commit8c80d93720e79cf6d6c4668211585a834d24822e (patch)
tree45cc7e21651df7803f4cb8d1537362ddb654a6b5
parentbe05799626a370455cdf9cc60bf273858dd71c33 (diff)
linux-toradex-ti: add variant building with rt patch applied
If preempt-rt is in overrides apply the RT patch on top of our regular kernel tree and configure the kernel for PREEMPT-RT. Related-to: ELB-5243 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit f4a2c0c228eaeb15c399e7341068da3f7d375d10)
-rw-r--r--recipes-kernel/linux/linux-toradex-ti-6.1/preempt-rt-less-latency.cfg14
-rw-r--r--recipes-kernel/linux/linux-toradex-ti-6.1/preempt-rt-less-latency.scc4
-rw-r--r--recipes-kernel/linux/linux-toradex-ti-6.1/preempt-rt.cfg6
-rw-r--r--recipes-kernel/linux/linux-toradex-ti-6.1/preempt-rt.scc4
-rw-r--r--recipes-kernel/linux/linux-toradex-ti_6.1.bb18
5 files changed, 46 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-toradex-ti-6.1/preempt-rt-less-latency.cfg b/recipes-kernel/linux/linux-toradex-ti-6.1/preempt-rt-less-latency.cfg
new file mode 100644
index 0000000..a9c88bd
--- /dev/null
+++ b/recipes-kernel/linux/linux-toradex-ti-6.1/preempt-rt-less-latency.cfg
@@ -0,0 +1,14 @@
+# CONFIG_PM_DEBUG is not set
+# CONFIG_6LOWPAN_DEBUGFS is not set
+# CONFIG_BT_DEBUGFS is not set
+# CONFIG_ATH9K_DEBUGFS is not set
+# CONFIG_ATH9K_HTC_DEBUGFS is not set
+# CONFIG_ATH10K_DEBUGFS is not set
+# CONFIG_RTLWIFI_DEBUG is not set
+# CONFIG_IEEE802154_AT86RF230_DEBUGFS is not set
+# CONFIG_DYNAMIC_DEBUG is not set
+# CONFIG_DETECT_HUNG_TASK is not set
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_SCHED_DEBUG is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_CORESIGHT is not set
diff --git a/recipes-kernel/linux/linux-toradex-ti-6.1/preempt-rt-less-latency.scc b/recipes-kernel/linux/linux-toradex-ti-6.1/preempt-rt-less-latency.scc
new file mode 100644
index 0000000..edd1519
--- /dev/null
+++ b/recipes-kernel/linux/linux-toradex-ti-6.1/preempt-rt-less-latency.scc
@@ -0,0 +1,4 @@
+define KFEATURE_DESCRIPTION "Disable configs that could lead to preempt-rt latency"
+define KFEATURE_COMPATIBILITY board
+
+kconf non-hardware preempt-rt-less-latency.cfg
diff --git a/recipes-kernel/linux/linux-toradex-ti-6.1/preempt-rt.cfg b/recipes-kernel/linux/linux-toradex-ti-6.1/preempt-rt.cfg
new file mode 100644
index 0000000..17b06b1
--- /dev/null
+++ b/recipes-kernel/linux/linux-toradex-ti-6.1/preempt-rt.cfg
@@ -0,0 +1,6 @@
+CONFIG_EXPERT=y
+# CONFIG_KVM is not set
+# CONFIG_PREEMPT_NONE is not set
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_PREEMPT_RT=y
diff --git a/recipes-kernel/linux/linux-toradex-ti-6.1/preempt-rt.scc b/recipes-kernel/linux/linux-toradex-ti-6.1/preempt-rt.scc
new file mode 100644
index 0000000..82d27dc
--- /dev/null
+++ b/recipes-kernel/linux/linux-toradex-ti-6.1/preempt-rt.scc
@@ -0,0 +1,4 @@
+define KFEATURE_DESCRIPTION "Enable Features needed by preempt-rt"
+define KFEATURE_COMPATIBILITY board
+
+kconf non-hardware preempt-rt.cfg
diff --git a/recipes-kernel/linux/linux-toradex-ti_6.1.bb b/recipes-kernel/linux/linux-toradex-ti_6.1.bb
index b7d5957..bfb25aa 100644
--- a/recipes-kernel/linux/linux-toradex-ti_6.1.bb
+++ b/recipes-kernel/linux/linux-toradex-ti_6.1.bb
@@ -3,6 +3,8 @@ SUMMARY = "Linux kernel for Toradex TI based modules"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-${PV}:"
+
SRC_URI = " \
git://git.toradex.com/linux-toradex.git;protocol=https;branch=${SRCBRANCH};name=machine \
"
@@ -53,3 +55,19 @@ KBUILD_DEFCONFIG ?= "toradex_defconfig"
# We need to pass it as param since kernel might support more then one
# machine, with different entry points
KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
+
+###############################################################################
+# Apply the RT patch and change the configuration to use PREMPT_RT when the
+# preempt-rt override is set.
+###############################################################################
+
+# patches get moved into the 'older' directory when superseeded, so provide
+# both possible storage locations.
+MIRRORS:append:preempt-rt = "${KERNELORG_MIRROR}/linux/kernel/projects/rt/5.15/older/ ${KERNELORG_MIRROR}/linux/kernel/projects/rt/5.15/"
+SRC_URI:append:preempt-rt = " \
+ ${KERNELORG_MIRROR}/linux/kernel/projects/rt/6.1/older/patch-6.1.46-rt13.patch.xz;name=rt-patch \
+ file://preempt-rt.scc \
+ file://preempt-rt-less-latency.scc \
+"
+
+SRC_URI[rt-patch.sha256sum] = "df29cf27bb7ef0b7750f541d959b791905a5d41a322896f9a4bb57b5ab00f202"