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 PR = "${MACHINE_KERNEL_PR}"
12 export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}"
13 export KERNEL_SOURCE = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-source')}"
14 KERNEL_OBJECT_SUFFIX = "${@[".o", ".ko"][base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion') > "2.6.0"]}"
15 KERNEL_CCSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-ccsuffix')}"
16 KERNEL_LDSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-ldsuffix')}"
17 KERNEL_ARSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-arsuffix')}"
19 # Set TARGET_??_KERNEL_ARCH in the machine .conf to set architecture
20 # specific options necessary for building the kernel and modules.
21 TARGET_CC_KERNEL_ARCH ?= ""
22 HOST_CC_KERNEL_ARCH ?= "${TARGET_CC_KERNEL_ARCH}"
23 TARGET_LD_KERNEL_ARCH ?= ""
24 HOST_LD_KERNEL_ARCH ?= "${TARGET_LD_KERNEL_ARCH}"
25 TARGET_AR_KERNEL_ARCH ?= ""
26 HOST_AR_KERNEL_ARCH ?= "${TARGET_AR_KERNEL_ARCH}"
28 KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX} ${HOST_CC_KERNEL_ARCH}"
29 KERNEL_LD = "${LD}${KERNEL_LDSUFFIX} ${HOST_LD_KERNEL_ARCH}"
30 KERNEL_AR = "${AR}${KERNEL_ARSUFFIX} ${HOST_AR_KERNEL_ARCH}"
32 # kernel modules are generally machine specific
33 PACKAGE_ARCH = "${MACHINE_ARCH}"