diff options
Diffstat (limited to 'meta/classes/module-base.bbclass')
-rw-r--r-- | meta/classes/module-base.bbclass | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/meta/classes/module-base.bbclass b/meta/classes/module-base.bbclass index 9537ba9f43..3eb2e9226e 100644 --- a/meta/classes/module-base.bbclass +++ b/meta/classes/module-base.bbclass | |||
@@ -3,16 +3,24 @@ inherit kernel-arch | |||
3 | export OS = "${TARGET_OS}" | 3 | export OS = "${TARGET_OS}" |
4 | export CROSS_COMPILE = "${TARGET_PREFIX}" | 4 | export CROSS_COMPILE = "${TARGET_PREFIX}" |
5 | 5 | ||
6 | export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}" | 6 | # This points to the build artefacts from the main kernel build |
7 | # such as .config and System.map | ||
8 | # Confusingly it is not the module build output (which is ${B}) but | ||
9 | # we didn't pick the name. | ||
10 | export KBUILD_OUTPUT = "${STAGING_KERNEL_BUILDDIR}" | ||
11 | |||
12 | export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_BUILDDIR}/kernel-abiversion')}" | ||
7 | KERNEL_OBJECT_SUFFIX = ".ko" | 13 | KERNEL_OBJECT_SUFFIX = ".ko" |
8 | 14 | ||
9 | # kernel modules are generally machine specific | 15 | # kernel modules are generally machine specific |
10 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 16 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
11 | 17 | ||
18 | do_configure[depends] += "virtual/kernel:do_shared_workdir" | ||
19 | |||
12 | # Function to ensure the kernel scripts are created. Expected to | 20 | # Function to ensure the kernel scripts are created. Expected to |
13 | # be called before do_compile. See module.bbclass for an exmaple. | 21 | # be called before do_compile. See module.bbclass for an exmaple. |
14 | do_make_scripts() { | 22 | do_make_scripts() { |
15 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS | 23 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS |
16 | make CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \ | 24 | make CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \ |
17 | -C ${STAGING_KERNEL_DIR} scripts | 25 | -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} scripts |
18 | } | 26 | } |