mirror of
https://git.yoctoproject.org/meta-zephyr
synced 2026-09-12 09:49:32 +02:00
Machines not inheriting zephyr-qemuboot did not have IMGDEPLOYDIR variable set, which is required for building zephyr-kernel-test-all. The build was fine for qemu-xxx machines, but for physical boards it failed somewhere inside python code when .join() got an empty argument incoming from IMGDEPLOYDIR. Move IMGDEPLOYDIR to zephyr class, so it's defined for qemu and non-qemu machines. Signed-off-by: Wojciech Zmuda <wojciech.zmuda@huawei.com> Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
56 lines
1.9 KiB
Plaintext
56 lines
1.9 KiB
Plaintext
inherit terminal
|
|
|
|
OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS TERMINFO CROSS_CURSES_LIB CROSS_CURSES_INC"
|
|
HOST_EXTRACFLAGS = "${BUILD_CFLAGS} ${BUILD_LDFLAGS}"
|
|
HOSTLDFLAGS = "${BUILD_LDFLAGS}"
|
|
CROSS_CURSES_LIB = "-lncurses -ltinfo"
|
|
CROSS_CURSES_INC = '-DCURSES_LOC="<curses.h>"'
|
|
TERMINFO = "${STAGING_DATADIR_NATIVE}/terminfo"
|
|
|
|
KCONFIG_CONFIG_COMMAND ??= "menuconfig"
|
|
ZEPHYR_BOARD ?= "${MACHINE}"
|
|
|
|
# qemuboot writes into IMGDEPLOYDIR, force to write to DEPLOY_DIR_IMAGE
|
|
IMGDEPLOYDIR = "${DEPLOY_DIR_IMAGE}"
|
|
|
|
python () {
|
|
# Translate MACHINE into Zephyr BOARD
|
|
# Zephyr BOARD is basically our MACHINE, except we must use "-" instead of "_"
|
|
board = d.getVar('ZEPHYR_BOARD', True)
|
|
board = board.replace('-', '_')
|
|
d.setVar('BOARD',board)
|
|
}
|
|
|
|
python do_menuconfig() {
|
|
os.chdir(d.getVar('ZEPHYR_SRC_DIR', True))
|
|
configdir = d.getVar('ZEPHYR_SRC_DIR', True) + '/outdir/' + d.getVar('BOARD', True)
|
|
try:
|
|
mtime = os.path.getmtime(configdir +"/.config")
|
|
except OSError:
|
|
mtime = 0
|
|
|
|
oe_terminal("${SHELL} -c \"ZEPHYR_BASE=%s make BOARD=%s %s; if [ \$? -ne 0 ]; then echo 'Command failed.'; \
|
|
printf 'Press any key to continue... '; \
|
|
read r; fi\"" % (d.getVar('ZEPHYR_BASE', True), d.getVar('BOARD', True),d.getVar('KCONFIG_CONFIG_COMMAND', True)),
|
|
d.getVar('PN', True) + ' Configuration', d)
|
|
|
|
try:
|
|
newmtime = os.path.getmtime(configdir +"/.config")
|
|
except OSError:
|
|
newmtime = 0
|
|
|
|
if newmtime > mtime:
|
|
bb.warn("Configuration changed, recompile will be forced")
|
|
bb.build.write_taint('do_compile', d)
|
|
}
|
|
do_menuconfig[depends] += "ncurses-native:do_populate_sysroot"
|
|
do_menuconfig[nostamp] = "1"
|
|
do_menuconfig[dirs] = "${B}"
|
|
addtask menuconfig after do_configure
|
|
|
|
python do_devshell_prepend () {
|
|
# Most likely we need to manually edit prj.conf...
|
|
os.chdir(d.getVar('ZEPHYR_SRC_DIR', True))
|
|
}
|
|
|