b145480d44
Quite a few external kernel modules I've found floating around don't have a modules_install target, but they do have an install target that basically differs only in name. To make it easier to build these just make this a MODULES_INSTALL_TARGET variable that you can set from the recipe - the alternative would be copy-and-paste the do_install definition from this class which is potentially fragile. (From OE-Core rev: effa6ce777540c5557e5cf904b48cc3369ee3f9f) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
35 lines
1 KiB
Text
35 lines
1 KiB
Text
inherit module-base kernel-module-split
|
|
|
|
addtask make_scripts after do_patch before do_compile
|
|
do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
|
|
do_make_scripts[depends] += "virtual/kernel:do_shared_workdir"
|
|
|
|
EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_DIR}"
|
|
|
|
MODULES_INSTALL_TARGET ?= "modules_install"
|
|
|
|
module_do_compile() {
|
|
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
|
|
oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
|
|
KERNEL_VERSION=${KERNEL_VERSION} \
|
|
CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
|
|
AR="${KERNEL_AR}" \
|
|
O=${STAGING_KERNEL_BUILDDIR} \
|
|
${MAKE_TARGETS}
|
|
}
|
|
|
|
module_do_install() {
|
|
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
|
|
oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" \
|
|
CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
|
|
O=${STAGING_KERNEL_BUILDDIR} \
|
|
${MODULES_INSTALL_TARGET}
|
|
}
|
|
|
|
EXPORT_FUNCTIONS do_compile do_install
|
|
|
|
# add all splitted modules to PN RDEPENDS, PN can be empty now
|
|
KERNEL_MODULES_META_PACKAGE = "${PN}"
|
|
FILES_${PN} = ""
|
|
ALLOW_EMPTY_${PN} = "1"
|