blob: 0952c0cca7bc1e44bced1d8fe2755bdf147b43f1 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001inherit module-base kernel-module-split
2
3addtask make_scripts after do_patch before do_compile
4do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
5do_make_scripts[depends] += "virtual/kernel:do_shared_workdir"
6
7EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_DIR}"
8
9module_do_compile() {
10 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
11 oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
12 KERNEL_VERSION=${KERNEL_VERSION} \
13 CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
14 AR="${KERNEL_AR}" \
15 O=${STAGING_KERNEL_BUILDDIR} \
16 ${MAKE_TARGETS}
17}
18
19module_do_install() {
20 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
21 oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" \
22 CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
23 O=${STAGING_KERNEL_BUILDDIR} \
24 modules_install
25}
26
27EXPORT_FUNCTIONS do_compile do_install
28
29# add all splitted modules to PN RDEPENDS, PN can be empty now
30KERNEL_MODULES_META_PACKAGE = "${PN}"
31FILES_${PN} = ""
32ALLOW_EMPTY_${PN} = "1"