diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2014-07-21 23:40:47 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-07-23 21:44:22 +0100 |
commit | e9cd8ba3dda624615b68c601eac04427d9483f14 (patch) | |
tree | 411868e37e5bc7ff5346b1cd61534f144fdba2c7 /meta/classes/kernel-module-split.bbclass | |
parent | b9a2aacfc0343d522cce9183dae15f1ae042b36d (diff) | |
download | openembedded-core-contrib-e9cd8ba3dda624615b68c601eac04427d9483f14.tar.gz |
kernel-module-split.bbclass: Allow autoloading multiple modules or modules where basename != module name
* new KERNEL_MODULE_AUTOLOAD syntax doesn't support modules where basename and
module name don't match (usually - and _), e.g.:
module_autoload_bq27x00_battery = "bq27x00-battery"
* sometimes it's useful to load modules in particular order and
module_autoload allowed to just list multiple modules, e.g.:
module_autoload_snd-soc-neo1973-wm8753 = "snd-soc-s3c24xx snd_soc_s3c24xx_i2s snd-soc-dfbmcs320 snd-soc-wm8753 snd-soc-neo1973-wm8753"
or
module_autoload_g_ether = "s3c2410_udc g_ether"
restore this possibility which is useful for incorrect dependencies
between modules
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/kernel-module-split.bbclass')
-rw-r--r-- | meta/classes/kernel-module-split.bbclass | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass index 0c045c91e90..9a95b727449 100644 --- a/meta/classes/kernel-module-split.bbclass +++ b/meta/classes/kernel-module-split.bbclass @@ -132,12 +132,18 @@ python split_kernel_module_packages () { # appropriate modprobe commands to the postinst autoloadlist = (d.getVar("KERNEL_MODULE_AUTOLOAD", True) or "").split() autoload = d.getVar('module_autoload_%s' % basename, True) - if autoload: - bb.error("KERNEL_MODULE_AUTOLOAD has replaced module_autoload_%s, please replace it!" % basename) + if autoload and autoload == basename: + bb.warn("module_autoload_%s was replaced by KERNEL_MODULE_AUTOLOAD for cases where basename == module name, please drop it" % basename) + if autoload and basename not in autoloadlist: + bb.warn("module_autoload_%s is defined but '%s' isn't included in KERNEL_MODULE_AUTOLOAD, please add it there" % (basename, basename)) if basename in autoloadlist: name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename) f = open(name, 'w') - f.write('%s\n' % basename) + if autoload: + for m in autoload.split(): + f.write('%s\n' % m) + else: + f.write('%s\n' % basename) f.close() postinst = d.getVar('pkg_postinst_%s' % pkg, True) if not postinst: |