summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2012-03-23 13:56:26 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-23 17:47:41 +0000
commitc6db496be65bc1f354e62792ba3daa90d62ad428 (patch)
tree886b1d0161c8f1d5892a7198b6ec04cf97271fe3 /meta
parent8132ac5f6cae22a3184ffbf6d23d0371b0d1ce5f (diff)
downloadpoky-c6db496be65bc1f354e62792ba3daa90d62ad428.tar.gz
kernel.bbclass: populate /etc/modules-load.d/ with module_autoload entries too
* /etc/modules-load.d/foo.conf is used by systemd like /etc/modutils/foo was with sysvinit (From OE-Core rev: 1487af02b92278dec2eb539377cc29bb1b404153) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/kernel.bbclass10
1 files changed, 8 insertions, 2 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 169df33b31..975ae13758 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -122,6 +122,7 @@ kernel_do_install() {
122 install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION} 122 install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION}
123 [ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/boot/Module.symvers-${KERNEL_VERSION} 123 [ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/boot/Module.symvers-${KERNEL_VERSION}
124 install -d ${D}/etc/modutils 124 install -d ${D}/etc/modutils
125 install -d ${D}/etc/modules-load.d
125 install -d ${D}/etc/modprobe.d 126 install -d ${D}/etc/modprobe.d
126 127
127 # 128 #
@@ -411,6 +412,11 @@ python populate_packages_prepend () {
411 for m in autoload.split(): 412 for m in autoload.split():
412 f.write('%s\n' % m) 413 f.write('%s\n' % m)
413 f.close() 414 f.close()
415 name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename)
416 f = open(name, 'w')
417 for m in autoload.split():
418 f.write('%s\n' % m)
419 f.close()
414 postinst = d.getVar('pkg_postinst_%s' % pkg, True) 420 postinst = d.getVar('pkg_postinst_%s' % pkg, True)
415 if not postinst: 421 if not postinst:
416 bb.fatal("pkg_postinst_%s not defined" % pkg) 422 bb.fatal("pkg_postinst_%s not defined" % pkg)
@@ -426,7 +432,7 @@ python populate_packages_prepend () {
426 f.close() 432 f.close()
427 433
428 files = d.getVar('FILES_%s' % pkg, True) 434 files = d.getVar('FILES_%s' % pkg, True)
429 files = "%s /etc/modutils/%s /etc/modutils/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename, basename) 435 files = "%s /etc/modutils/%s /etc/modutils/%s.conf /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename, basename, basename)
430 d.setVar('FILES_%s' % pkg, files) 436 d.setVar('FILES_%s' % pkg, files)
431 437
432 if vals.has_key("description"): 438 if vals.has_key("description"):
@@ -456,7 +462,7 @@ python populate_packages_prepend () {
456 # avoid warnings. removedirs only raises an OSError if an empty 462 # avoid warnings. removedirs only raises an OSError if an empty
457 # directory cannot be removed. 463 # directory cannot be removed.
458 dvar = d.getVar('PKGD', True) 464 dvar = d.getVar('PKGD', True)
459 for dir in ["%s/etc/modutils" % (dvar), "%s/etc/modprobe.d" % (dvar)]: 465 for dir in ["%s/etc/modutils" % (dvar), "%s/etc/modprobe.d" % (dvar), "%s/etc/modules-load.d" % (dvar)]:
460 if len(os.listdir(dir)) == 0: 466 if len(os.listdir(dir)) == 0:
461 os.rmdir(dir) 467 os.rmdir(dir)
462 468