summaryrefslogtreecommitdiff
path: root/recipes-kernel/linux/linux-toradex_5.4-2.1.x.bb
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2020-08-18 16:40:47 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2020-08-20 19:18:52 +0200
commitaf0894ce5e365e88f51e52306c64b9614d69276a (patch)
treec238619d6816d3cbe3ef8038d4a932061359d085 /recipes-kernel/linux/linux-toradex_5.4-2.1.x.bb
parent0ac693c50e5b1b22813b0226a0c3f79b281e78d9 (diff)
linux-toradex-rt: update to downstream 5.4-2.1.x
This drops the linux-toradex-rt recipe in favour of combining its functionality into the linux-toradex_5.4-2.1.x.bb recipe. The override preempt-rt applies the RT patch and changes the kernel config to use PREEMPT_RT. Related-to: ELB-2758 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'recipes-kernel/linux/linux-toradex_5.4-2.1.x.bb')
-rw-r--r--recipes-kernel/linux/linux-toradex_5.4-2.1.x.bb30
1 files changed, 30 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-toradex_5.4-2.1.x.bb b/recipes-kernel/linux/linux-toradex_5.4-2.1.x.bb
index 7a2f5e3..fc22b5f 100644
--- a/recipes-kernel/linux/linux-toradex_5.4-2.1.x.bb
+++ b/recipes-kernel/linux/linux-toradex_5.4-2.1.x.bb
@@ -2,6 +2,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
require recipes-kernel/linux/linux-imx.inc
SUMMARY = "Linux kernel for Toradex Freescale i.MX based modules"
+SUMMARY_append_preempt-rt = "Real-Time Linux kernel for Toradex Freescale i.MX based modules"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
@@ -38,3 +39,32 @@ SRCREV_use-head-next = "${AUTOREV}"
DEPENDS += "lzop-native bc-native"
COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
+
+###############################################################################
+# 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.4/older/ ${KERNELORG_MIRROR}/linux/kernel/projects/rt/5.4/"
+SRC_URI_append_preempt-rt = " \
+ ${KERNELORG_MIRROR}/linux/kernel/projects/rt/5.4/older/patch-5.4.47-rt28.patch.xz;name=rt-patch \
+"
+# This patches do currently not apply but are likely needed or we get
+# runtime bugs.
+# file://0001-imx_sc_thermal-prevent-BUG-with-rt-patch.patch \
+# file://0002-ddr-perf-prevent-BUG-with-rt-patch.patch \
+#
+
+SRC_URI[rt-patch.md5sum] = "032a1eee60e746fe32a3aa73604bc3e4"
+SRC_URI[rt-patch.sha256sum] = "dadc1379e816e8a23f09713884f8889f0177f291974487f33efc9a646082c562"
+
+kernel_do_configure_append_preempt-rt() {
+ # switch to use PREEMPT_RT
+ kernel_configure_variable PREEMPT_NONE n
+ kernel_configure_variable PREEMPT_VOLUNTARY n
+ kernel_configure_variable PREEMPT n
+ kernel_configure_variable PREEMPT_RT y
+ oe_runmake olddefconfig
+}