diff options
| -rw-r--r-- | meta/classes/kernel-arch.bbclass | 13 | ||||
| -rw-r--r-- | meta/classes/kernel.bbclass | 16 | ||||
| -rw-r--r-- | meta/classes/module-base.bbclass | 16 |
3 files changed, 14 insertions, 31 deletions
diff --git a/meta/classes/kernel-arch.bbclass b/meta/classes/kernel-arch.bbclass index b3b78b6278..a51e82b6c4 100644 --- a/meta/classes/kernel-arch.bbclass +++ b/meta/classes/kernel-arch.bbclass | |||
| @@ -43,3 +43,16 @@ def map_uboot_arch(a, d): | |||
| 43 | 43 | ||
| 44 | export UBOOT_ARCH = "${@map_uboot_arch(d.getVar('ARCH', True), d)}" | 44 | export UBOOT_ARCH = "${@map_uboot_arch(d.getVar('ARCH', True), d)}" |
| 45 | 45 | ||
| 46 | # Set TARGET_??_KERNEL_ARCH in the machine .conf to set architecture | ||
| 47 | # specific options necessary for building the kernel and modules. | ||
| 48 | TARGET_CC_KERNEL_ARCH ?= "" | ||
| 49 | HOST_CC_KERNEL_ARCH ?= "${TARGET_CC_KERNEL_ARCH}" | ||
| 50 | TARGET_LD_KERNEL_ARCH ?= "" | ||
| 51 | HOST_LD_KERNEL_ARCH ?= "${TARGET_LD_KERNEL_ARCH}" | ||
| 52 | TARGET_AR_KERNEL_ARCH ?= "" | ||
| 53 | HOST_AR_KERNEL_ARCH ?= "${TARGET_AR_KERNEL_ARCH}" | ||
| 54 | |||
| 55 | KERNEL_CC = "${CC} ${HOST_CC_KERNEL_ARCH}" | ||
| 56 | KERNEL_LD = "${LD} ${HOST_LD_KERNEL_ARCH}" | ||
| 57 | KERNEL_AR = "${AR} ${HOST_AR_KERNEL_ARCH}" | ||
| 58 | |||
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index d459569677..e2a582b9e9 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | inherit linux-kernel-base module_strip | 1 | inherit linux-kernel-base module_strip |
| 2 | 2 | ||
| 3 | PROVIDES += "virtual/kernel" | 3 | PROVIDES += "virtual/kernel" |
| 4 | DEPENDS += "virtual/${TARGET_PREFIX}gcc kmod-native virtual/${TARGET_PREFIX}gcc${KERNEL_CCSUFFIX}" | 4 | DEPENDS += "virtual/${TARGET_PREFIX}gcc kmod-native" |
| 5 | 5 | ||
| 6 | # we include gcc above, we dont need virtual/libc | 6 | # we include gcc above, we dont need virtual/libc |
| 7 | INHIBIT_DEFAULT_DEPS = "1" | 7 | INHIBIT_DEFAULT_DEPS = "1" |
| @@ -37,20 +37,6 @@ KERNEL_PRIORITY ?= "${@int(d.getVar('PV',1).split('-')[0].split('+')[0].split('. | |||
| 37 | 37 | ||
| 38 | KERNEL_RELEASE ?= "${KERNEL_VERSION}" | 38 | KERNEL_RELEASE ?= "${KERNEL_VERSION}" |
| 39 | 39 | ||
| 40 | KERNEL_CCSUFFIX ?= "" | ||
| 41 | KERNEL_LDSUFFIX ?= "" | ||
| 42 | |||
| 43 | # Set TARGET_??_KERNEL_ARCH in the machine .conf to set architecture | ||
| 44 | # specific options necessary for building the kernel and modules. | ||
| 45 | #FIXME: should be this: TARGET_CC_KERNEL_ARCH ?= "${TARGET_CC_ARCH}" | ||
| 46 | TARGET_CC_KERNEL_ARCH ?= "" | ||
| 47 | HOST_CC_KERNEL_ARCH ?= "${TARGET_CC_KERNEL_ARCH}" | ||
| 48 | TARGET_LD_KERNEL_ARCH ?= "" | ||
| 49 | HOST_LD_KERNEL_ARCH ?= "${TARGET_LD_KERNEL_ARCH}" | ||
| 50 | |||
| 51 | KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX} ${HOST_CC_KERNEL_ARCH}${TOOLCHAIN_OPTIONS}" | ||
| 52 | KERNEL_LD = "${HOST_PREFIX}ld${KERNEL_LDSUFFIX} ${HOST_LD_KERNEL_ARCH}${TOOLCHAIN_OPTIONS}" | ||
| 53 | |||
| 54 | # Where built kernel lies in the kernel tree | 40 | # Where built kernel lies in the kernel tree |
| 55 | KERNEL_OUTPUT ?= "arch/${ARCH}/boot/${KERNEL_IMAGETYPE}" | 41 | KERNEL_OUTPUT ?= "arch/${ARCH}/boot/${KERNEL_IMAGETYPE}" |
| 56 | KERNEL_IMAGEDEST = "boot" | 42 | KERNEL_IMAGEDEST = "boot" |
diff --git a/meta/classes/module-base.bbclass b/meta/classes/module-base.bbclass index 210c47ccd9..cfee50a598 100644 --- a/meta/classes/module-base.bbclass +++ b/meta/classes/module-base.bbclass | |||
| @@ -7,22 +7,6 @@ export CROSS_COMPILE = "${TARGET_PREFIX}" | |||
| 7 | 7 | ||
| 8 | export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}" | 8 | export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}" |
| 9 | KERNEL_OBJECT_SUFFIX = ".ko" | 9 | KERNEL_OBJECT_SUFFIX = ".ko" |
| 10 | KERNEL_CCSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-ccsuffix')}" | ||
| 11 | KERNEL_LDSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-ldsuffix')}" | ||
| 12 | KERNEL_ARSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-arsuffix')}" | ||
| 13 | |||
| 14 | # Set TARGET_??_KERNEL_ARCH in the machine .conf to set architecture | ||
| 15 | # specific options necessary for building the kernel and modules. | ||
| 16 | TARGET_CC_KERNEL_ARCH ?= "" | ||
| 17 | HOST_CC_KERNEL_ARCH ?= "${TARGET_CC_KERNEL_ARCH}" | ||
| 18 | TARGET_LD_KERNEL_ARCH ?= "" | ||
| 19 | HOST_LD_KERNEL_ARCH ?= "${TARGET_LD_KERNEL_ARCH}" | ||
| 20 | TARGET_AR_KERNEL_ARCH ?= "" | ||
| 21 | HOST_AR_KERNEL_ARCH ?= "${TARGET_AR_KERNEL_ARCH}" | ||
| 22 | |||
| 23 | KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX} ${HOST_CC_KERNEL_ARCH}" | ||
| 24 | KERNEL_LD = "${HOST_PREFIX}ld${KERNEL_LDSUFFIX} ${HOST_LD_KERNEL_ARCH}" | ||
| 25 | KERNEL_AR = "${HOST_PREFIX}ar${KERNEL_ARSUFFIX} ${HOST_AR_KERNEL_ARCH}" | ||
| 26 | 10 | ||
| 27 | # kernel modules are generally machine specific | 11 | # kernel modules are generally machine specific |
| 28 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 12 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
