[PATCH/RFC] kernel module dependencies / my recent commits

Submitted by Andreas Oberritter on Jan. 29, 2011, 3:25 a.m.


Message ID 4D4388AA.40208@opendreambox.org
State Accepted
Headers show

Commit Message

Andreas Oberritter Jan. 29, 2011, 3:25 a.m.
Hi all,

it seems that my last commits broke the build of external kernel modules
at least on clean builds, but maybe also for incremental builds.

To quote from my commit message:

* As a special case, kernel modules must depend on
kernel-${KERNEL_VERSION}, which gets runtime provided by the kernel
package. The reason is, that the package version can be different from
${KERNEL_VERSION}, because the latter depends on the kernel
configuration, e.g. CONFIG_LOCALVERSION.

This is also what kernel.bbclass does when calling do_split_packages().

Now it seems like there's a problem with using the variable
KERNEL_VERSION as part of a recipe's RDEPENDS, when used in a package's
name, because it can be empty before the kernel is built (and apparently
it may also become empty when loaded from BitBake's cache).

I've included a patch to kernel.bbclass to workaround or solve this
problem below, but I'm not sure whether it's the right thing.

If it's not and if there's no better solution, then please revert my
commits using

git revert 254193c8f65511a8f344559f7714b50d35afb22b...

I am sorry for the inconvenience I've caused.


kernel.bbclass: Add kernel-* to PACKAGES_DYNAMIC

* Use it as a hint for BitBake to know that packages inheriting
kernel.bbclass do provide kernel-x.y.z-localversion.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>

Patch hide | download patch | download mbox

diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass
index ea1daf6..0d1b4ad 100644
--- a/classes/kernel.bbclass
+++ b/classes/kernel.bbclass
@@ -32,6 +32,7 @@  INITRAMFS_TASK ?= ""

 inherit kernel-arch

+PACKAGES_DYNAMIC += "kernel-*"
 PACKAGES_DYNAMIC += "kernel-module-*"
 PACKAGES_DYNAMIC += "kernel-image-*"
 PACKAGES_DYNAMIC += "kernel-firmware-*"