diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2012-03-23 13:56:26 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-23 17:45:30 +0000 |
commit | 1487af02b92278dec2eb539377cc29bb1b404153 (patch) | |
tree | 7e4489b606fbf982d1fb0d0c72c29b47093b2d59 /meta/classes/kernel.bbclass | |
parent | 68dc2a3fa30c03a196d650de34d0c657a7b85454 (diff) | |
download | openembedded-core-1487af02b92278dec2eb539377cc29bb1b404153.tar.gz openembedded-core-1487af02b92278dec2eb539377cc29bb1b404153.tar.bz2 openembedded-core-1487af02b92278dec2eb539377cc29bb1b404153.zip |
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
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r-- | meta/classes/kernel.bbclass | 10 |
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() { install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION} [ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/boot/Module.symvers-${KERNEL_VERSION} install -d ${D}/etc/modutils + install -d ${D}/etc/modules-load.d install -d ${D}/etc/modprobe.d # @@ -411,6 +412,11 @@ python populate_packages_prepend () { for m in autoload.split(): f.write('%s\n' % m) f.close() + name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename) + f = open(name, 'w') + for m in autoload.split(): + f.write('%s\n' % m) + f.close() postinst = d.getVar('pkg_postinst_%s' % pkg, True) if not postinst: bb.fatal("pkg_postinst_%s not defined" % pkg) @@ -426,7 +432,7 @@ python populate_packages_prepend () { f.close() files = d.getVar('FILES_%s' % pkg, True) - files = "%s /etc/modutils/%s /etc/modutils/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename, basename) + 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) d.setVar('FILES_%s' % pkg, files) if vals.has_key("description"): @@ -456,7 +462,7 @@ python populate_packages_prepend () { # avoid warnings. removedirs only raises an OSError if an empty # directory cannot be removed. dvar = d.getVar('PKGD', True) - for dir in ["%s/etc/modutils" % (dvar), "%s/etc/modprobe.d" % (dvar)]: + for dir in ["%s/etc/modutils" % (dvar), "%s/etc/modprobe.d" % (dvar), "%s/etc/modules-load.d" % (dvar)]: if len(os.listdir(dir)) == 0: os.rmdir(dir) |