fix for MACHINE_KERNEL_PR stuff
PATCH 1/1 fix for MACHINE_KERNEL_PR stuff
This patch unbreaks current behaviour which was introduced by MACHINE_KERNEL_PR variable.
As most of target machines do not use it they have PR with broken value (set to "r0" instead of value in recipe). I took other way which makes both types of users happy -- those with MACHINE_KERNEL_PR in use and those without it.
By default we set M_K_PR to empty string instead of "r0" - this allows to check is it set at all or not. If it is set then we set PR to this value. Otherwise we ignore existance of that variable and use PR from recipe.
--- classes/kernel.bbclass | 10 ++++++---- conf/bitbake.conf | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-)
classes/kernel.bbclass +6 -4
@@ -20,6 +20,12 @@ python __anonymous () { image = bb.data.getVar('INITRAMFS_IMAGE', d, True) if image != '' and image is not None: bb.data.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs', d) + + pr = bb.data.getVar('PR', d, True) + machine_kernel_pr = bb.data.getVar('MACHINE_KERNEL_PR', d, True) + + if machine_kernel_pr: + bb.data.setVar('PR', machine_kernel_pr, d) } INITRAMFS_IMAGE ?= ""
@@ -64,10 +70,6 @@ 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
conf/bitbake.conf +1 -1
@@ -164,7 +164,7 @@ P = "${PN}-${PV}" # Define a PR for kernels that machines can override so things like # modules get rebuilt -MACHINE_KERNEL_PR ?= "r0" +MACHINE_KERNEL_PR = "" # Base package name # Automatically derives "foo" from "foo-native", "foo-cross" or "foo-initial"
Signature · 1 line
1.6.3.1
PATCH 1/1 fix for MACHINE_KERNEL_PR stuff
This patch unbreaks current behaviour which was introduced by MACHINE_KERNEL_PR variable.
As most of target machines do not use it they have PR with broken value (set to "r0" instead of value in recipe). I took other way which makes both types of users happy -- those with MACHINE_KERNEL_PR in use and those without it.
By default we set M_K_PR to empty string instead of "r0" - this allows to check is it set at all or not. If it is set then we set PR to this value. Otherwise we ignore existance of that variable and use PR from recipe.
--- classes/kernel.bbclass | 9 +++++---- conf/bitbake.conf | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-)
classes/kernel.bbclass +5 -4
@@ -20,6 +20,11 @@ python __anonymous () { image = bb.data.getVar('INITRAMFS_IMAGE', d, True) if image != '' and image is not None: bb.data.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs', d) + + machine_kernel_pr = bb.data.getVar('MACHINE_KERNEL_PR', d, True) + + if machine_kernel_pr: + bb.data.setVar('PR', machine_kernel_pr, d) } INITRAMFS_IMAGE ?= ""
@@ -64,10 +69,6 @@ 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
conf/bitbake.conf +1 -1
@@ -159,7 +159,7 @@ P = "${PN}-${PV}" # Define a PR for kernels that machines can override so things like # modules get rebuilt -MACHINE_KERNEL_PR ?= "r0" +MACHINE_KERNEL_PR = "" # Base package name # Automatically derives "foo" from "foo-native", "foo-cross" or "foo-initial"
Signature · 1 line
1.6.3.1
Quoted 8 lines · Marcin Juszkiewicz
This patch unbreaks current behaviour which was introduced by
MACHINE_KERNEL_PRvariable.As most of target machines do not use it they have PR with broken value (set to "r0" instead of value in recipe). I took other way which makes both types of users happy -- those with
MACHINE_KERNEL_PRin use and those without it.
Quoted 5 lines
By default we set
M_K_PRto empty string instead of "r0" - this allows to check is it set at all or not. If it is set then we set PR to this value. Otherwise we ignore existance of that variable and use PR from recipe.Signed-off-by Marcin Juszkiewicz<[email protected]>
Quoted 45 lines
--- classes/kernel.bbclass | 9 +++++---- conf/bitbake.conf | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-)classes/kernel.bbclass +5
-4@@ -20,6 +20,11 @@ python __anonymous () { image = bb.data.getVar('INITRAMFS_IMAGE', d, True) if image != '' and image is not None: bb.data.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs', d) + + machine_kernel_pr = bb.data.getVar('MACHINE_KERNEL_PR', d, True) + + if machine_kernel_pr: + bb.data.setVar('PR', machine_kernel_pr, d) } INITRAMFS_IMAGE ?= ""@@ -64,10 +69,6 @@ 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 specificconf/bitbake.conf +1
-1@@ -159,7 +159,7 @@ P = "${PN}-${PV}" # Define a PR for kernels that machines can override so things like # modules get rebuilt -MACHINE_KERNEL_PR ?= "r0" +MACHINE_KERNEL_PR = "" # Base package name # Automatically derives "foo" from "foo-native", "foo-cross" or "foo-initial"
Philip Balister
Acked-byQuoted 75 lines · Koen Kooi
Quoted 8 lines · Marcin Juszkiewicz
This patch unbreaks current behaviour which was introduced by
MACHINE_KERNEL_PRvariable.As most of target machines do not use it they have PR with broken value (set to "r0" instead of value in recipe). I took other way which makes both types of users happy -- those with
MACHINE_KERNEL_PRin use and those without it.Quoted 5 lines
By default we set
M_K_PRto empty string instead of "r0" - this allows to check is it set at all or not. If it is set then we set PR to this value. Otherwise we ignore existance of that variable and use PR from recipe.Signed-off-by Marcin Juszkiewicz<[email protected]>Acked-by Koen Kooi <[email protected]>Quoted 48 lines
--- classes/kernel.bbclass | 9 +++++---- conf/bitbake.conf | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-)classes/kernel.bbclass +5
-0@@ -20,6 +20,11 @@ python __anonymous () { image = bb.data.getVar('INITRAMFS_IMAGE', d, True) if image != '' and image is not None: bb.data.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs', d) + + machine_kernel_pr = bb.data.getVar('MACHINE_KERNEL_PR', d, True) + + if machine_kernel_pr: + bb.data.setVar('PR', machine_kernel_pr, d) }
INITRAMFS_IMAGE?= ""classes/kernel.bbclass +0
-0@@ -64,10 +69,6 @@ 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}')}"classes/kernel.bbclass +0
-4-# 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 specificconf/bitbake.conf +1
-1@@ -159,7 +159,7 @@ P = "${PN}-${PV}" # Define a PR for kernels that machines can override so things like # modules get rebuilt -MACHINE_KERNEL_PR ?= "r0" +MACHINE_KERNEL_PR = "" # Base package name # Automatically derives "foo" from "foo-native", "foo-cross" orQuoted 1 line
"foo-initial"
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel