summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--recipes-kernel/linux/linux-toradex-mainline.inc12
-rw-r--r--recipes-kernel/linux/linux-toradex-mainline_5.4.bb6
2 files changed, 16 insertions, 2 deletions
diff --git a/recipes-kernel/linux/linux-toradex-mainline.inc b/recipes-kernel/linux/linux-toradex-mainline.inc
index 06409d3..40576b0 100644
--- a/recipes-kernel/linux/linux-toradex-mainline.inc
+++ b/recipes-kernel/linux/linux-toradex-mainline.inc
@@ -4,7 +4,7 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM ?= "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
-inherit kernel toradex-kernel-localversion
+inherit kernel toradex-kernel-config toradex-kernel-localversion
SRC_URI = " \
git://git.toradex.com/linux-toradex.git;protocol=https;branch=${KBRANCH};name=machine \
@@ -14,6 +14,15 @@ S = "${WORKDIR}/git"
DEPENDS += "coreutils-native"
+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
+}
+
do_install_append() {
install -d ${D}/boot
make -C ${S} O=${B} ARCH=$ARCH dtbs || true
@@ -30,4 +39,3 @@ do_deploy_append() {
cp -a ${B}/.config ${DEPLOYDIR}/${KERNEL_CONFIG_NAME}
ln -sf ${KERNEL_CONFIG_NAME} ${DEPLOYDIR}/${KERNEL_CONFIG_LINK_NAME}
}
-
diff --git a/recipes-kernel/linux/linux-toradex-mainline_5.4.bb b/recipes-kernel/linux/linux-toradex-mainline_5.4.bb
index 0424251..3121aac 100644
--- a/recipes-kernel/linux/linux-toradex-mainline_5.4.bb
+++ b/recipes-kernel/linux/linux-toradex-mainline_5.4.bb
@@ -13,3 +13,9 @@ require recipes-kernel/linux/linux-toradex-mainline.inc
SRC_URI += " \
file://defconfig \
"
+
+SRC_URI_append_preempt-rt = " \
+ ${KERNELORG_MIRROR}/linux/kernel/projects/rt/5.4/older/patch-5.4.34-rt21.patch.xz;name=rt-patch \
+"
+SRC_URI[rt-patch.md5sum] = "0b11e1509cb4095b52a27fc0dc4087f8"
+SRC_URI[rt-patch.sha256sum] = "e4e73861fb95e326f3c6aafa9746906fa33d9ee5eeb8ad538745a4ea4dd1f0dd"