summaryrefslogtreecommitdiffstats
path: root/classes/kernel.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'classes/kernel.bbclass')
-rw-r--r--classes/kernel.bbclass21
1 files changed, 17 insertions, 4 deletions
diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass
index 984f514..1fa1eb6 100644
--- a/classes/kernel.bbclass
+++ b/classes/kernel.bbclass
@@ -68,9 +68,13 @@ base_do_unpack_append () {
if s != kernsrc:
bb.utils.mkdirhier(kernsrc)
bb.utils.remove(kernsrc, recurse=True)
- import subprocess
- subprocess.call(d.expand("mv ${S} ${STAGING_KERNEL_DIR}"), shell=True)
- os.symlink(kernsrc, s)
+ if d.getVar("EXTERNALSRC", True):
+ # With EXTERNALSRC S will not be wiped so we can symlink to it
+ os.symlink(s, kernsrc)
+ else:
+ import shutil
+ shutil.move(s, kernsrc)
+ os.symlink(kernsrc, s)
}
inherit kernel-arch deploy
@@ -213,6 +217,14 @@ do_compile_kernelmodules() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
if (grep -q -i -e '^CONFIG_MODULES=y$' ${B}/.config); then
oe_runmake -C ${B} ${PARALLEL_MAKE} modules CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}
+
+ # Module.symvers gets updated during the
+ # building of the kernel modules. We need to
+ # update this in the shared workdir since some
+ # external kernel modules has a dependency on
+ # other kernel modules and will look at this
+ # file to do symbol lookups
+ cp Module.symvers ${STAGING_KERNEL_BUILDDIR}/
else
bbnote "no modules to compile"
fi
@@ -372,6 +384,7 @@ RDEPENDS_kernel = "kernel-base"
# not wanted in images as standard
RDEPENDS_kernel-base ?= "kernel-image"
PKG_kernel-image = "kernel-image-${@legitimize_package_name('${KERNEL_VERSION}')}"
+RDEPENDS_kernel-image += "${@base_conditional('KERNEL_IMAGETYPE', 'vmlinux', 'kernel-vmlinux', '', d)}"
PKG_kernel-base = "kernel-${@legitimize_package_name('${KERNEL_VERSION}')}"
RPROVIDES_kernel-base += "kernel-${KERNEL_VERSION}"
ALLOW_EMPTY_kernel = "1"
@@ -419,7 +432,7 @@ do_strip() {
gawk '{print $1}'`
for str in ${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}; do {
- if [ "$headers" != *"$str"* ]; then
+ if ! (echo "$headers" | grep -q "^$str$"); then
bbwarn "Section not found: $str";
fi