blob: 01c9309eb0efba2ad1d07f8164fa2bfcae44caaa [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
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05009MODULES_INSTALL_TARGET ?= "modules_install"
10
Patrick Williamsc124f4f2015-09-15 14:41:29 -050011module_do_compile() {
12 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
13 oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
14 KERNEL_VERSION=${KERNEL_VERSION} \
15 CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
16 AR="${KERNEL_AR}" \
17 O=${STAGING_KERNEL_BUILDDIR} \
18 ${MAKE_TARGETS}
19}
20
21module_do_install() {
22 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
23 oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" \
24 CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
25 O=${STAGING_KERNEL_BUILDDIR} \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050026 ${MODULES_INSTALL_TARGET}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050027}
28
29EXPORT_FUNCTIONS do_compile do_install
30
31# add all splitted modules to PN RDEPENDS, PN can be empty now
32KERNEL_MODULES_META_PACKAGE = "${PN}"
33FILES_${PN} = ""
34ALLOW_EMPTY_${PN} = "1"