meta-rt: create a real-time layer
cover meta-rt: create a real-time layer
Add a real-time layer to build the linux-yocto preempt_rt kernel type for specific machines. It also adds the rt-tests test suite. This series adds qemux86-64 support (build and boot tested) as well as atom-pc, which builds and creates the ext3 image, but the live image is missing the rootfs for some reason.
Rather than continue to sit on these, I thought I'd get them out there while I continue to try and sort out the atom-pc issue.
There has been much discussion surrounding where real-time support should be in the repositories. Most recently we discussed including it as part of the main poky repository. I think this makes the most sense as the rt kernels are built from the same kernel repositories as the other linux-yocto kernels.
Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: dvhart/meta-rt
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dvhart/meta-rt
Thanks,
Darren Hart <[email protected]>
---
Darren Hart (5):
meta-rt: Initial PREEMPT_RT layer and kernel recipes meta-rt/rt-tests: add the PREEMPT_RT rt-tests testsuite and
recipes-tests directory
meta-rt/poky-image-*rt: Add initial PREEMPT_RT image recipes machine/qemu: Allow for users to override the preferred kernel
version
meta-rt: atom-pc support
meta-rt/conf/layer.conf | 23 +++++++++++ meta-rt/images/poky-image-minimal-rt-directdisk.bb | 15 +++++++ meta-rt/images/poky-image-minimal-rt-live.bb | 15 +++++++ meta-rt/images/poky-image-minimal-rt.bb | 12 ++++++ meta-rt/recipes-kernel/linux-yocto-rt_stablegit.bb | 40 ++++++++++++++++++++ meta-rt/recipes-tests/rt-tests_git.bb | 22 +++++++++++ meta/conf/machine/include/qemu.inc | 2 +- 7 files changed, 128 insertions(+), 1 deletions(-) create mode 100644 meta-rt/conf/layer.conf create mode 100644 meta-rt/images/poky-image-minimal-rt-directdisk.bb create mode 100644 meta-rt/images/poky-image-minimal-rt-live.bb create mode 100644 meta-rt/images/poky-image-minimal-rt.bb create mode 100644 meta-rt/recipes-kernel/linux-yocto-rt_stablegit.bb create mode 100644 meta-rt/recipes-tests/rt-tests_git.bb
PATCH 1/5 meta-rt: Initial PREEMPT_RT layer and kernel recipes
Add a real-time layer to build the linux-yocto preempt_rt kernel type for qemux86-64. Additional machines to follow.
--- meta-rt/conf/layer.conf | 22 +++++++++++ meta-rt/recipes-kernel/linux-yocto-rt_stablegit.bb | 39 ++++++++++++++++++++ 2 files changed, 61 insertions(+), 0 deletions(-) create mode 100644 meta-rt/conf/layer.conf create mode 100644 meta-rt/recipes-kernel/linux-yocto-rt_stablegit.bb
meta-rt/conf/layer.conf new file +22 -0
@@ -0,0 +1,22 @@ +# Default to first disk/first partition +RSP_ROOT ?= "sda1" + +# We have a conf and classes directory, add to BBPATH +BBPATH := "${BBPATH}:${LAYERDIR}" + +# We have an images and various recipe-* directories, add to BBFILES +BBFILES := "${BBFILES} ${LAYERDIR}/images/*.bb ${LAYERDIR}/images/*.bbappend ${LAYERDIR}/recipes-*/*.bb ${LAYERDIR}/recipes-*/*.bbappend" + +BBFILE_COLLECTIONS += "rt" +BBFILE_PATTERN_rt := "^${LAYERDIR}/" +BBFILE_PRIORITY_rt = "8" + +# This layer builds images using a PREEMPT_RT kernel. Override any machine +# specified kernel providers and leave it up to the kernel recipe to +# determine COMPATIBLE_MACHINE. +PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-rt" + +# preempt_rt SRCREVs, one for meta, one per machine +SRCREV_meta_pn-linux-yocto-rt ?= "50ccd2b3213b6a1bacb3f898c035119802dac420" +SRCREV_machine_pn-linux-yocto-rt_qemux86-64 ?= "f49444f06875894389e640bcda6c3f6ceb1f0c3e" +
meta-rt/recipes-kernel/linux-yocto-rt_stablegit.bb new file +39 -0
@@ -0,0 +1,39 @@ +inherit kernel +require recipes-kernel/linux/linux-yocto.inc + +KMACHINE_qemux86-64 = "common_pc_64" + +LINUX_VERSION ?= "2.6.34" +LINUX_KERNEL_TYPE = "preempt_rt" +LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE_EXTENSION}" + +PR = "r0" +PV = "${LINUX_VERSION}+git${SRCPV}" +SRCREV_FORMAT = "meta_machine" + +COMPATIBLE_MACHINE = "(qemux86-64)" + +# this performs a fixup on the SRCREV for new/undefined BSPs +python __anonymous () { + import bb, re, string + + rev = bb.data.getVar("SRCREV_machine", d, 1) + if rev == "standard": + bb.data.setVar("SRCREV_machine", "${SRCREV_meta}", d) + + kerntype = string.replace(bb.data.expand("${LINUX_KERNEL_TYPE}", d), "_", "-") + bb.data.setVar("LINUX_KERNEL_TYPE_EXTENSION", kerntype, d) +} + +SRC_URI = "git://git.pokylinux.org/linux-2.6-windriver.git;protocol=git;fullclone=1;branch=${KBRANCH};name=machine \ + git://git.pokylinux.org/linux-2.6-windriver.git;protocol=git;noclone=1;branch=wrs_meta;name=meta" + +# Functionality flags +KERNEL_REVISION_CHECKING ?= "t" +KERNEL_FEATURES=features/netfilter + +# extra tasks +addtask kernel_link_vmlinux after do_compile before do_install +addtask validate_branches before do_patch after do_kernel_checkout + +require recipes-kernel/linux/linux-tools.inc
Signature · 1 line
1.7.1
PATCH 2/5 meta-rt/rt-tests: add the PREEMPT_RT rt-tests testsuite and recipes-tests directory
In reply to Darren HartThe rt-tests test-suite is a collection of tests meant to measure the latency and determinism of the Linux PREEMPT_RT kernel.
--- meta-rt/recipes-tests/rt-tests_git.bb | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) create mode 100644 meta-rt/recipes-tests/rt-tests_git.bb
meta-rt/recipes-tests/rt-tests_git.bb new file +22 -0
@@ -0,0 +1,22 @@ +DESCRIPTION = "Real-Time preemption testcases" +HOMEPAGE = "https://rt.wiki.kernel.org/index.php/Cyclictest" +SECTION = "tests" +DEPENDS = "linux-libc-headers eglibc" +LICENSE = "GPLv2 & GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ + file://src/cyclictest/cyclictest.c;beginline=7;endline=9;md5=ce162fe491d19d2ec67dff6dbc938d50 \ + file://src/pi_tests/pi_stress.c;beginline=6;endline=19;md5=bd426a634a43ec612e9fbf125dfcc949" +SRCREV = ${AUTOREV} +PV = "git${SRCPV}" +PR = "r0" + +SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rt-tests.git;protocol=git" + +S = "${WORKDIR}/git" + +CFLAGS += "-I${S}/src/include -D_GNU_SOURCE -Wall -Wno-nonnull" + +do_install() { + oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} \ + INCLUDEDIR=${includedir} +}
Signature · 1 line
1.7.1
PATCH 3/5 meta-rt/poky-image-*rt: Add initial PREEMPT_RT image recipes
In reply to Darren HartAdd poky-image-minimal-rt* image recipes. They are based on the minimal recipe and add rt-tests for basic evaluation of a board with a PREEMPT_RT kernel.
--- meta-rt/images/poky-image-minimal-rt-directdisk.bb | 15 +++++++++++++++ meta-rt/images/poky-image-minimal-rt-live.bb | 15 +++++++++++++++ meta-rt/images/poky-image-minimal-rt.bb | 12 ++++++++++++ 3 files changed, 42 insertions(+), 0 deletions(-) create mode 100644 meta-rt/images/poky-image-minimal-rt-directdisk.bb create mode 100644 meta-rt/images/poky-image-minimal-rt-live.bb create mode 100644 meta-rt/images/poky-image-minimal-rt.bb
meta-rt/images/poky-image-minimal-rt-directdisk.bb new file +15 -0
@@ -0,0 +1,15 @@ +# +# Copyright (C) 2010 Intel Corporation. +# + +require recipes-core/images/poky-image-directdisk.inc + +DESCRIPTION = "Bootable Minimal Real-Time Direct Disk Image" + +ROOTFS = "${DEPLOY_DIR_IMAGE}/poky-image-minimal-rt-${MACHINE}.ext3" + +LICENSE = "MIT" + +do_bootdirectdisk[depends] += "poky-image-minimal-rt:do_rootfs" + +
meta-rt/images/poky-image-minimal-rt-live.bb new file +15 -0
@@ -0,0 +1,15 @@ +# +# Copyright (C) 2010 Intel Corporation. +# + +DESCRIPTION = "Bootable Live Minimal Real-Time Linux Image" + +require recipes-core/images/poky-image-live.inc + +LABELS += "boot install" + +ROOTFS = "${DEPLOY_DIR_IMAGE}/poky-image-rt-${MACHINE}.ext3" + +LICENSE = "MIT" + +do_bootimg[depends] += "poky-image-minimal-rt:do_rootfs"
meta-rt/images/poky-image-minimal-rt.bb new file +12 -0
@@ -0,0 +1,12 @@ +# +# Copyright (C) 2010 Intel Corporation. +# + +DESCRIPTION = "Minimal Real-Time Linux Image" +DEPENDS = "linux-yocto-rt" + +require recipes-core/images/poky-image-minimal.bb + +IMAGE_INSTALL += "rt-tests" + +LICENSE = "MIT"
Signature · 1 line
1.7.1
PATCH 4/5 machine/qemu: Allow for users to override the preferred kernel version
In reply to Darren HartThe linux-yocto-rt kernel has been boot tested on qemux86-64. Unlock the preferred provider for virtual/kernel so it can be selected and used.
--- meta/conf/machine/include/qemu.inc | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
meta/conf/machine/include/qemu.inc +1 -1
@@ -15,7 +15,7 @@ IMAGE_ROOTFS_SIZE_ext3 ?= "280000" RDEPENDS_kernel-base = "" # Use a common kernel recipe for all QEMU machines -PREFERRED_PROVIDER_virtual/kernel = "linux-yocto" +PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto" EXTRA_IMAGEDEPENDS += "qemu-native qemu-helper-native"
Signature · 1 line
1.7.1
PATCH 5/5 meta-rt: atom-pc support
In reply to Darren HartAdd support for the atom-pc machine to the meta-rt layer. This patch depends on the corresponding support for the linux-2.6-windriver git repository, sent previously to this list.
[PATCH 0/1] linux-2.6-windriver: add atom-pc preempt_rt support
--- meta-rt/conf/layer.conf | 1 + meta-rt/recipes-kernel/linux-yocto-rt_stablegit.bb | 3 ++- 2 files changed, 3 insertions(+), 1 deletions(-)
meta-rt/conf/layer.conf +1 -0
@@ -19,4 +19,5 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-rt" # preempt_rt SRCREVs, one for meta, one per machine SRCREV_meta_pn-linux-yocto-rt ?= "50ccd2b3213b6a1bacb3f898c035119802dac420" SRCREV_machine_pn-linux-yocto-rt_qemux86-64 ?= "f49444f06875894389e640bcda6c3f6ceb1f0c3e" +SRCREV_machine_pn-linux-yocto-rt_atom-pc ?= "6b8ac43a084fc5903335edf74c951b3f532f4e78"
meta-rt/recipes-kernel/linux-yocto-rt_stablegit.bb +2 -1
@@ -2,6 +2,7 @@ inherit kernel require recipes-kernel/linux/linux-yocto.inc KMACHINE_qemux86-64 = "common_pc_64" +KMACHINE_atom-pc = "atom-pc" LINUX_VERSION ?= "2.6.34" LINUX_KERNEL_TYPE = "preempt_rt"
@@ -11,7 +12,7 @@ PR = "r0" PV = "${LINUX_VERSION}+git${SRCPV}" SRCREV_FORMAT = "meta_machine" -COMPATIBLE_MACHINE = "(qemux86-64)" +COMPATIBLE_MACHINE = "(qemux86-64|atom-pc)" # this performs a fixup on the SRCREV for new/undefined BSPs python __anonymous () {
Signature · 1 line
1.7.1
Quoted 8 lines · Darren Hart
Add a real-time layer to build the linux-yocto
preempt_rtkernel type for specific machines. It also adds the rt-tests test suite. This series adds qemux86-64 support (build and boot tested) as well as atom-pc, which builds and creates the ext3 image, but the live image is missing the rootfs for some reason.Rather than continue to sit on these, I thought I'd get them out there while I continue to try and sort out the atom-pc issue.
Good plan. For my part, I've been factoring out more common parts of the yocto kernel recipes, but we shouldn't be holding on those at all. Once approved and in tree, I can actually test the factoring on these before sending it for review, since there's nothing wrong with having the duplication briefly.
That being said, I'm only ack'ing the series for now (and particularly the kernel parts), since I won't be back to the office full time until Tuesday next week to take a better look at these.
Cheers,
Bruce
Quoted 44 lines
There has been much discussion surrounding where real-time support should be in the repositories. Most recently we discussed including it as part of the main poky repository. I think this makes the most sense as the rt kernels are built from the same kernel repositories as the other linux-yocto kernels.
Pull URL:
git://git.pokylinux.org/poky-contrib.git
Branch: dvhart/meta-rt
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dvhart/meta-rtThanks,
Darren Hart <[email protected]>
---Darren Hart (5):
meta-rt: InitialPREEMPT_RTlayer and kernel recipes meta-rt/rt-tests: add thePREEMPT_RTrt-tests testsuite and recipes-tests directory
meta-rt/poky-image-*rt: Add initialPREEMPT_RTimage recipes machine/qemu: Allow for users to override the preferred kernel version
meta-rt: atom-pc supportmeta-rt/conf/layer.conf | 23 +++++++++++ meta-rt/images/poky-image-minimal-rt-directdisk.bb | 15 +++++++ meta-rt/images/poky-image-minimal-rt-live.bb | 15 +++++++ meta-rt/images/poky-image-minimal-rt.bb | 12 ++++++ meta-rt/recipes-kernel/linux-yocto-rt_stablegit.bb | 40 ++++++++++++++++++++ meta-rt/recipes-tests/rt-tests_git.bb | 22 +++++++++++ meta/conf/machine/include/qemu.inc | 2 +-
7 files changed, 128 insertions(+), 1 deletions(-)create mode 100644
meta-rt/conf/layer.conf
create mode 100644 meta-rt/images/poky-image-minimal-rt-directdisk.bb create mode 100644 meta-rt/images/poky-image-minimal-rt-live.bb create mode 100644 meta-rt/images/poky-image-minimal-rt.bb create mode 100644 meta-rt/recipes-kernel/linux-yocto-rt_stablegit.bb create mode 100644 meta-rt/recipes-tests/rt-tests_git.bb_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky
Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"