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:59:15 +0100 |
commit | 407103302f3348fcfddd3b3891851bc651c8a68f (patch) | |
tree | e56ba60c86d5ba7ed6cbce2cf5aca1ac502bd1a9 | |
parent | 2c4d82be3a95eefe65118b381efd552d3100a434 (diff) | |
download | poky-407103302f3348fcfddd3b3891851bc651c8a68f.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
(From OE-Core rev: e9cd8ba3dda624615b68c601eac04427d9483f14)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 0c045c91e9..9a95b72744 100644 --- a/meta/classes/kernel-module-split.bbclass +++ b/meta/classes/kernel-module-split.bbclass | |||
@@ -132,12 +132,18 @@ python split_kernel_module_packages () { | |||
132 | # appropriate modprobe commands to the postinst | 132 | # appropriate modprobe commands to the postinst |
133 | autoloadlist = (d.getVar("KERNEL_MODULE_AUTOLOAD", True) or "").split() | 133 | autoloadlist = (d.getVar("KERNEL_MODULE_AUTOLOAD", True) or "").split() |
134 | autoload = d.getVar('module_autoload_%s' % basename, True) | 134 | autoload = d.getVar('module_autoload_%s' % basename, True) |
135 | if autoload: | 135 | if autoload and autoload == basename: |
136 | bb.error("KERNEL_MODULE_AUTOLOAD has replaced module_autoload_%s, please replace it!" % basename) | 136 | bb.warn("module_autoload_%s was replaced by KERNEL_MODULE_AUTOLOAD for cases where basename == module name, please drop it" % basename) |
137 | if autoload and basename not in autoloadlist: | ||
138 | bb.warn("module_autoload_%s is defined but '%s' isn't included in KERNEL_MODULE_AUTOLOAD, please add it there" % (basename, basename)) | ||
137 | if basename in autoloadlist: | 139 | if basename in autoloadlist: |
138 | name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename) | 140 | name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename) |
139 | f = open(name, 'w') | 141 | f = open(name, 'w') |
140 | f.write('%s\n' % basename) | 142 | if autoload: |
143 | for m in autoload.split(): | ||
144 | f.write('%s\n' % m) | ||
145 | else: | ||
146 | f.write('%s\n' % basename) | ||
141 | f.close() | 147 | f.close() |
142 | postinst = d.getVar('pkg_postinst_%s' % pkg, True) | 148 | postinst = d.getVar('pkg_postinst_%s' % pkg, True) |
143 | if not postinst: | 149 | if not postinst: |