summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Mason <jdmason@kudzu.us>2020-09-28 18:26:20 -0400
committerNaveen Saini <naveen.kumar.saini@intel.com>2020-09-29 15:46:42 +0800
commit0f75e5e827c6e564800bdaf6688e1be2d91bc083 (patch)
tree22490d2f1e692c98f27c80bee0f55df07f18f495
parent887da6a9f0eec608297f635d8e9de2cdef4bffd5 (diff)
downloadmeta-zephyr-0f75e5e827c6e564800bdaf6688e1be2d91bc083.tar.gz
meta-zephyr-0f75e5e827c6e564800bdaf6688e1be2d91bc083.tar.bz2
meta-zephyr-0f75e5e827c6e564800bdaf6688e1be2d91bc083.zip
zephyr.bbclass: Add ability to set board
Currently, there is no ability to set the board used by Zephyr. This limits the ability to set the board to something other than the machine name. By setting up an intermediate variable, ZEPHYR_BOARD, this can be set by those that know better (with the default to use the machine name as before). Signed-off-by: Jon Mason <jon.mason@arm.com>
-rw-r--r--classes/zephyr.bbclass5
1 files changed, 2 insertions, 3 deletions
diff --git a/classes/zephyr.bbclass b/classes/zephyr.bbclass
index 3ea0746..ead762a 100644
--- a/classes/zephyr.bbclass
+++ b/classes/zephyr.bbclass
@@ -1,5 +1,3 @@
-
-
inherit terminal
OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS TERMINFO CROSS_CURSES_LIB CROSS_CURSES_INC"
@@ -10,11 +8,12 @@ CROSS_CURSES_INC = '-DCURSES_LOC="<curses.h>"'
TERMINFO = "${STAGING_DATADIR_NATIVE}/terminfo"
KCONFIG_CONFIG_COMMAND ??= "menuconfig"
+ZEPHYR_BOARD ?= "${MACHINE}"
python () {
# Translate MACHINE into Zephyr BOARD
# Zephyr BOARD is basically our MACHINE, except we must use "-" instead of "_"
- board = d.getVar('MACHINE',True)
+ board = d.getVar('ZEPHYR_BOARD', True)
board = board.replace('-', '_')
d.setVar('BOARD',board)
}