[poky] [PATCH 1/5] meta-rt: Initial PREEMPT_RT layer and kernel recipes
Bruce Ashfield
bruce.ashfield at gmail.com
Wed Jan 19 09:24:09 PST 2011
On Tue, Jan 18, 2011 at 6:25 PM, Darren Hart <dvhart at linux.intel.com> wrote:
> The meta-rt layer provides a preempt_rt kernel recipe
> using the linux-yocto-stable git tree. It overrides
> the virtual/kernel provider and defines the compatible
> machines and per-machine SRCREVs. The initial layer
> supports only qemux86-64.
>
> Signed-off-by: Darren Hart <dvhart at linux.intel.com>
> Cc: Tom Zanussi <tom.zanussi at intel.com>
> Cc: Bruce Ashfield <bruce.ashfield at windriver.com>
> ---
> 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
>
> diff --git a/meta-rt/conf/layer.conf b/meta-rt/conf/layer.conf
> new file mode 100644
> index 0000000..dbf4a32
> --- /dev/null
> +++ b/meta-rt/conf/layer.conf
> @@ -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"
This reminds me of the discussion we were having about the emenlow
BSPs, and that we never resolved.
I suggested that we need some interim overrides options for these
variables so I can update a master set of SRCREVs and have the
BSPs updated, and a flag/variable that would allow a BSP to also
opt-out of getting a more global SRCREV assigned.
If we don't do solve this, none of these BSPs will pickup CVEs/bug
fixes or global config changes .. and we'll have a problem.
Comments ?
> +
> diff --git a/meta-rt/recipes-kernel/linux-yocto-rt_stablegit.bb b/meta-rt/recipes-kernel/linux-yocto-rt_stablegit.bb
> new file mode 100644
> index 0000000..361b680
> --- /dev/null
> +++ b/meta-rt/recipes-kernel/linux-yocto-rt_stablegit.bb
> @@ -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
> +
And as we discussed, I'll help clean this up when I get the recipe
refactoring done. I'm just trying to decide if I can get away with
including a .bb file instead of creation more .inc files :)
Cheers,
Bruce
> +require recipes-kernel/linux/linux-tools.inc
> --
> 1.7.1
>
> _______________________________________________
> poky mailing list
> poky at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky
>
--
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
More information about the poky
mailing list