summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/classes/kernel.bbclass10
1 files changed, 10 insertions, 0 deletions
diff --git a/meta-oe/classes/kernel.bbclass b/meta-oe/classes/kernel.bbclass
index c6fc197aa..cd36e5590 100644
--- a/meta-oe/classes/kernel.bbclass
+++ b/meta-oe/classes/kernel.bbclass
@@ -110,6 +110,8 @@ kernel_do_install() {
110 oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" modules_install 110 oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" modules_install
111 rm -f "${D}/lib/modules/${KERNEL_VERSION}/modules.order" 111 rm -f "${D}/lib/modules/${KERNEL_VERSION}/modules.order"
112 rm -f "${D}/lib/modules/${KERNEL_VERSION}/modules.builtin" 112 rm -f "${D}/lib/modules/${KERNEL_VERSION}/modules.builtin"
113 rm "${D}/lib/modules/${KERNEL_VERSION}/build"
114 rm "${D}/lib/modules/${KERNEL_VERSION}/source"
113 else 115 else
114 bbnote "no modules to install" 116 bbnote "no modules to install"
115 fi 117 fi
@@ -455,6 +457,14 @@ python populate_packages_prepend () {
455 do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.cis$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='') 457 do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.cis$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
456 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='update-modules kernel-%s' % d.getVar("KERNEL_VERSION", True)) 458 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='update-modules kernel-%s' % d.getVar("KERNEL_VERSION", True))
457 459
460 # If modutils and modprobe.d are empty at this point, remove them to
461 # avoid warnings. removedirs only raises an OSError if an empty
462 # directory cannot be removed.
463 dvar = d.getVar('PKGD', True)
464 for dir in ["%s/etc/modutils" % (dvar), "%s/etc/modprobe.d" % (dvar)]:
465 if len(os.listdir(dir)) == 0:
466 os.rmdir(dir)
467
458 import re 468 import re
459 metapkg = "kernel-modules" 469 metapkg = "kernel-modules"
460 d.setVar('ALLOW_EMPTY_' + metapkg, "1") 470 d.setVar('ALLOW_EMPTY_' + metapkg, "1")