summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/kernel.bbclass24
-rw-r--r--meta/classes/module.bbclass2
-rw-r--r--meta/conf/bitbake.conf2
3 files changed, 18 insertions, 10 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 36bc3c7cf4..0df8f086ce 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -398,10 +398,12 @@ python populate_packages_prepend () {
398 398
399 dvar = d.getVar('PKGD', True) 399 dvar = d.getVar('PKGD', True)
400 400
401 use_update_modules = oe.utils.contains('DISTRO_FEATURES', 'update-modules', True, False, d)
402
401 # If autoloading is requested, output /etc/modules-load.d/<name>.conf and append 403 # If autoloading is requested, output /etc/modules-load.d/<name>.conf and append
402 # appropriate modprobe commands to the postinst 404 # appropriate modprobe commands to the postinst
403 autoload = d.getVar('module_autoload_%s' % basename, True) 405 autoload = d.getVar('module_autoload_%s' % basename, True)
404 if autoload: 406 if autoload and use_update_modules:
405 name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename) 407 name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename)
406 f = open(name, 'w') 408 f = open(name, 'w')
407 for m in autoload.split(): 409 for m in autoload.split():
@@ -415,15 +417,16 @@ python populate_packages_prepend () {
415 417
416 # Write out any modconf fragment 418 # Write out any modconf fragment
417 modconf = d.getVar('module_conf_%s' % basename, True) 419 modconf = d.getVar('module_conf_%s' % basename, True)
418 if modconf: 420 if modconf and use_update_modules:
419 name = '%s/etc/modprobe.d/%s.conf' % (dvar, basename) 421 name = '%s/etc/modprobe.d/%s.conf' % (dvar, basename)
420 f = open(name, 'w') 422 f = open(name, 'w')
421 f.write("%s\n" % modconf) 423 f.write("%s\n" % modconf)
422 f.close() 424 f.close()
423 425
424 files = d.getVar('FILES_%s' % pkg, True) 426 if use_update_modules:
425 files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename) 427 files = d.getVar('FILES_%s' % pkg, True)
426 d.setVar('FILES_%s' % pkg, files) 428 files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename)
429 d.setVar('FILES_%s' % pkg, files)
427 430
428 if vals.has_key("description"): 431 if vals.has_key("description"):
429 old_desc = d.getVar('DESCRIPTION_' + pkg, True) or "" 432 old_desc = d.getVar('DESCRIPTION_' + pkg, True) or ""
@@ -439,12 +442,17 @@ python populate_packages_prepend () {
439 module_regex = '^(.*)\.k?o$' 442 module_regex = '^(.*)\.k?o$'
440 module_pattern = 'kernel-module-%s' 443 module_pattern = 'kernel-module-%s'
441 444
442 postinst = d.getVar('pkg_postinst_modules', True) 445 use_update_modules = oe.utils.contains('DISTRO_FEATURES', 'update-modules', True, False, d)
443 postrm = d.getVar('pkg_postrm_modules', True) 446 if use_update_modules:
447 postinst = d.getVar('pkg_postinst_modules', True)
448 postrm = d.getVar('pkg_postrm_modules', True)
449 else:
450 postinst = None
451 postrm = None
444 do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.bin$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='') 452 do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.bin$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
445 do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.fw$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='') 453 do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.fw$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
446 do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.cis$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='') 454 do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.cis$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
447 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='update-modules kernel-%s' % d.getVar("KERNEL_VERSION", True)) 455 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)))
448 456
449 # If modules-load.d and modprobe.d are empty at this point, remove them to 457 # If modules-load.d and modprobe.d are empty at this point, remove them to
450 # avoid warnings. removedirs only raises an OSError if an empty 458 # avoid warnings. removedirs only raises an OSError if an empty
diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass
index 91628e429c..4098644c71 100644
--- a/meta/classes/module.bbclass
+++ b/meta/classes/module.bbclass
@@ -1,4 +1,4 @@
1RDEPENDS += "kernel-image update-modules" 1RDEPENDS_${PN} += "kernel-image ${@oe.utils.contains('DISTRO_FEATURES', 'update-modules', 'update-modules', '', d)}"
2DEPENDS += "virtual/kernel" 2DEPENDS += "virtual/kernel"
3 3
4inherit module-base 4inherit module-base
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 5cb5b1352f..324dc9fd14 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -727,7 +727,7 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS ?= ""
727MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= "" 727MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= ""
728IMAGE_FEATURES += "${EXTRA_IMAGE_FEATURES}" 728IMAGE_FEATURES += "${EXTRA_IMAGE_FEATURES}"
729 729
730DISTRO_FEATURES_BACKFILL = "pulseaudio" 730DISTRO_FEATURES_BACKFILL = "pulseaudio update-modules"
731DISTRO_FEATURES_append = "${@oe.utils.features_backfill("DISTRO_FEATURES",d)}" 731DISTRO_FEATURES_append = "${@oe.utils.features_backfill("DISTRO_FEATURES",d)}"
732 732
733MACHINE_FEATURES_BACKFILL = "rtc" 733MACHINE_FEATURES_BACKFILL = "rtc"