Hi Bruce,

I believe the recipe for building Variscite’s kernel is in 
meta-variscite-imx/recipes-kernel/linux/linux-variscite_4.19.35.bb, which does 
produce a booting U-Boot and Linux image.  What would need to be modified to 
enable the rt-linux kernel?  The recipe is provided below.

# Copyright (C) 2013-2016 Freescale Semiconductor
# Copyright 2017 NXP
# Copyright 2018-2019 Variscite Ltd.
# Released under the MIT license (see COPYING.MIT for the terms)

SUMMARY = "Linux kernel provided and supported by Variscite"
DESCRIPTION = "Linux kernel provided and supported by Variscite (based on the 
kernel provided by NXP) \
with focus on i.MX Family SOMs. It includes support for many IPs such as GPU, 
VPU and IPU."

require recipes-kernel/linux/linux-imx.inc
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"

DEPENDS += "lzop-native bc-native"

DEFAULT_PREFERENCE = "1"

SRCBRANCH = "imx_4.19.35_1.1.0_var01"

LOCALVERSION_imx8mq-var-dart = "-imx8mq"
LOCALVERSION_imx8mm-var-dart = "-imx8mm"
LOCALVERSION_imx8mn-var-som = "-imx8mn"
LOCALVERSION_imx8qxp-var-som = "-imx8x"
LOCALVERSION_imx8qm-var-som = "-imx8qm"

KERNEL_DEFCONFIG = "${S}/arch/arm64/configs/imx8_var_defconfig"
DEFAULT_DTB_imx8mq-var-dart = "sd-lvds"
DEFAULT_DTB_imx8qxp-var-som = "sd"
DEFAULT_DTB_imx8qm-var-som = "lvds"
DEFAULT_DTB_PREFIX_imx8mq-var-dart = "fsl-imx8mq-var-dart"
DEFAULT_DTB_PREFIX_imx8qxp-var-som = "fsl-imx8qxp-var-som"
DEFAULT_DTB_PREFIX_imx8qm-var-som = "fsl-imx8qm-var-som"

KERNEL_SRC ?= "git://github.com/varigit/linux-imx;protocol=git"
SRC_URI = "${KERNEL_SRC};branch=${SRCBRANCH}"
SRCREV = "e6d3e3fefe4e85b5ee45beb7609b3c02bfe23efb"

S = "${WORKDIR}/git"

addtask copy_defconfig after do_patch before do_preconfigure
do_copy_defconfig () {
    cp ${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig
}

pkg_postinst_kernel-devicetree_append () {
   rm -f $D/boot/devicetree-*
}

pkg_postinst_kernel-devicetree_append_imx8mq-var-dart () {
    cd $D/boot
    ln -s ${DEFAULT_DTB_PREFIX}-${DEFAULT_DTB}.dtb ${DEFAULT_DTB_PREFIX}.dtb
    ln -s ${DEFAULT_DTB_PREFIX}-${DEFAULT_DTB}-cb12.dtb 
${DEFAULT_DTB_PREFIX}-cb12.dtb
}

pkg_postinst_kernel-devicetree_append_imx8qxp-var-som () {
    cd $D/boot
    ln -s ${DEFAULT_DTB_PREFIX}-${DEFAULT_DTB}.dtb ${DEFAULT_DTB_PREFIX}.dtb
}

pkg_postinst_kernel-devicetree_append_imx8qm-var-som () {
    cd $D/boot
    ln -s ${DEFAULT_DTB_PREFIX}-${DEFAULT_DTB}.dtb ${DEFAULT_DTB_PREFIX}.dtb
    ln -s fsl-imx8qm-var-spear-${DEFAULT_DTB}.dtb fsl-imx8qm-var-spear.dtb
}

COMPATIBLE_MACHINE = "(mx8)"
EXTRA_OEMAKE_append_mx8 = " ARCH=arm64"

Scott D. Whitney
[cid:image003.png@01D664C9.78C615A0]
s...@inea.com<mailto:s...@inea.com>    |     T: 781-801-1152    |     F: 
781-801-1108    |     www.inea.com<http://www.inea.com/>

From: Bruce Ashfield <bruce.ashfi...@gmail.com>
Sent: Tuesday, July 28, 2020 10:18 AM
To: Scott Whitney <s...@inea.com>
Cc: yo...@yoctoproject.org
Subject: Re: [yocto] How to enable preempt-rt in Yocto Zeus or Warrior?



On Tue, Jul 28, 2020 at 8:45 AM Scott Whitney 
<s...@inea.com<mailto:s...@inea.com>> wrote:
Hi Bruce,

Yes, we are using Linux built by Yocto, but where is the preferred provider for 
the kernel set to linux-yocto-rt?


This is one of the nuances about OE/Yocto, it isn't about building the kernel 
with yocto, I was wondering about the kernel recipe you are using.

If you have a booting kernel built from linux-yocto (the recipe), then the 
switch to -rt is easy. If it isn't using linux-yocto, then using -rt is 
specific to the kernel provider that you have (and it may be just as easy as 
the linux-yocto switch ... just without the details of that recipe/provider, I 
can't say).

The preferred provider is likely set in the vendor's BSP layer, and it likely 
points at whatever vendor kernel they are currently shipping.

Cheers,

Bruce


Thanks for your help

Scott D. Whitney
[cid:image002.png@01D664C9.78BEC2A0]
s...@inea.com<mailto:s...@inea.com>    |     T: 781-801-1152    |     F: 
781-801-1108    |     www.inea.com<http://www.inea.com/>

From: Bruce Ashfield <bruce.ashfi...@gmail.com<mailto:bruce.ashfi...@gmail.com>>
Sent: Monday, July 27, 2020 10:04 PM
To: Scott Whitney <s...@inea.com<mailto:s...@inea.com>>
Cc: yo...@yoctoproject.org<mailto:yo...@yoctoproject.org>
Subject: Re: [yocto] How to enable preempt-rt in Yocto Zeus or Warrior?



On Mon, Jul 27, 2020 at 3:51 PM Scott Whitney 
<s...@inea.com<mailto:s...@inea.com>> wrote:
Hi Yocto group,

I’m working with a newly-released copy of Yocto Zeus from Variscite for the 
i.MX8MM Mini, although the same option seems to apply to the previous Yocto 
Warrior.

I understand that a Linux real-time kernel can be enabled by setting 
LINUX_KERNEL_TYPE = “preempt-rt”.  Where does this option need to be set so 
that when I bitbake fsl-image-qt5, I get the Linux “preempt-rt” kernel instead 
of the “standard” kernel?

Is there a specific configuration file that needs to be modified, or a new 
recipe in a layer?  I am confused and hoping that you can help.

If you aren't using linux-yocto, you'll need to arrange for the preempt-rt 
patch(es) to be applied to whatever kernel you are using. Which means you are 
creating a new recipe, bbappending an existing one, or if you are lucky the 
kernel provider already has a -rt recipe available.

If you are using linux-yocto, it's as simple as setting the preferred provider 
of the kernel as linux-yocto-rt  and building.

Bruce



Best regards,

Scott D. Whitney
Principal Software Engineer
[cid:image002.png@01D664C9.78BEC2A0]
Intertech Engineering Associates, Inc.
100 Lowder Brook Drive, Suite 2500
Westwood, MA  02090
s...@inea.com<mailto:s...@inea.com>    |     T: 781-801-1152    |     F: 
781-801-1108    |     www.inea.com<http://www.inea.com/>




--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at 
its end
- "Use the force Harry" - Gandalf, Star Trek II


--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at 
its end
- "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#50120): https://lists.yoctoproject.org/g/yocto/message/50120
Mute This Topic: https://lists.yoctoproject.org/mt/75830848/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to