[oe] [STABLE][PATCH] kernel, module-base class, bitbake.conf: introduce MACHINE_KERNEL_PR
Koen Kooi
koen.kooi at gmail.com
Wed May 20 18:51:23 UTC 2009
From: Koen Kooi <koen at openembedded.org>
Signed-off-by: Koen Kooi <koen at openembedded.org>
---
classes/kernel.bbclass | 4 ++++
classes/module-base.bbclass | 4 ++++
conf/bitbake.conf | 4 ++++
3 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass
index 17e8941..954c407 100644
--- a/classes/kernel.bbclass
+++ b/classes/kernel.bbclass
@@ -64,6 +64,10 @@ export CMDLINE_CONSOLE = "console=${@bb.data.getVar("KERNEL_CONSOLE",d,1) or "tt
KERNEL_VERSION = "${@get_kernelversion('${S}')}"
KERNEL_MAJOR_VERSION = "${@get_kernelmajorversion('${KERNEL_VERSION}')}"
+# A machine.conf or local.conf can increase MACHINE_KERNEL_PR to force
+# rebuilds for kernel and external modules
+PR = "${MACHINE_KERNEL_PR}"
+
KERNEL_LOCALVERSION ?= ""
# kernels are generally machine specific
diff --git a/classes/module-base.bbclass b/classes/module-base.bbclass
index c98bace..bc53e1b 100644
--- a/classes/module-base.bbclass
+++ b/classes/module-base.bbclass
@@ -5,6 +5,10 @@ inherit kernel-arch
export OS = "${TARGET_OS}"
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}"
+
export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}"
export KERNEL_SOURCE = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-source')}"
KERNEL_OBJECT_SUFFIX = "${@[".o", ".ko"][base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion') > "2.6.0"]}"
diff --git a/conf/bitbake.conf b/conf/bitbake.conf
index 1738f19..c411b95 100644
--- a/conf/bitbake.conf
+++ b/conf/bitbake.conf
@@ -157,6 +157,10 @@ EXTENDPEVER = "${@['','${PE\x7d:'][bb.data.getVar('PE',d,1) > 0]}"
EXTENDPV = "${EXTENDPEVER}${PV}-${PR}${DISTRO_PR}"
P = "${PN}-${PV}"
+# Define a PR for kernels that machines can override so things like
+# modules get rebuilt
+MACHINE_KERNEL_PR ?= "r0"
+
# Base package name
# Automatically derives "foo" from "foo-native", "foo-cross" or "foo-initial"
# otherwise it is the same as PN and P
--
1.6.1
More information about the Openembedded-devel
mailing list