summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Rossi <nathan.rossi@xilinx.com>2014-01-14 11:21:00 +1000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-02 11:22:08 +0000
commit0031db1aca23bdecbd94664f9325752aa3607dc3 (patch)
treedcb262e305f9566aaa257e6dbb81fd5ce939f03b
parent4a8ddd8379527705ec8828c9c8e1c9b29a6a4152 (diff)
downloadpoky-0031db1aca23bdecbd94664f9325752aa3607dc3.tar.gz
kernel.bbclass: Fix empty modules directory QA issue
If a kernel is built without any external modules (aka no CONFIG_*=m), then during a modules_install of the kernel an empty directory is created at /lib/modules/${KERNEL_VERIONS}/kernel. This is behaviour of the kernel infrastructure, the directory would normally be populated with the modules that were built. However because of the expectations of kernel-modules-split, no packages are created when there are no modules and an empty directory lingers. This raises QA issues as warning or errors (depending on the distro). The following patch changes the kernel_do_install task to check if the directory is empty and if so removes it. (From OE-Core rev: 63d3070b7e1207164891b154a5b9017731e75872) Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/kernel.bbclass2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index f2a5ec5de7..51626b03f8 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -188,6 +188,8 @@ kernel_do_install() {
188 oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" modules_install 188 oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" modules_install
189 rm "${D}/lib/modules/${KERNEL_VERSION}/build" 189 rm "${D}/lib/modules/${KERNEL_VERSION}/build"
190 rm "${D}/lib/modules/${KERNEL_VERSION}/source" 190 rm "${D}/lib/modules/${KERNEL_VERSION}/source"
191 # If the kernel/ directory is empty remove it to prevent QA issues
192 rmdir --ignore-fail-on-non-empty "${D}/lib/modules/${KERNEL_VERSION}/kernel"
191 else 193 else
192 bbnote "no modules to install" 194 bbnote "no modules to install"
193 fi 195 fi