summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2013-01-17 16:58:47 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-18 13:28:08 +0000
commit71537bb721b64968f1a3ccaef9a5490290df8b51 (patch)
tree55216b7131966b6c1391b57891899d6558b818c5 /meta
parent173a61826305838ba56a9da50491e657b4843f56 (diff)
downloadpoky-71537bb721b64968f1a3ccaef9a5490290df8b51.tar.gz
kernel.bbclass: remove references to update-modules
Since update-modules is now obsolete, remove it from the bbclass. [YOCTO #3598] (From OE-Core rev: 323146c7fdf1c47241f3fd5adab2cb3c6d24b56c) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/kernel.bbclass36
1 files changed, 17 insertions, 19 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index ce4c01a81f..d459569677 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -1,7 +1,7 @@
1inherit linux-kernel-base module_strip 1inherit linux-kernel-base module_strip
2 2
3PROVIDES += "virtual/kernel" 3PROVIDES += "virtual/kernel"
4DEPENDS += "virtual/${TARGET_PREFIX}gcc kmod-native virtual/${TARGET_PREFIX}gcc${KERNEL_CCSUFFIX} update-modules" 4DEPENDS += "virtual/${TARGET_PREFIX}gcc kmod-native virtual/${TARGET_PREFIX}gcc${KERNEL_CCSUFFIX}"
5 5
6# we include gcc above, we dont need virtual/libc 6# we include gcc above, we dont need virtual/libc
7INHIBIT_DEFAULT_DEPS = "1" 7INHIBIT_DEFAULT_DEPS = "1"
@@ -293,12 +293,17 @@ fi
293pkg_postinst_modules () { 293pkg_postinst_modules () {
294if [ -z "$D" ]; then 294if [ -z "$D" ]; then
295 depmod -a ${KERNEL_VERSION} 295 depmod -a ${KERNEL_VERSION}
296 update-modules || true 296else
297 depmod -a -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}
297fi 298fi
298} 299}
299 300
300pkg_postrm_modules () { 301pkg_postrm_modules () {
301update-modules || true 302if [ -z "$D" ]; then
303 depmod -a ${KERNEL_VERSION}
304else
305 depmod -a -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}
306fi
302} 307}
303 308
304autoload_postinst_fragment() { 309autoload_postinst_fragment() {
@@ -403,12 +408,10 @@ python populate_packages_prepend () {
403 408
404 dvar = d.getVar('PKGD', True) 409 dvar = d.getVar('PKGD', True)
405 410
406 use_update_modules = oe.utils.contains('DISTRO_FEATURES', 'update-modules', True, False, d)
407
408 # If autoloading is requested, output /etc/modules-load.d/<name>.conf and append 411 # If autoloading is requested, output /etc/modules-load.d/<name>.conf and append
409 # appropriate modprobe commands to the postinst 412 # appropriate modprobe commands to the postinst
410 autoload = d.getVar('module_autoload_%s' % basename, True) 413 autoload = d.getVar('module_autoload_%s' % basename, True)
411 if autoload and use_update_modules: 414 if autoload:
412 name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename) 415 name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename)
413 f = open(name, 'w') 416 f = open(name, 'w')
414 for m in autoload.split(): 417 for m in autoload.split():
@@ -422,16 +425,15 @@ python populate_packages_prepend () {
422 425
423 # Write out any modconf fragment 426 # Write out any modconf fragment
424 modconf = d.getVar('module_conf_%s' % basename, True) 427 modconf = d.getVar('module_conf_%s' % basename, True)
425 if modconf and use_update_modules: 428 if modconf:
426 name = '%s/etc/modprobe.d/%s.conf' % (dvar, basename) 429 name = '%s/etc/modprobe.d/%s.conf' % (dvar, basename)
427 f = open(name, 'w') 430 f = open(name, 'w')
428 f.write("%s\n" % modconf) 431 f.write("%s\n" % modconf)
429 f.close() 432 f.close()
430 433
431 if use_update_modules: 434 files = d.getVar('FILES_%s' % pkg, True)
432 files = d.getVar('FILES_%s' % pkg, True) 435 files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename)
433 files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename) 436 d.setVar('FILES_%s' % pkg, files)
434 d.setVar('FILES_%s' % pkg, files)
435 437
436 if vals.has_key("description"): 438 if vals.has_key("description"):
437 old_desc = d.getVar('DESCRIPTION_' + pkg, True) or "" 439 old_desc = d.getVar('DESCRIPTION_' + pkg, True) or ""
@@ -447,17 +449,13 @@ python populate_packages_prepend () {
447 module_regex = '^(.*)\.k?o$' 449 module_regex = '^(.*)\.k?o$'
448 module_pattern = 'kernel-module-%s' 450 module_pattern = 'kernel-module-%s'
449 451
450 use_update_modules = oe.utils.contains('DISTRO_FEATURES', 'update-modules', True, False, d) 452 postinst = d.getVar('pkg_postinst_modules', True)
451 if use_update_modules: 453 postrm = d.getVar('pkg_postrm_modules', True)
452 postinst = d.getVar('pkg_postinst_modules', True) 454
453 postrm = d.getVar('pkg_postrm_modules', True)
454 else:
455 postinst = None
456 postrm = None
457 do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.bin$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='') 455 do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.bin$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
458 do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.fw$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='') 456 do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.fw$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
459 do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.cis$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='') 457 do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.cis$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
460 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))) 458 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)))
461 459
462 # If modules-load.d and modprobe.d are empty at this point, remove them to 460 # If modules-load.d and modprobe.d are empty at this point, remove them to
463 # avoid warnings. removedirs only raises an OSError if an empty 461 # avoid warnings. removedirs only raises an OSError if an empty