5 export OS = "${TARGET_OS}"
6 export CROSS_COMPILE = "${TARGET_PREFIX}"
8 # A machine.conf or local.conf can increase MACHINE_KERNEL_PR to force
9 # rebuilds for kernel and external modules
10 python __anonymous () {
11 machine_kernel_pr = bb.data.getVar('MACHINE_KERNEL_PR', d, True)
14 bb.data.setVar('PR', machine_kernel_pr, d)
17 export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}"
18 export KERNEL_SOURCE = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-source')}"
19 KERNEL_OBJECT_SUFFIX = "${@[".o", ".ko"][base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion') > "2.6.0"]}"
20 KERNEL_CCSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-ccsuffix')}"
21 KERNEL_LDSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-ldsuffix')}"
22 KERNEL_ARSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-arsuffix')}"
24 # Set TARGET_??_KERNEL_ARCH in the machine .conf to set architecture
25 # specific options necessary for building the kernel and modules.
26 TARGET_CC_KERNEL_ARCH ?= ""
27 HOST_CC_KERNEL_ARCH ?= "${TARGET_CC_KERNEL_ARCH}"
28 TARGET_LD_KERNEL_ARCH ?= ""
29 HOST_LD_KERNEL_ARCH ?= "${TARGET_LD_KERNEL_ARCH}"
30 TARGET_AR_KERNEL_ARCH ?= ""
31 HOST_AR_KERNEL_ARCH ?= "${TARGET_AR_KERNEL_ARCH}"
33 KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX} ${HOST_CC_KERNEL_ARCH}"
34 KERNEL_LD = "${LD}${KERNEL_LDSUFFIX} ${HOST_LD_KERNEL_ARCH}"
35 KERNEL_AR = "${AR}${KERNEL_ARSUFFIX} ${HOST_AR_KERNEL_ARCH}"
37 # kernel modules are generally machine specific
38 PACKAGE_ARCH = "${MACHINE_ARCH}"