[poky] [PATCH 1/4] linux-yocto-rt: initial PREEMPT_RT recipe for the linux-yocto stable kernel

Bruce Ashfield bruce.ashfield at gmail.com
Sun Dec 19 21:20:59 PST 2010


On Fri, Dec 10, 2010 at 5:53 PM, Darren Hart <dvhart at linux.intel.com> wrote:
> Signed-off-by: Darren Hart <dvhart at linux.intel.com>
> ---
>  .../conf/distro/include/poky-default-revisions.inc |    3 +
>  .../linux/linux-yocto-rt_stablegit.bb              |   47 ++++++++++++++++++++
>  2 files changed, 50 insertions(+), 0 deletions(-)
>  create mode 100644 meta/recipes-kernel/linux/linux-yocto-rt_stablegit.bb
>
> diff --git a/meta/conf/distro/include/poky-default-revisions.inc b/meta/conf/distro/include/poky-default-revisions.inc
> index 0612b7d..efb4a5d 100644
> --- a/meta/conf/distro/include/poky-default-revisions.inc
> +++ b/meta/conf/distro/include/poky-default-revisions.inc
> @@ -95,6 +95,9 @@ SRCREV_machine_pn-linux-yocto-stable_routerstationpro ?= "2ec2edaf256dd8500ee3d4
>  SRCREV_machine_pn-linux-yocto-stable_mpc8315e-rdb ?= "986e6eb66c26007cee7916d5d12f4756e6b5436f"
>  SRCREV_machine_pn-linux-yocto-stable_beagleboard ?= "0431115c9d720fee5bb105f6a7411efb4f851d26"
>  SRCREV_meta_pn-linux-yocto-stable ?= "50ccd2b3213b6a1bacb3f898c035119802dac420"
> +# preempt_rt SRCREVs
> +SRCREV_machine_pn-linux-yocto-rt_qemux86-64 ?= "f49444f06875894389e640bcda6c3f6ceb1f0c3e"
> +SRCREV_meta_pn-linux-yocto-rt ?= "50ccd2b3213b6a1bacb3f898c035119802dac420"
>  # development SRCREVs
>  SRCREV_machine_pn-linux-yocto_qemuarm = "87e00a2d47ba80b4ad1f9170cb3f6cf81f21d739"
>  SRCREV_machine_pn-linux-yocto_qemumips = "7231e473dd981a28e3cea9f677ed60583e731550"
> diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_stablegit.bb b/meta/recipes-kernel/linux/linux-yocto-rt_stablegit.bb
> new file mode 100644
> index 0000000..cb182da
> --- /dev/null
> +++ b/meta/recipes-kernel/linux/linux-yocto-rt_stablegit.bb
> @@ -0,0 +1,47 @@
> +inherit kernel
> +require linux-yocto.inc
> +
> +KMACHINE_qemux86  = "common_pc/base"

For stable, this one would be common_pc, which I see points out a bug in
the -stable recipe. I'll fix that one in the morning.

> +KMACHINE_qemux86-64  = "common_pc_64"
> +KMACHINE_qemuppc  = "qemu_ppc32"
> +KMACHINE_qemumips = "mti_malta32_be"
> +KMACHINE_qemuarm  = "arm_versatile_926ejs"
> +KMACHINE_atom-pc  = "atom-pc"
> +KMACHINE_routerstationpro = "routerstationpro"
> +KMACHINE_mpc8315e-rdb = "fsl-mpc8315e-rdb"
> +KMACHINE_beagleboard = "beagleboard"
> +
> +LINUX_VERSION ?= "2.6.34"
> +LINUX_KERNEL_TYPE = "preempt_rt"
> +LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE_EXTENSION}"

In the initial factoring of the recipes had these in a common location, but
when the -stable and -dev kernels split the branching I had to move
the branch specifications, kernel version and extension into the specific
recipe files and out of the includes (since they were different).

If we end up with a proliferation of recipes, it does make sense to create
a stablegit.inc and devgit.inc (or some other suitable names), since
we clearly don't want to repeat the machie mappings, and extension
everywhere. I'll toss that into an upcoming series.

> +
> +PR = "r0"
> +PV = "${LINUX_VERSION}+git${SRCPV}"
> +SRCREV_FORMAT = "meta_machine"

Same as this, we can make this part of an include

> +
> +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)
> +}

This can probably go away soon, either to somewhere common, or away
completely but for now it is required.

> +
> +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"

This should be inherited as well, more to factor out, good to see more
recipes that highlight what I missed.

> +
> +# 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

Probably the tasks as well. Something to try at least.

But it looks good, not as small as we'd want, but getting there. Having
too small a recipe with everything factored out is also bad, but the arcane
parts should at least be made common.

Bruce

> +
> +require linux-tools.inc
> --
> 1.7.2.3
>
> _______________________________________________
> 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