kernel.bbclass: populate /etc/modules-load.d/ with module_autoload entries too
PATCH 1/1 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
--- meta/classes/kernel.bbclass | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)
meta/classes/kernel.bbclass +8 -2
@@ -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)
Signature · 1 line
1.7.8.5
Quoted 6 lines · Martin Jansa
*
/etc/modules-load.d/foo.confis used by systemd like/etc/modutils/foowas with sysvinitSigned-off-by Martin Jansa <[email protected]>--- meta/classes/kernel.bbclass | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)
Since these look identical couldn't we symlink them? I'm not a big fan of writing duplicate data to a package :/.
Cheers,
Richard
Quoted 10 lines · Richard Purdie
Quoted 6 lines · Martin Jansa
*
/etc/modules-load.d/foo.confis used by systemd like/etc/modutils/foowas with sysvinitSigned-off-by Martin Jansa <[email protected]>--- meta/classes/kernel.bbclass | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)Since these look identical couldn't we symlink them? I'm not a big fan of writing duplicate data to a package :/.
OK I'll change it in v2
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 9 lines · Martin Jansa
Quoted 8 lines · Richard Purdie
Quoted 6 lines · Martin Jansa
*
/etc/modules-load.d/foo.confis used by systemd like/etc/modutils/foowas with sysvinitSigned-off-by Martin Jansa <[email protected]>--- meta/classes/kernel.bbclass | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)
Quoted 4 lines
Quoted 2 lines
Since these look identical couldn't we symlink them? I'm not a big fan of writing duplicate data to a package :/.
OK I'll change it in v2
Note that I'm wondering if we can just symlink the directory entirely rather than the files themselves. There may be a reason that is a bad idea but I don't know...
Cheers,
Richard
Quoted 10 lines · Richard Purdie
Quoted 9 lines · Martin Jansa
Quoted 8 lines · Richard Purdie
Quoted 6 lines · Martin Jansa
*
/etc/modules-load.d/foo.confis used by systemd like/etc/modutils/foowas with sysvinitSigned-off-by Martin Jansa <[email protected]>--- meta/classes/kernel.bbclass | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Since these look identical couldn't we symlink them? I'm not a big fan of writing duplicate data to a package :/.
OK I'll change it in v2
Note that I'm wondering if we can just symlink the directory entirely rather than the files themselves. There may be a reason that is a bad idea but I don't know...
There are different filenames (notice .conf in the end) so I have patch doing symlinks for files not directories.
Cheers,
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 14 lines · Martin Jansa
Quoted 13 lines · Richard Purdie
Quoted 12 lines · Martin Jansa
Quoted 10 lines · Richard Purdie
Quoted 6 lines · Martin Jansa
*
/etc/modules-load.d/foo.confis used by systemd like/etc/modutils/foowas with sysvinitSigned-off-by Martin Jansa <[email protected]>--- meta/classes/kernel.bbclass | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)Since these look identical couldn't we symlink them? I'm not a big fan of writing duplicate data to a package :/.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
OK I'll change it in v2
Note that I'm wondering if we can just symlink the directory entirely rather than the files themselves. There may be a reason that is a bad idea but I don't know...
There are different filenames (notice .conf in the end) so I have patch doing symlinks for files not directories.
I'd seen the modprobe.d conf files and thought here was some similarity. I have to admit I think systemd is nuts for requiring a copy of these files when it could have used the existing layout. It looks like change for the sake of change :(.
I'm nearly tempted to suggest we should just patch systemd to use the other filenames...
Cheers,
Richard
Op 23 mrt. 2012, om 13:22 heeft Richard Purdie het volgende geschreven:
Quoted 24 lines · Martin Jansa
Quoted 14 lines · Richard Purdie
Quoted 13 lines · Martin Jansa
Quoted 12 lines · Richard Purdie
Quoted 10 lines · Martin Jansa
Quoted 6 lines
*
/etc/modules-load.d/foo.confis used by systemd like/etc/modutils/foowas with sysvinitSigned-off-by Martin Jansa <[email protected]>---
meta/classes/kernel.bbclass | 10 ++++++++--1 files changed, 8 insertions(+), 2 deletions(-)Since these look identical couldn't we symlink them? I'm not a big fan of writing duplicate data to a package :/.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
OK I'll change it in v2
Note that I'm wondering if we can just symlink the directory entirely rather than the files themselves. There may be a reason that is a bad idea but I don't know...
There are different filenames (notice .conf in the end) so I have patch doing symlinks for files not directories.
Quoted 7 lines
I'd seen the modprobe.d conf files and thought here was some similarity. I have to admit I think systemd is nuts for requiring a copy of these files when it could have used the existing layout. It looks like change for the sake of change :(.
I'm nearly tempted to suggest we should just patch systemd to use the other filenames...
The point the systemd developers want to make is to use the same path across all distros out there. Patching it would defeat the purpose. Unless we want to fork and maintain our own init system and scripts, like we do with sysvinit currently.
regards,
Koen
Quoted 17 lines · Richard Purdie
Quoted 16 lines · Martin Jansa
Quoted 15 lines · Richard Purdie
Quoted 13 lines · Martin Jansa
Quoted 10 lines · Richard Purdie
Quoted 6 lines · Martin Jansa
*
/etc/modules-load.d/foo.confis used by systemd like/etc/modutils/foowas with sysvinitSigned-off-by Martin Jansa <[email protected]>--- meta/classes/kernel.bbclass | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)Since these look identical couldn't we symlink them? I'm not a big fan of writing duplicate data to a package :/.
OK I'll change it in v2
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Note that I'm wondering if we can just symlink the directory entirely rather than the files themselves. There may be a reason that is a bad idea but I don't know...
There are different filenames (notice .conf in the end) so I have patch doing symlinks for files not directories.
I'd seen the modprobe.d conf files and thought here was some similarity.
but that's for module options e.g.
SHR root@gjama ~ $ cat /etc/modprobe.d/g_ether.conf
options g_ether dev_addr=00:1F:11:01:2C:9F host_addr=00:1F:11:01:2C:A0
not for module_autoload
Quoted 3 lines
I have to admit I think systemd is nuts for requiring a copy of these files when it could have used the existing layout. It looks like change for the sake of change :(.
then why not patch/usr/sbin/update-modules
to read /etc/modules-load.d/*.conf instead of /etc/modutils/* as this is just simple script imported from debian to produce /etc/modules file which is IMHO all what we need for old init script (modutils-initscripts) to read.
Quoted 12 lines
I'm nearly tempted to suggest we should just patch systemd to use the other filenames...
Cheers,
Richard
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 25 lines · Martin Jansa
Quoted 24 lines · Richard Purdie
Quoted 22 lines · Martin Jansa
Quoted 10 lines · Richard Purdie
Quoted 9 lines · Martin Jansa
Quoted 8 lines · Richard Purdie
Quoted 6 lines · Martin Jansa
*
/etc/modules-load.d/foo.confis used by systemd like/etc/modutils/foowas with sysvinitSigned-off-by Martin Jansa <[email protected]>--- meta/classes/kernel.bbclass | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Since these look identical couldn't we symlink them? I'm not a big fan of writing duplicate data to a package :/.
OK I'll change it in v2
Note that I'm wondering if we can just symlink the directory entirely rather than the files themselves. There may be a reason that is a bad idea but I don't know...
There are different filenames (notice .conf in the end) so I have patch doing symlinks for files not directories.
Quoted 8 lines
Quoted 1 line
I'd seen the modprobe.d conf files and thought here was some similarity.
but that's for module options e.g.
SHR root@gjama ~ $ cat
/etc/modprobe.d/g_ether.conf
optionsg_etherdev_addr=00:1F:11:01:2C:9F host_addr=00:1F:11:01:2C:A0not for
module_autoload
Right, I understood that when I looked at the code in detail.
Quoted 10 lines
Quoted 3 lines
I have to admit I think systemd is nuts for requiring a copy of these files when it could have used the existing layout. It looks like change for the sake of change :(.
then why not patch
/usr/sbin/update-modules
to read/etc/modules-load.d/*.confinstead of/etc/modutils/*as this is just simple script imported from debian to produce/etc/modulesfile which is IMHO all what we need for old init script (modutils-initscripts) to read.
I'd be open to that assuming we can have some kind of reasonable story on compatibility.
Cheers,
Richard