mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00
kernel.bbclass: remove references to update-modules
Since update-modules is now obsolete, remove it from the bbclass. [YOCTO #3598] (From OE-Core rev: 323146c7fdf1c47241f3fd5adab2cb3c6d24b56c) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
173a618263
commit
71537bb721
|
@ -1,7 +1,7 @@
|
||||||
inherit linux-kernel-base module_strip
|
inherit linux-kernel-base module_strip
|
||||||
|
|
||||||
PROVIDES += "virtual/kernel"
|
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
|
# we include gcc above, we dont need virtual/libc
|
||||||
INHIBIT_DEFAULT_DEPS = "1"
|
INHIBIT_DEFAULT_DEPS = "1"
|
||||||
|
@ -293,12 +293,17 @@ fi
|
||||||
pkg_postinst_modules () {
|
pkg_postinst_modules () {
|
||||||
if [ -z "$D" ]; then
|
if [ -z "$D" ]; then
|
||||||
depmod -a ${KERNEL_VERSION}
|
depmod -a ${KERNEL_VERSION}
|
||||||
update-modules || true
|
else
|
||||||
|
depmod -a -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_postrm_modules () {
|
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() {
|
autoload_postinst_fragment() {
|
||||||
|
@ -403,12 +408,10 @@ python populate_packages_prepend () {
|
||||||
|
|
||||||
dvar = d.getVar('PKGD', True)
|
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
|
# If autoloading is requested, output /etc/modules-load.d/<name>.conf and append
|
||||||
# appropriate modprobe commands to the postinst
|
# appropriate modprobe commands to the postinst
|
||||||
autoload = d.getVar('module_autoload_%s' % basename, True)
|
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)
|
name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename)
|
||||||
f = open(name, 'w')
|
f = open(name, 'w')
|
||||||
for m in autoload.split():
|
for m in autoload.split():
|
||||||
|
@ -422,13 +425,12 @@ python populate_packages_prepend () {
|
||||||
|
|
||||||
# Write out any modconf fragment
|
# Write out any modconf fragment
|
||||||
modconf = d.getVar('module_conf_%s' % basename, True)
|
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)
|
name = '%s/etc/modprobe.d/%s.conf' % (dvar, basename)
|
||||||
f = open(name, 'w')
|
f = open(name, 'w')
|
||||||
f.write("%s\n" % modconf)
|
f.write("%s\n" % modconf)
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
if use_update_modules:
|
|
||||||
files = d.getVar('FILES_%s' % pkg, True)
|
files = d.getVar('FILES_%s' % pkg, True)
|
||||||
files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename)
|
files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename)
|
||||||
d.setVar('FILES_%s' % pkg, files)
|
d.setVar('FILES_%s' % pkg, files)
|
||||||
|
@ -447,17 +449,13 @@ python populate_packages_prepend () {
|
||||||
module_regex = '^(.*)\.k?o$'
|
module_regex = '^(.*)\.k?o$'
|
||||||
module_pattern = 'kernel-module-%s'
|
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)
|
postinst = d.getVar('pkg_postinst_modules', True)
|
||||||
postrm = d.getVar('pkg_postrm_modules', True)
|
postrm = d.getVar('pkg_postrm_modules', True)
|
||||||
else:
|
|
||||||
postinst = None
|
|
||||||
postrm = None
|
|
||||||
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='^(.*)\.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='^(.*)\.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/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
|
# 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
|
# avoid warnings. removedirs only raises an OSError if an empty
|
||||||
|
|
Loading…
Reference in New Issue
Block a user