Patchwork [meta-oe,1/5] kernel.bbclass: use better number for KERNEL_PRIORITY

login
register
mail settings
Submitter Martin Jansa
Date March 23, 2012, 1:04 p.m.
Message ID <3fca50b933c63bab6cff938db607bcecde86fd3d.1332507730.git.Martin.Jansa@gmail.com>
Download mbox | patch
Permalink /patch/24277/
State Accepted
Commit 5d07b1429e302463c951eeee962c2a3941789126
Headers show

Comments

Martin Jansa - March 23, 2012, 1:04 p.m.
* 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

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta-oe/classes/kernel.bbclass |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Patch

diff --git a/meta-oe/classes/kernel.bbclass b/meta-oe/classes/kernel.bbclass
index 41a741f..02d0ca5 100644
--- a/meta-oe/classes/kernel.bbclass
+++ b/meta-oe/classes/kernel.bbclass
@@ -36,7 +36,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}"