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

Andreas Oberritter obi at opendreambox.org
Sat Jan 29 03:25:30 UTC 2011


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...
2dac84b9a7b820466ed626420fec120093b56e16

I am sorry for the inconvenience I've caused.

Regards,
Andreas

---
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 at opendreambox.org>

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-*"





More information about the Openembedded-devel mailing list