Files
meta-zephyr/classes/zephyr-qemuboot.bbclass
Wojciech Zmuda 4814135be3 classes: build zephyr-kernel-test-all for non-qemu boards
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>
2020-12-14 08:16:12 +08:00

38 lines
1.1 KiB
Plaintext

inherit qemuboot
KERNEL_IMAGETYPE = "${PN}.elf"
QB_DEFAULT_FSTYPE = "elf"
QB_NETWORK_DEVICE = "none"
QB_NET = "none"
QB_ROOTFS = "none"
IMAGE_LINK_NAME = "${PN}-image-${MACHINE}"
# Create a link with "-image-" in the name just to keep runqemu happy
QEMU_IMAGE_LINK = "${DEPLOY_DIR_IMAGE}/${PN}-image-${MACHINE}.elf"
CLEANFUNCS += "bootconf_clean"
python bootconf_clean() {
import glob
files = glob.glob(d.getVar('IMGDEPLOYDIR', True)+'/'+ d.getVar('PN', True) + '*.qemuboot.conf')
for f in files:
os.remove(f)
qemuimage_link = d.getVar('QEMU_IMAGE_LINK', True)
if os.path.lexists(qemuimage_link):
os.remove(qemuimage_link)
}
python do_bootconf_write() {
bb.build.exec_func("do_write_qemuboot_conf", d)
qemuimage = "%s/%s.elf" % (d.getVar('DEPLOY_DIR_IMAGE', True), d.getVar('PN', True))
qemuimage_link = d.getVar('QEMU_IMAGE_LINK', True)
if os.path.lexists(qemuimage_link):
os.remove(qemuimage_link)
os.symlink(os.path.basename(qemuimage), qemuimage_link)
}
addtask do_bootconf_write before do_build after do_deploy