diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2020-04-30 20:34:11 +0200 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2020-06-01 11:52:32 +0200 |
commit | dd804f0b06b3f76a3717218164860fb6e8e2748f (patch) | |
tree | 5461dea02c49131de01cba9da093cddbaa27a833 /recipes-kernel/linux/linux-toradex-mainline.inc | |
parent | 1c5c72ecc735a5c3286600ebfab73ea2f95f83c6 (diff) |
linux-toradex-mainline: allow to build with rt-patch applied
With preempt-rt in overrides, the recipe now builds an RT kernel.
i.e.:
- downloads the rt patch as specified in SRC_URI and applies it
- uses the provided defconfig but modifies the configuration to use
PREEMPT_RT.
Related-to: ELB-2631
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
(cherry picked from commit 363288efc5d559b2a97da02a16f796a795af5215)
Diffstat (limited to 'recipes-kernel/linux/linux-toradex-mainline.inc')
-rw-r--r-- | recipes-kernel/linux/linux-toradex-mainline.inc | 12 |
1 files changed, 10 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} } - |