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.
Best regards,
Scott D. Whitney
Principal Software Engineer

Intertech Engineering Associates, Inc.
100 Lowder Brook Drive, Suite 2500
Westwood, MA 02090
sdw@... | T: 781-801-1152 | F: 781-801-1108 |
www.inea.com
|
|
On Mon, Jul 27, 2020 at 3:51 PM Scott Whitney < sdw@...> 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

Intertech Engineering Associates, Inc.
100 Lowder Brook Drive, Suite 2500
Westwood, MA 02090
sdw@... | T: 781-801-1152 | F: 781-801-1108 |
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
|
|
Hi Bruce,
Yes, we are using Linux built by Yocto, but where is the preferred provider for the kernel set to linux-yocto-rt?
Thanks for your help
Scott D. Whitney

sdw@... | T: 781-801-1152 | F: 781-801-1108 |
www.inea.com
toggle quoted messageShow quoted text
From: Bruce Ashfield <bruce.ashfield@...>
Sent: Monday, July 27, 2020 10:04 PM
To: Scott Whitney <sdw@...>
Cc: yocto@...
Subject: Re: [yocto] How to enable preempt-rt in Yocto Zeus or Warrior?
On Mon, Jul 27, 2020 at 3:51 PM Scott Whitney <sdw@...> 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.
Best regards,
Scott D. Whitney
Principal Software Engineer

Intertech Engineering Associates, Inc.
100 Lowder Brook Drive, Suite 2500
Westwood, MA 02090
sdw@... | T: 781-801-1152 | F: 781-801-1108 |
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
|
|
Hello Scott,
I have a bit of a different idea about the whole YOCTO process.
Let me suggest something else, actually a hybrid combination of the YOCTO build system.
You can do the whole process of YOCTO, but why do you not use components out of the YOCTO building process?
For example, you can use rootfs built by YOCTO, and U-Boot and rt-kernel built out of the YOCTO, for the beginning?
Then, as an option, if you are satisfied with the reached architecture, you can write your own recipe for the rt-kernel (you need to incorporate a bunch of patches into the rt-kernel proprietary recipe).
Zoran _______
toggle quoted messageShow quoted text
On Tue, Jul 28, 2020 at 2:45 PM Scott Whitney <sdw@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?
Thanks for your help
Scott D. Whitney
sdw@inea.com | T: 781-801-1152 | F: 781-801-1108 | www.inea.com
From: Bruce Ashfield <bruce.ashfield@gmail.com> Sent: Monday, July 27, 2020 10:04 PM To: Scott Whitney <sdw@inea.com> Cc: yocto@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 <sdw@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
Intertech Engineering Associates, Inc. 100 Lowder Brook Drive, Suite 2500 Westwood, MA 02090 sdw@inea.com | T: 781-801-1152 | F: 781-801-1108 | 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
|
|
On Tue, Jul 28, 2020 at 8:45 AM Scott Whitney < sdw@...> 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

sdw@... | T: 781-801-1152 | F: 781-801-1108 |
www.inea.com
From: Bruce Ashfield <bruce.ashfield@...>
Sent: Monday, July 27, 2020 10:04 PM
To: Scott Whitney <sdw@...>
Cc: yocto@...
Subject: Re: [yocto] How to enable preempt-rt in Yocto Zeus or Warrior?
On Mon, Jul 27, 2020 at 3:51 PM Scott Whitney <sdw@...> 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.
Best regards,
Scott D. Whitney
Principal Software Engineer

Intertech Engineering Associates, Inc.
100 Lowder Brook Drive, Suite 2500
Westwood, MA 02090
sdw@... | T: 781-801-1152 | F: 781-801-1108 |
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
|
|
Hi Zoran, Thank you for responding. I confess I am still new to building Linux with Yocto, so some of your steps may seem obvious, but are a bit confusing to a 'newbie'. I am using normal Yocto instruction provided by Variscite to build our rootfs, U-Boot, and kernel. However, I am not doing anything special to build an rt-kernel, and that is what I am trying to find out how to do. For example, after downloading and installing prerequisite executables, I initialize our repo (example is for Yocto Warrior, but similar for Yocto Zeus): $ repo init -u https://github.com/varigit/variscite-bsp-platform.git -b fsl-warrior -m imx-4.19.35-1.1.0-var01.xml $ repo sync -j4 Then I configure our machine, distro, and build directory: $ cd ~/var-fsl-yocto $ MACHINE=imx8mm-var-dart DISTRO=fsl-imx-xwayland . var-setup-release.sh -b build_xwayland Then I am in the build_xwayland directory, and create our SD card image using: $ bitbake fsl-image-qt5 The SD card image ends up in the build_xwayland/tmp/deploy/images directory, and I use the following to flash the SD card: # For fsl-image-qt5 image (Qt5-XWAYLAND & Qt5-WAYLAND) $ zcat tmp/deploy/images/imx8mm-var-dart/fsl-image-qt5-imx8mm-var-dart.sdcard.gz | sudo dd of=/dev/sdX bs=1M conv=fsync What steps are you suggesting to configure rt-linux? I would appreciate it if you could be specific, since some of the steps involved are new to me. I have already added a .bbappend file to modify the device tree for our application, and have run bitbake -c menuconfig virtual/kernel to update the kernel configuration. Thanks for your assistance and tolerance for my inexperienced questions. Scott D. Whitney sdw@inea.com | T: 781-801-1152 | F: 781-801-1108 | www.inea.com
toggle quoted messageShow quoted text
-----Original Message----- From: Zoran Stojsavljevic <zoran.stojsavljevic@gmail.com> Sent: Tuesday, July 28, 2020 10:05 AM To: Scott Whitney <sdw@inea.com> Cc: Bruce Ashfield <bruce.ashfield@gmail.com>; yocto@yoctoproject.org Subject: Re: [yocto] How to enable preempt-rt in Yocto Zeus or Warrior? Hello Scott, I have a bit of a different idea about the whole YOCTO process. Let me suggest something else, actually a hybrid combination of the YOCTO build system. You can do the whole process of YOCTO, but why do you not use components out of the YOCTO building process? For example, you can use rootfs built by YOCTO, and U-Boot and rt-kernel built out of the YOCTO, for the beginning? Then, as an option, if you are satisfied with the reached architecture, you can write your own recipe for the rt-kernel (you need to incorporate a bunch of patches into the rt-kernel proprietary recipe). Zoran _______ On Tue, Jul 28, 2020 at 2:45 PM Scott Whitney <sdw@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?
Thanks for your help
Scott D. Whitney
sdw@inea.com | T: 781-801-1152 | F: 781-801-1108 | www.inea.com
From: Bruce Ashfield <bruce.ashfield@gmail.com> Sent: Monday, July 27, 2020 10:04 PM To: Scott Whitney <sdw@inea.com> Cc: yocto@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 <sdw@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
Intertech Engineering Associates, Inc. 100 Lowder Brook Drive, Suite 2500 Westwood, MA 02090 sdw@inea.com | T: 781-801-1152 | F: 781-801-1108 | 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
|
|
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

sdw@... | T: 781-801-1152 | F: 781-801-1108 |
www.inea.com
toggle quoted messageShow quoted text
From: Bruce Ashfield <bruce.ashfield@...>
Sent: Tuesday, July 28, 2020 10:18 AM
To: Scott Whitney <sdw@...>
Cc: yocto@...
Subject: Re: [yocto] How to enable preempt-rt in Yocto Zeus or Warrior?
On Tue, Jul 28, 2020 at 8:45 AM Scott Whitney <sdw@...> 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.
Thanks for your help
Scott D. Whitney

sdw@... |
T: 781-801-1152 | F: 781-801-1108 | www.inea.com
From: Bruce Ashfield <bruce.ashfield@...>
Sent: Monday, July 27, 2020 10:04 PM
To: Scott Whitney <sdw@...>
Cc: yocto@...
Subject: Re: [yocto] How to enable preempt-rt in Yocto Zeus or Warrior?
On Mon, Jul 27, 2020 at 3:51 PM Scott Whitney <sdw@...> 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.
Best regards,
Scott D. Whitney
Principal Software Engineer

Intertech Engineering Associates, Inc.
100 Lowder Brook Drive, Suite 2500
Westwood, MA 02090
sdw@... | T: 781-801-1152 | F: 781-801-1108 |
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
|
|
On Tue, Jul 28, 2020 at 10:26 AM Scott Whitney < sdw@...> wrote:
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.
At a high level, you need to get the appropriate preempt-rt patch from the -rt project, add it to the SRC_URI (via bbappend), fix the patch so that it applies to that kernel, build, and then debug and boot failures.
That's the trivialized version of the steps.
As for how to get the patch and apply it, it is just like any other package for patching, so you can lookup the details in the reference manuals and/or find other kernel recipe examples that are doing something similar. They will do a better job than I ever would explaining the steps here.
Cheers,
Bruce
# 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

sdw@... | T: 781-801-1152 | F: 781-801-1108 |
www.inea.com
From: Bruce Ashfield <bruce.ashfield@...>
Sent: Tuesday, July 28, 2020 10:18 AM
To: Scott Whitney <sdw@...>
Cc: yocto@...
Subject: Re: [yocto] How to enable preempt-rt in Yocto Zeus or Warrior?
On Tue, Jul 28, 2020 at 8:45 AM Scott Whitney <sdw@...> 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.
Thanks for your help
Scott D. Whitney

sdw@... |
T: 781-801-1152 | F: 781-801-1108 | www.inea.com
From: Bruce Ashfield <bruce.ashfield@...>
Sent: Monday, July 27, 2020 10:04 PM
To: Scott Whitney <sdw@...>
Cc: yocto@...
Subject: Re: [yocto] How to enable preempt-rt in Yocto Zeus or Warrior?
On Mon, Jul 27, 2020 at 3:51 PM Scott Whitney <sdw@...> 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.
Best regards,
Scott D. Whitney
Principal Software Engineer

Intertech Engineering Associates, Inc.
100 Lowder Brook Drive, Suite 2500
Westwood, MA 02090
sdw@... | T: 781-801-1152 | F: 781-801-1108 |
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
-- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
|
|
Hello Scott, What I wanted to say here is that you do not change anything while building a YOCTO load. You'll get all the components in: .../tmp/deploy/images/$(PLATFORM) , namely: XYZ,rootfs.cpio.zx U-Boot zImage modules But you can build a rt-kernel very conventionally, using out of YOCTO classical kernel build. [1] Download from the provider the normal kernel; [2] Apply rt-patches to it (usually there is a script for it); [3] make imx8_defconfig or whatever *_defconfig which suits to your platform; [4] make menuconfig (for checking which CONFIG_ options are included, and if you need something more/less, to adjust it; [5] make [6] sudo make modules_install This is in nutshell, you might need to use cross compiling options, like I do for BBB: https://github.com/ZoranStojsavljevic/MikroE_BeagleBone-Black_BSP-Integration/blob/master/README.md(please, find U-Boot and kernel classical building procedures in there) The same for U-Boot, or even you can use YOCTO's U-Boot. Then, if the whole system suits your requirements, you might go by Bruce's advices (from his very last email). Just an idea how to ease your initial pain... Zoran _______
toggle quoted messageShow quoted text
On Tue, Jul 28, 2020 at 4:18 PM Scott Whitney <sdw@inea.com> wrote: Hi Zoran,
Thank you for responding. I confess I am still new to building Linux with Yocto, so some of your steps may seem obvious, but are a bit confusing to a 'newbie'.
I am using normal Yocto instruction provided by Variscite to build our rootfs, U-Boot, and kernel. However, I am not doing anything special to build an rt-kernel, and that is what I am trying to find out how to do.
For example, after downloading and installing prerequisite executables, I initialize our repo (example is for Yocto Warrior, but similar for Yocto Zeus):
$ repo init -u https://github.com/varigit/variscite-bsp-platform.git -b fsl-warrior -m imx-4.19.35-1.1.0-var01.xml $ repo sync -j4
Then I configure our machine, distro, and build directory:
$ cd ~/var-fsl-yocto $ MACHINE=imx8mm-var-dart DISTRO=fsl-imx-xwayland . var-setup-release.sh -b build_xwayland
Then I am in the build_xwayland directory, and create our SD card image using:
$ bitbake fsl-image-qt5
The SD card image ends up in the build_xwayland/tmp/deploy/images directory, and I use the following to flash the SD card:
# For fsl-image-qt5 image (Qt5-XWAYLAND & Qt5-WAYLAND) $ zcat tmp/deploy/images/imx8mm-var-dart/fsl-image-qt5-imx8mm-var-dart.sdcard.gz | sudo dd of=/dev/sdX bs=1M conv=fsync
What steps are you suggesting to configure rt-linux? I would appreciate it if you could be specific, since some of the steps involved are new to me.
I have already added a .bbappend file to modify the device tree for our application, and have run bitbake -c menuconfig virtual/kernel to update the kernel configuration.
Thanks for your assistance and tolerance for my inexperienced questions.
Scott D. Whitney
sdw@inea.com | T: 781-801-1152 | F: 781-801-1108 | www.inea.com
-----Original Message----- From: Zoran Stojsavljevic <zoran.stojsavljevic@gmail.com> Sent: Tuesday, July 28, 2020 10:05 AM To: Scott Whitney <sdw@inea.com> Cc: Bruce Ashfield <bruce.ashfield@gmail.com>; yocto@yoctoproject.org Subject: Re: [yocto] How to enable preempt-rt in Yocto Zeus or Warrior?
Hello Scott,
I have a bit of a different idea about the whole YOCTO process.
Let me suggest something else, actually a hybrid combination of the YOCTO build system.
You can do the whole process of YOCTO, but why do you not use components out of the YOCTO building process?
For example, you can use rootfs built by YOCTO, and U-Boot and rt-kernel built out of the YOCTO, for the beginning?
Then, as an option, if you are satisfied with the reached architecture, you can write your own recipe for the rt-kernel (you need to incorporate a bunch of patches into the rt-kernel proprietary recipe).
Zoran _______
On Tue, Jul 28, 2020 at 2:45 PM Scott Whitney <sdw@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?
Thanks for your help
Scott D. Whitney
sdw@inea.com | T: 781-801-1152 | F: 781-801-1108 | www.inea.com
From: Bruce Ashfield <bruce.ashfield@gmail.com> Sent: Monday, July 27, 2020 10:04 PM To: Scott Whitney <sdw@inea.com> Cc: yocto@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 <sdw@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
Intertech Engineering Associates, Inc. 100 Lowder Brook Drive, Suite 2500 Westwood, MA 02090 sdw@inea.com | T: 781-801-1152 | F: 781-801-1108 | 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
|
|

Khem Raj
On 7/27/20 12:51 PM, Scott Whitney 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.
These are custom options perhaps you have from your SDK provider, since variscite SOMs are based on IMX perhaps you also need to see if they are using linux-imx kernel and ensure that they have preempt-rt patches integrated into which ever kernel you are using. Thereafter you could use right kconfig options to enable it. So first find out who is providing your kernel and does it have above Best regards, *Scott D. Whitney* Principal Software Engineer Intertech Engineering Associates, Inc. 100 Lowder Brook Drive, Suite 2500 Westwood, MA 02090 _sdw@inea.com <mailto:sdw@inea.com>_ | T: 781-801-1152 | F: 781-801-1108 | _www.inea.com <http://www.inea.com/>___
|
|