From 39439da55570acaa5e36a7db577a3c2c0486b5f8 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Fri, 23 Mar 2012 13:56:28 +0100 Subject: kernel.bbclass: use better number for KERNEL_PRIORITY * there is no upgrade from 2.6.X to 3.X.Y last part of PV is used as kernel priority for u-a, but X is usually higher then Y in 3.x.x so use all 3 parts in one bigger number * and make it weak assignment if this scheme doesn't work for some recipe * if there are just 2 numbers in PV then last one is repeated twice (see linux-openmoko_3.2 example) but that should work fine too OE qemux86-64@ ~/oe-core $ grep ^KERNEL_PRIO linux-yocto_* linux-yocto_2.6.37.e:KERNEL_PRIORITY="20637" linux-yocto_3.0.e:KERNEL_PRIORITY="30024" linux-yocto_3.2.e:KERNEL_PRIORITY="30211" OE qemux86-64@ ~/oe-core $ grep ^PV linux-yocto_* linux-yocto_2.6.37.e:PV="2.6.37+git1+aeea99683c7283f1f3320bf2ee7085ee252d4e7e_1+af2bfbe5f757361b5b027a24d67a93bfdfaaf33c" linux-yocto_3.0.e:PV="3.0.24+git2+a4ac64fe873f08ef718e2849b88914725dc99c1c_2+aac580659dc0ce083f250fb05abf82e58d7f4531" linux-yocto_3.2.e:PV="3.2.11+git2+514847185c78c07f52e02750fbe0a03ca3a31d8f_2+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8" OE qemux86-64@ ~/shr-core $ grep ^KERNEL_PRIO linux-openmoko_* linux-openmoko_2.6.39.e:KERNEL_PRIORITY="20639" linux-openmoko_3.2.e:KERNEL_PRIORITY="30202" linux-openmoko_git.e:KERNEL_PRIORITY="30299" OE qemux86-64@ ~/shr-core $ grep ^PV linux-openmoko_* linux-openmoko_2.6.39.e:PV="2.6.39" linux-openmoko_3.2.e:PV="3.2" linux-openmoko_git.e:PV="3.2.99+3.3.0-rc0+gitr1+7089727d63b17615fb0a652374d79cb7df0835ad" (From OE-Core rev: 00999468341efdca1e884594dbfe25a73149e675) Signed-off-by: Martin Jansa Signed-off-by: Richard Purdie --- meta/classes/kernel.bbclass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'meta/classes/kernel.bbclass') diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 54ed7f71f9..5e4cdd458c 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass @@ -31,7 +31,9 @@ PACKAGES_DYNAMIC += "kernel-firmware-*" export OS = "${TARGET_OS}" export CROSS_COMPILE = "${TARGET_PREFIX}" -KERNEL_PRIORITY = "${@d.getVar('PV',1).split('-')[0].split('.')[-1]}" +KERNEL_PRIORITY ?= "${@int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[0]) * 10000 + \ + int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[1]) * 100 + \ + int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[-1])}" KERNEL_RELEASE ?= "${KERNEL_VERSION}" -- cgit v1.2.3-54-g00ecf