[oe] [RFC][PATCH] module-base.bbclass: keep PR if MACHINE_KERNEL_PR is not set

Eric Bénard eric at eukrea.com
Fri May 14 15:10:51 UTC 2010


Hi Koen,

I was told you are the person to contact about MACHINE_KERNEL_PR so may 
you please have a look to the patch below - also available here : 
http://patchwork.openembedded.org/patch/2012/

Actually, when compiling modules (out of tree), we loose PR if 
MACHINE_KERNEL_PR is not set.

Is this patch fine to solve this problem or is there another prefered way ?

The same problem was already solved in kernel.bbclass by the following 
comit
http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=35e7b34d3b5b96ed11bc7ed6b2a5d08e6183d8a3

Thanks,
Eric

Signed-off-by: Eric Benard<eric at eukrea.com>
---
   classes/module-base.bbclass |    7 ++++++-
   1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/classes/module-base.bbclass b/classes/module-base.bbclass
index bc53e1b..9aaaa4e 100644
--- a/classes/module-base.bbclass
+++ b/classes/module-base.bbclass
@@ -7,7 +7,12 @@ export CROSS_COMPILE = "${TARGET_PREFIX}"

   # A machine.conf or local.conf can increase MACHINE_KERNEL_PR to force
   # rebuilds for kernel and external modules
-PR = "${MACHINE_KERNEL_PR}"
+python __anonymous () {
+    machine_kernel_pr = bb.data.getVar('MACHINE_KERNEL_PR', d, True)
+
+    if machine_kernel_pr:
+       bb.data.setVar('PR', machine_kernel_pr, d)
+}

   export KERNEL_VERSION = 
"${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}"
   export KERNEL_SOURCE = 
"${@base_read_file('${STAGING_KERNEL_DIR}/kernel-source')}"




More information about the Openembedded-devel mailing list