meta-zephyr: Select BOARD via MACHINE

The meaning of BOARD in Zephyr environment is equivalent to MACHINE
in Yocto environment.
Specifying MACHINE will implicitly determine cross-compiler toolchain as well.

There is 1:1 correspondence between Zephyr BOARD and Yocto MACHINE so
a lookup table BOARD:MACHINE may be needed in the future, presently all
that is required is to convert "-" to "_". (Dash to undersocre)

This means that in order to support a new Zephyr board, we simply need to
create a corresponding MACHINE.conf file.

[YOCTO#10894]

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
This commit is contained in:
Juro Bystricky
2017-01-10 16:36:28 -08:00
parent 3a0d83fe89
commit 7c3f7c10de
2 changed files with 3 additions and 2 deletions

View File

@@ -11,5 +11,3 @@ TCLIBCAPPEND = ""
TEST_TARGET = "QemuTargetZephyr"
TEST_SUITES = "zephyr"
BOARD_arm ?= "qemu_cortex_m3"
BOARD_x86 ?= "qemu_x86"

View File

@@ -4,6 +4,9 @@
# filesystem.
IMAGE_NO_MANIFEST = "1"
# Zephyr BOARD is basically our MACHINE, except we must use "-" instead of "_"
BOARD="$(echo ${MACHINE} | tr - _)"
# oe_runmake isn't used because of the make -e causing issues with some
# make variables.
MAKE_COMMAND = "make -j V=1 BOARD=${BOARD} CROSS_COMPILE=${CROSS_COMPILE}"