From: Ovidiu Vancea <ovidiu.van...@ni.com> Updating the kernel ("opkg install kernel") does not update the dependencies (i.e. modules) because there is no possibility to do version enforcement in the OE recipe. Upon rebooting, the older version modules do not load and can leave hardware in a non-functioning state (if their drivers are not built into the kernel).
Use the Version field from the kernel package on its rdepends, rrecommends, and rsuggests fields’ version. This makes the packages on which the kernel depends to be the same version as the kernel. Version field contains package build number (including git hash) and package revision, thus restricting the kernel and modules to always be built together. Signed-off-by: Ovidiu Vancea <ovidiu.van...@ni.com> --- meta/classes/package_ipk.bbclass | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass index 08f7020..0a07f61 100644 --- a/meta/classes/package_ipk.bbclass +++ b/meta/classes/package_ipk.bbclass @@ -196,6 +196,15 @@ python do_package_ipk () { rconflicts = bb.utils.explode_dep_versions2(localdata.getVar("RCONFLICTS", True) or "") debian_cmp_remap(rconflicts) + if (pkgname == "kernel") and (localdata.getVar("VERSION_KERNEL_MODULES", False) == "1"): + suffix = "="+localdata.getVar('PKGV', True)+"-"+localdata.getVar('PKGR', True) + for key in rdepends: + rdepends[key] = suffix + for key in rsuggests: + rsuggests[key] = suffix + for key in rrecommends: + rrecommends[key] = suffix + if rdepends: ctrlfile.write("Depends: %s\n" % bb.utils.join_deps(rdepends)) if rsuggests: -- 2.7.4 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core