Yocto Project Discussions
 help / color / mirror / Atom feed
* [meta-zephyr][PATCH] zephyr.bbclass: Add ability to set board
@ 2020-09-28 22:26 Jon Mason
  0 siblings, 0 replies; only message in thread
From: Jon Mason @ 2020-09-28 22:26 UTC (permalink / raw)
  To: yocto

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>
---
 classes/zephyr.bbclass | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/classes/zephyr.bbclass b/classes/zephyr.bbclass
index 3ea074613117..ead762aea11c 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)
 }
-- 
2.20.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-28 22:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-28 22:26 [meta-zephyr][PATCH] zephyr.bbclass: Add ability to set board Jon Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox