summaryrefslogtreecommitdiff
path: root/meta/classes/kernel.bbclass
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2013-01-17 16:58:47 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-18 13:08:59 +0000
commit323146c7fdf1c47241f3fd5adab2cb3c6d24b56c (patch)
tree4cc370fca1cce8b99d654cce40d02da2bf9f64b2 /meta/classes/kernel.bbclass
parent6fafbf71adb8b34211c2bc24226f0b1eb206a7d3 (diff)
downloadopenembedded-core-323146c7fdf1c47241f3fd5adab2cb3c6d24b56c.tar.gz
openembedded-core-323146c7fdf1c47241f3fd5adab2cb3c6d24b56c.tar.bz2
openembedded-core-323146c7fdf1c47241f3fd5adab2cb3c6d24b56c.zip
kernel.bbclass: remove references to update-modules
Since update-modules is now obsolete, remove it from the bbclass. [YOCTO #3598] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r--meta/classes/kernel.bbclass36
1 files changed, 17 insertions, 19 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index ce4c01a81f..d459569677 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -1,7 +1,7 @@
inherit linux-kernel-base module_strip
PROVIDES += "virtual/kernel"
-DEPENDS += "virtual/${TARGET_PREFIX}gcc kmod-native virtual/${TARGET_PREFIX}gcc${KERNEL_CCSUFFIX} update-modules"
+DEPENDS += "virtual/${TARGET_PREFIX}gcc kmod-native virtual/${TARGET_PREFIX}gcc${KERNEL_CCSUFFIX}"
# we include gcc above, we dont need virtual/libc
INHIBIT_DEFAULT_DEPS = "1"
@@ -293,12 +293,17 @@ fi
pkg_postinst_modules () {
if [ -z "$D" ]; then
depmod -a ${KERNEL_VERSION}
- update-modules || true
+else
+ depmod -a -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}
fi
}
pkg_postrm_modules () {
-update-modules || true
+if [ -z "$D" ]; then
+ depmod -a ${KERNEL_VERSION}
+else
+ depmod -a -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}
+fi
}
autoload_postinst_fragment() {
@@ -403,12 +408,10 @@ python populate_packages_prepend () {
dvar = d.getVar('PKGD', True)
- use_update_modules = oe.utils.contains('DISTRO_FEATURES', 'update-modules', True, False, d)
-
# If autoloading is requested, output /etc/modules-load.d/<name>.conf and append
# appropriate modprobe commands to the postinst
autoload = d.getVar('module_autoload_%s' % basename, True)
- if autoload and use_update_modules:
+ if autoload:
name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename)
f = open(name, 'w')
for m in autoload.split():
@@ -422,16 +425,15 @@ python populate_packages_prepend () {
# Write out any modconf fragment
modconf = d.getVar('module_conf_%s' % basename, True)
- if modconf and use_update_modules:
+ if modconf:
name = '%s/etc/modprobe.d/%s.conf' % (dvar, basename)
f = open(name, 'w')
f.write("%s\n" % modconf)
f.close()
- if use_update_modules:
- files = d.getVar('FILES_%s' % pkg, True)
- files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename)
- d.setVar('FILES_%s' % pkg, files)
+ files = d.getVar('FILES_%s' % pkg, True)
+ files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename)
+ d.setVar('FILES_%s' % pkg, files)
if vals.has_key("description"):
old_desc = d.getVar('DESCRIPTION_' + pkg, True) or ""
@@ -447,17 +449,13 @@ python populate_packages_prepend () {
module_regex = '^(.*)\.k?o$'
module_pattern = 'kernel-module-%s'
- use_update_modules = oe.utils.contains('DISTRO_FEATURES', 'update-modules', True, False, d)
- if use_update_modules:
- postinst = d.getVar('pkg_postinst_modules', True)
- postrm = d.getVar('pkg_postrm_modules', True)
- else:
- postinst = None
- postrm = None
+ postinst = d.getVar('pkg_postinst_modules', True)
+ postrm = d.getVar('pkg_postrm_modules', True)
+
do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.bin$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.fw$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.cis$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
- do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='%skernel-%s' % (['', 'update-modules '][use_update_modules], d.getVar("KERNEL_VERSION", True)))
+ do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='kernel-%s' % (d.getVar("KERNEL_VERSION", True)))
# If modules-load.d and modprobe.d are empty at this point, remove them to
# avoid warnings. removedirs only raises an OSError if an empty