diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/kernel-module-split.bbclass | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass index d43f7431cb..e38a6f6e7e 100644 --- a/meta/classes/kernel-module-split.bbclass +++ b/meta/classes/kernel-module-split.bbclass | |||
@@ -130,8 +130,11 @@ python split_kernel_module_packages () { | |||
130 | 130 | ||
131 | # If autoloading is requested, output /etc/modules-load.d/<name>.conf and append | 131 | # If autoloading is requested, output /etc/modules-load.d/<name>.conf and append |
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 | autoload = d.getVar('module_autoload_%s' % basename, True) | 134 | autoload = d.getVar('module_autoload_%s' % basename, True) |
134 | if autoload: | 135 | if autoload: |
136 | bb.error("KERNEL_MODULE_AUTOLOAD has replaced module_autoload_%s, please replace it!" % basename) | ||
137 | if basename in autoloadlist: | ||
135 | name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename) | 138 | name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename) |
136 | f = open(name, 'w') | 139 | f = open(name, 'w') |
137 | for m in autoload.split(): | 140 | for m in autoload.split(): |
@@ -144,12 +147,15 @@ python split_kernel_module_packages () { | |||
144 | d.setVar('pkg_postinst_%s' % pkg, postinst) | 147 | d.setVar('pkg_postinst_%s' % pkg, postinst) |
145 | 148 | ||
146 | # Write out any modconf fragment | 149 | # Write out any modconf fragment |
150 | modconflist = (d.getVar("KERNEL_MODULE_PROBECONF", True) or "").split() | ||
147 | modconf = d.getVar('module_conf_%s' % basename, True) | 151 | modconf = d.getVar('module_conf_%s' % basename, True) |
148 | if modconf: | 152 | if modconf and basename in modconflist: |
149 | name = '%s/etc/modprobe.d/%s.conf' % (dvar, basename) | 153 | name = '%s/etc/modprobe.d/%s.conf' % (dvar, basename) |
150 | f = open(name, 'w') | 154 | f = open(name, 'w') |
151 | f.write("%s\n" % modconf) | 155 | f.write("%s\n" % modconf) |
152 | f.close() | 156 | f.close() |
157 | elif modconf: | ||
158 | bb.error("Please ensure module %s is listed in KERNEL_MODULE_PROBECONF since module_conf_%s is set" % (basename, basename)) | ||
153 | 159 | ||
154 | files = d.getVar('FILES_%s' % pkg, True) | 160 | files = d.getVar('FILES_%s' % pkg, True) |
155 | files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename) | 161 | files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename) |
@@ -185,3 +191,5 @@ python split_kernel_module_packages () { | |||
185 | if len(os.listdir(dir)) == 0: | 191 | if len(os.listdir(dir)) == 0: |
186 | os.rmdir(dir) | 192 | os.rmdir(dir) |
187 | } | 193 | } |
194 | |||
195 | do_package[vardeps] += '${@" ".join(map(lambda s: "module_conf_" + s, (d.getVar("KERNEL_MODULE_PROBECONF", True) or "").split()))}' | ||