mirror of
https://git.yoctoproject.org/meta-zephyr
synced 2026-09-15 00:49:31 +02:00
meta-zephyr current passes an ARCH variable to the CMake build It's widely believed this is no longer necessary as it is inferred from the BOARD variable Signed-off-by: Ben Cownley <ben.cownley@arm.com> Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
57 lines
1.3 KiB
PHP
57 lines
1.3 KiB
PHP
# Common settings for all Zephyr recipes
|
|
|
|
ZEPHYR_INHERIT_CLASSES += "zephyr cmake"
|
|
inherit ${ZEPHYR_INHERIT_CLASSES}
|
|
|
|
# There shouldn't be a manifest for zephyr kernels since there is no root
|
|
# filesystem.
|
|
IMAGE_NO_MANIFEST = "1"
|
|
|
|
ZEPHYR_TOOLCHAIN_VARIANT ?= "cross-compile"
|
|
require zephyr-toolchain-${ZEPHYR_TOOLCHAIN_VARIANT}.inc
|
|
|
|
ZEPHYR_MAKE_OUTPUT ?= "\
|
|
zephyr.elf \
|
|
zephyr.bin \
|
|
zephyr.efi \
|
|
"
|
|
|
|
EXTRA_OECMAKE = "\
|
|
-DZEPHYR_BASE=${ZEPHYR_BASE} \
|
|
-DBOARD=${BOARD} \
|
|
-DZEPHYR_TOOLCHAIN_VARIANT=${ZEPHYR_TOOLCHAIN_VARIANT} \
|
|
-DZEPHYR_MODULES=${ZEPHYR_MODULES} \
|
|
"
|
|
|
|
ZEPHYR_EXTRA_MODULES = ""
|
|
|
|
EXTRA_OECMAKE:append = " -DZEPHYR_EXTRA_MODULES=${ZEPHYR_EXTRA_MODULES}"
|
|
|
|
export ZEPHYR_BASE="${S}/zephyr"
|
|
|
|
DEPENDS += "gperf-native"
|
|
|
|
DEPENDS:append:qemuall = " qemu-native qemu-helper-native"
|
|
|
|
# The makefiles are explicit about the flags they want, so don't unset
|
|
# them so zephyr flags actually get used.
|
|
# This is done here rather than in the task so that things still work
|
|
# in devshell.
|
|
|
|
python () {
|
|
d.delVar('CFLAGS')
|
|
d.delVar('CXXFLAGS')
|
|
d.delVar('LDFLAGS')
|
|
}
|
|
|
|
OE_TERMINAL_EXPORTS += "BOARD"
|
|
OE_TERMINAL_EXPORTS += "ZEPHYR_SRC_DIR"
|
|
OE_TERMINAL_EXPORTS += "ZEPHYR_BASE"
|
|
|
|
IMAGE_FSTYPES = "elf bin"
|
|
|
|
do_configure:prepend() {
|
|
# Zephyr expects CPPFLAGS as cmake argument as and ignores env variables.
|
|
unset CPPFLAGS
|
|
}
|