INHIBIT_DEFAULT_DEPS = "1"
DEPENDS += "dtc-native"
-inherit deploy kernel-arch
+inherit deploy
+
+export ARCH = "${@oe.kernel.map_kernel_arch(d)}"
COMPATIBLE_MACHINE ?= "^$"
# SPDX-License-Identifier: MIT
#
-# set the ARCH environment variable for kernel compilation (including
-# modules). return value must match one of the architecture directories
-# in the kernel source "arch" directory
-export ARCH = "${@oe.kernel.map_kernel_arch(d)}"
-
# Set TARGET_??_KERNEL_ARCH in the machine .conf to set architecture
# specific options necessary for building the kernel and modules.
TARGET_CC_KERNEL_ARCH ?= ""
inherit linux-kernel-base kernel-module-split features_check
+ARCH = "${@oe.kernel.map_kernel_arch(d)}"
+
COMPATIBLE_HOST = ".*-linux"
# Linux has a minimum ISA requires on riscv, see arch/riscv/Makefile
# Some Linux kernel configurations need additional parameters on the command line
KERNEL_EXTRA_ARGS ?= ""
+EXTRA_OEMAKE += ' ARCH="${@oe.kernel.map_kernel_arch(d)}"'
EXTRA_OEMAKE += ' CC="${KERNEL_CC}" LD="${KERNEL_LD}" OBJCOPY="${KERNEL_OBJCOPY}" STRIP="${KERNEL_STRIP}"'
EXTRA_OEMAKE += ' HOSTCC="${BUILD_CC}" HOSTCFLAGS="${BUILD_CFLAGS}" HOSTLDFLAGS="${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}"'
EXTRA_OEMAKE += ' HOSTCXX="${BUILD_CXX}" HOSTCXXFLAGS="${BUILD_CXXFLAGS}"'
# in sstate, so we must force do_compile to run (once).
do_configure[depends] += "make-mod-scripts:do_compile"
+export ARCH = "${@oe.kernel.map_kernel_arch(d)}"
export OS = "${TARGET_OS}"
export CROSS_COMPILE = "${TARGET_PREFIX}"
INHIBIT_DEFAULT_DEPS = "1"
DEPENDS += "virtual/cross-cc virtual/cross-binutils"
-EXTRA_OEMAKE = " HOSTCC="${BUILD_CC}" HOSTCFLAGS="${BUILD_CFLAGS}" HOSTLDFLAGS="${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}""
+EXTRA_OEMAKE = ' ARCH="${@oe.kernel.map_kernel_arch(d)}"'
+EXTRA_OEMAKE += " HOSTCC="${BUILD_CC}" HOSTCFLAGS="${BUILD_CFLAGS}" HOSTLDFLAGS="${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}""
EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}" CROSS_COMPILE=${TARGET_PREFIX}"
KERNEL_LOCALVERSION = "${@oe.kernel.get_localversion_file("${STAGING_KERNEL_BUILDDIR}")}"
inherit linux-kernel-base kernel-arch manpages pkgconfig
+ARCH = "${@oe.kernel.map_kernel_arch(d)}"
+
# needed for building the tools/perf Python bindings
inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3targetconfig', '', d)}
inherit python3-dir