Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame^] | 1 | inherit kernel-arch |
| 2 | |
| 3 | # This is instead of DEPENDS = "virtual/kernel" |
| 4 | do_configure[depends] += "virtual/kernel:do_shared_workdir" |
| 5 | |
| 6 | export OS = "${TARGET_OS}" |
| 7 | export CROSS_COMPILE = "${TARGET_PREFIX}" |
| 8 | |
| 9 | # This points to the build artefacts from the main kernel build |
| 10 | # such as .config and System.map |
| 11 | # Confusingly it is not the module build output (which is ${B}) but |
| 12 | # we didn't pick the name. |
| 13 | export KBUILD_OUTPUT = "${STAGING_KERNEL_BUILDDIR}" |
| 14 | |
| 15 | export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_BUILDDIR}/kernel-abiversion')}" |
| 16 | KERNEL_OBJECT_SUFFIX = ".ko" |
| 17 | |
| 18 | # kernel modules are generally machine specific |
| 19 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 20 | |
| 21 | # Function to ensure the kernel scripts are created. Expected to |
| 22 | # be called before do_compile. See module.bbclass for an exmaple. |
| 23 | do_make_scripts() { |
| 24 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS |
| 25 | make CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \ |
| 26 | -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} scripts |
| 27 | } |