<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 17, 2013 at 9:58 AM, Laurentiu Palcu <span dir="ltr"><<a href="mailto:laurentiu.palcu@intel.com" target="_blank">laurentiu.palcu@intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Since update-modules is now obsolete, remove it from the bbclass.<br>
<br></blockquote><div><br></div><div style>This seems to capture all the concerns that I had about removing update-modules.</div><div style><br></div><div style>Acked-by: Bruce Ashfield <<a href="mailto:bruce.ashfield@windriver.com">bruce.ashfield@windriver.com</a>></div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[YOCTO #3598]<br>
<br>
Signed-off-by: Laurentiu Palcu <<a href="mailto:laurentiu.palcu@intel.com">laurentiu.palcu@intel.com</a>><br>
---<br>
meta/classes/kernel.bbclass | 36 +++++++++++++++++-------------------<br>
1 file changed, 17 insertions(+), 19 deletions(-)<br>
<br>
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass<br>
index 46ba55f..4893cf2 100644<br>
--- a/meta/classes/kernel.bbclass<br>
+++ b/meta/classes/kernel.bbclass<br>
@@ -1,7 +1,7 @@<br>
inherit linux-kernel-base module_strip<br>
<br>
PROVIDES += "virtual/kernel"<br>
-DEPENDS += "virtual/${TARGET_PREFIX}gcc kmod-native virtual/${TARGET_PREFIX}gcc${KERNEL_CCSUFFIX} update-modules"<br>
+DEPENDS += "virtual/${TARGET_PREFIX}gcc kmod-native virtual/${TARGET_PREFIX}gcc${KERNEL_CCSUFFIX}"<br>
<br>
# we include gcc above, we dont need virtual/libc<br>
INHIBIT_DEFAULT_DEPS = "1"<br>
@@ -293,12 +293,17 @@ fi<br>
pkg_postinst_modules () {<br>
if [ -z "$D" ]; then<br>
depmod -a ${KERNEL_VERSION}<br>
- update-modules || true<br>
+else<br>
+ depmod -a -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}<br>
fi<br>
}<br>
<br>
pkg_postrm_modules () {<br>
-update-modules || true<br>
+if [ -z "$D" ]; then<br>
+ depmod -a ${KERNEL_VERSION}<br>
+else<br>
+ depmod -a -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}<br>
+fi<br>
}<br>
<br>
autoload_postinst_fragment() {<br>
@@ -403,12 +408,10 @@ python populate_packages_prepend () {<br>
<br>
dvar = d.getVar('PKGD', True)<br>
<br>
- use_update_modules = oe.utils.contains('DISTRO_FEATURES', 'update-modules', True, False, d)<br>
-<br>
# If autoloading is requested, output /etc/modules-load.d/<name>.conf and append<br>
# appropriate modprobe commands to the postinst<br>
autoload = d.getVar('module_autoload_%s' % basename, True)<br>
- if autoload and use_update_modules:<br>
+ if autoload:<br>
name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename)<br>
f = open(name, 'w')<br>
for m in autoload.split():<br>
@@ -422,16 +425,15 @@ python populate_packages_prepend () {<br>
<br>
# Write out any modconf fragment<br>
modconf = d.getVar('module_conf_%s' % basename, True)<br>
- if modconf and use_update_modules:<br>
+ if modconf:<br>
name = '%s/etc/modprobe.d/%s.conf' % (dvar, basename)<br>
f = open(name, 'w')<br>
f.write("%s\n" % modconf)<br>
f.close()<br>
<br>
- if use_update_modules:<br>
- files = d.getVar('FILES_%s' % pkg, True)<br>
- files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename)<br>
- d.setVar('FILES_%s' % pkg, files)<br>
+ files = d.getVar('FILES_%s' % pkg, True)<br>
+ files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename)<br>
+ d.setVar('FILES_%s' % pkg, files)<br>
<br>
if vals.has_key("description"):<br>
old_desc = d.getVar('DESCRIPTION_' + pkg, True) or ""<br>
@@ -447,17 +449,13 @@ python populate_packages_prepend () {<br>
module_regex = '^(.*)\.k?o$'<br>
module_pattern = 'kernel-module-%s'<br>
<br>
- use_update_modules = oe.utils.contains('DISTRO_FEATURES', 'update-modules', True, False, d)<br>
- if use_update_modules:<br>
- postinst = d.getVar('pkg_postinst_modules', True)<br>
- postrm = d.getVar('pkg_postrm_modules', True)<br>
- else:<br>
- postinst = None<br>
- postrm = None<br>
+ postinst = d.getVar('pkg_postinst_modules', True)<br>
+ postrm = d.getVar('pkg_postrm_modules', True)<br>
+<br>
do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.bin$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')<br>
do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.fw$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')<br>
do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.cis$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')<br>
- do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='%skernel-%s' % (['', 'update-modules '][use_update_modules], d.getVar("KERNEL_VERSION", True)))<br>
+ do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='kernel-%s' % (d.getVar("KERNEL_VERSION", True)))<br>
<br>
# If modules-load.d and modprobe.d are empty at this point, remove them to<br>
# avoid warnings. removedirs only raises an OSError if an empty<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.9.5<br>
<br>
<br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core" target="_blank">http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"
</div></div>