Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | inherit module-base kernel-module-split |
| 2 | |
| 3 | addtask make_scripts after do_patch before do_compile |
| 4 | do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock" |
| 5 | do_make_scripts[depends] += "virtual/kernel:do_shared_workdir" |
| 6 | |
| 7 | EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_DIR}" |
| 8 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 9 | MODULES_INSTALL_TARGET ?= "modules_install" |
| 10 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 11 | module_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 | |
| 21 | module_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 Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 26 | ${MODULES_INSTALL_TARGET} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 27 | } |
| 28 | |
| 29 | EXPORT_FUNCTIONS do_compile do_install |
| 30 | |
| 31 | # add all splitted modules to PN RDEPENDS, PN can be empty now |
| 32 | KERNEL_MODULES_META_PACKAGE = "${PN}" |
| 33 | FILES_${PN} = "" |
| 34 | ALLOW_EMPTY_${PN} = "1" |