Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: Koen Kooi <k.kooi@student.utwente.nl>
To: openembedded-devel@openembedded.org
Subject: Re: [RFC] Rebuild external kernel modules on kernel change
Date: Sun, 05 Apr 2009 19:07:33 +0200	[thread overview]
Message-ID: <graogl$p89$1@ger.gmane.org> (raw)
In-Reply-To: <gran43$m4d$1@ger.gmane.org>

On 05-04-09 18:43, Koen Kooi wrote:
> On 04-04-09 19:46, Otavio Salvador wrote:
>> On Sat, Apr 4, 2009 at 10:31 AM, Koen Kooi<k.kooi@student.utwente.nl>
>> wrote:
>>> Hi,
>> [...]
>>> I don't really like this method, but I'm having a hard time coming up
>>> with a
>>> decent solution that:
>> [...]
>>
>> I agree that is not beauty but it works.
>>
>> I also belive it could be used in other recipes too as
>> initramfs-images. This
>> way forcing the rebuild of it if the kernel is changed and machine
>> revision
>> is bumped.
>>
>> Fully support it.
>>
>> +1
>
> Thanks, I'll try cooking up a patch for beagleboard tomorrow to show a
> real life example.

Here it is, this will be done in 2 commits:

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 ?= ""


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}"
+

diff --git a/conf/bitbake.conf b/conf/bitbake.conf
index a0d652a..136f01c 100644
--- a/conf/bitbake.conf
+++ b/conf/bitbake.conf
@@ -162,6 +162,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"
+

diff --git a/conf/machine/beagleboard.conf b/conf/machine/beagleboard.conf
index 78c6301..3d55ebc 100644
--- a/conf/machine/beagleboard.conf
+++ b/conf/machine/beagleboard.conf
@@ -25,6 +25,7 @@ EXTRA_IMAGECMD_jffs2 = "-lnp "
  SERIAL_CONSOLE = "115200 ttyS2"

  PREFERRED_PROVIDER_virtual/kernel = "linux-omap"
+MACHINE_KERNEL_PR = "r20"

  KERNEL_IMAGETYPE = "uImage"

diff --git a/recipes/dsplink/gstreamer-ti_svn.bb 
b/recipes/dsplink/gstreamer-ti_svn.bb
index ab705f3..6944ad5 100644
--- a/recipes/dsplink/gstreamer-ti_svn.bb
+++ b/recipes/dsplink/gstreamer-ti_svn.bb
@@ -4,7 +4,7 @@ SRC_URI = 
"svn://gforge.ti.com/svn/gstreamer_ti/trunk;module=gstreamer_ti;proto=
            "
  SRCREV = "160"

-PR = "r7"
+PR = "${MACHINE_KERNEL_PR}"

diff --git a/recipes/dsplink/ti-codec-engine_2.21.bb 
b/recipes/dsplink/ti-codec-engine_2.21.bb
index 5b1d5e0..f0b0d7e 100644
--- a/recipes/dsplink/ti-codec-engine_2.21.bb
+++ b/recipes/dsplink/ti-codec-engine_2.21.bb
@@ -8,7 +8,6 @@ RDEPENDS = "update-modules"
  inherit module

  # tconf from xdctools dislikes '.' in pwd :/
-PR = "r19"
  PV = "221"


diff --git a/recipes/dsplink/ti-codec-engine_2.23.bb 
b/recipes/dsplink/ti-codec-engine_2.23.bb
index a42c33b..bbf54d4 100644
--- a/recipes/dsplink/ti-codec-engine_2.23.bb
+++ b/recipes/dsplink/ti-codec-engine_2.23.bb
@@ -9,7 +9,6 @@ inherit module
  DEFAULT_PREFERENCE = "-1"

  # tconf from xdctools dislikes '.' in pwd :/
-PR = "r0"
  PV = "223"


diff --git a/recipes/dsplink/ti-dmai_svn.bb b/recipes/dsplink/ti-dmai_svn.bb
index bcbaea8..76fa74a 100644
--- a/recipes/dsplink/ti-dmai_svn.bb
+++ b/recipes/dsplink/ti-dmai_svn.bb
@@ -15,7 +15,7 @@ SRCREV = "36"
  S = 
"${WORKDIR}/BRIJESH_GIT_022309/davinci_multimedia_application_interface/dmai"
  # Yes, the xdc stuff still breaks with a '.' in PWD
  PV = "120+svnr${SRCREV}"
-PR = "r16"
+PR = "${MACHINE_KERNEL_PR}"


diff --git a/recipes/linux/linux-omap_2.6.28.bb 
b/recipes/linux/linux-omap_2.6.28.bb
index bc085c7..92de11e 100644
--- a/recipes/linux/linux-omap_2.6.28.bb
+++ b/recipes/linux/linux-omap_2.6.28.bb
@@ -12,7 +12,6 @@ DEFAULT_PREFERENCE_omap5912osk = "1"
  SRCREV = "79d042a081d3e467c735bb0d9569ed6296f85a3c"

  PV = "2.6.28"
-PR = "r19"


diff --git a/recipes/linux/linux-omap_2.6.29.bb 
b/recipes/linux/linux-omap_2.6.29.bb
index a2391ee..43be953 100644
--- a/recipes/linux/linux-omap_2.6.29.bb
+++ b/recipes/linux/linux-omap_2.6.29.bb
@@ -10,7 +10,7 @@ DEFAULT_PREFERENCE_overo = "1"

  SRCREV = "58cf2f1425abfd3a449f9fe985e48be2d2555022"

-PR = "r7+gitr${SRCREV}"
+PR_append = "+gitr${SRCREV}"


diff --git a/recipes/powervr-drivers/omap3-sgx-modules_1.3.13.1397.bb 
b/recipes/powervr-drivers/omap3-sgx-modules_1.3.13.1397.bb
index 985a0c0..fc9f02f 100644
--- a/recipes/powervr-drivers/omap3-sgx-modules_1.3.13.1397.bb
+++ b/recipes/powervr-drivers/omap3-sgx-modules_1.3.13.1397.bb
@@ -1,8 +1,6 @@
  DESCRIPTION = "Kernel drivers for the PowerVR SGX chipset found in the 
omap3 SoCs"
  LICENSE = "GPLv2"

-PR = "r6"
-
  inherit module




  reply	other threads:[~2009-04-05 17:10 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-04 13:31 [RFC] Rebuild external kernel modules on kernel change Koen Kooi
2009-04-04 15:51 ` Frans Meulenbroeks
2009-04-04 16:44   ` Koen Kooi
2009-04-04 20:18     ` Frans Meulenbroeks
2009-04-04 21:14       ` Koen Kooi
2009-04-04 17:46 ` Otavio Salvador
2009-04-05 16:43   ` Koen Kooi
2009-04-05 17:07     ` Koen Kooi [this message]
2009-04-04 20:46 ` Jeremy Lainé
2009-04-05 22:43 ` Richard Purdie
2009-04-06  7:16   ` Koen Kooi
2009-06-01 16:58 ` Tom Rini
2009-06-01 17:25   ` Koen Kooi
2009-06-01 18:17     ` Phil Blundell
2009-06-01 18:45       ` Koen Kooi
2009-06-01 19:10         ` Phil Blundell
2009-06-01 20:17     ` Phil Blundell
2009-06-01 20:52       ` Koen Kooi
2009-06-01 21:32         ` Tom Rini
2009-06-01 21:32         ` Phil Blundell
2009-06-01 20:55     ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='graogl$p89$1@ger.gmane.org' \
    --to=k.kooi@student.utwente.nl \
    --cc=openembedded-devel@lists.openembedded.org \
    --cc=openembedded-devel@openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox