From 5461dda2ce7523d5c3b614bc56ab27633f509da6 Mon Sep 17 00:00:00 2001 From: Andrei Gherzan Date: Thu, 13 May 2021 15:02:07 +0100 Subject: [PATCH] zephyr-qemuboot.bbclass: Don't overwrite the entire elf dictionary key The nios2_machdata_setfunc was overwriting the elf key in matchdata for arc done in arc_machdata_setfunc which in turn was overwriting the one from oe-core. This is making qemu-x86 builds (as an example) unbuildable: Exception: KeyError: 'i586' This patch makes sure that the changes complement the machdata dictionary as opposed to overwriting the entire "elf" key. Signed-off-by: Andrei Gherzan Signed-off-by: Naveen Saini --- classes/siteinfo-zephyr.bbclass | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/classes/siteinfo-zephyr.bbclass b/classes/siteinfo-zephyr.bbclass index d84fd3a..b84a9b2 100644 --- a/classes/siteinfo-zephyr.bbclass +++ b/classes/siteinfo-zephyr.bbclass @@ -1,4 +1,3 @@ - def arc_siteinfo_setfunc(archinfo, osinfo, targetinfo, d): archinfo['arc'] = "endian-little bit-32 " osinfo['linux'] = "common-linux common-glibc" @@ -8,7 +7,7 @@ def arc_siteinfo_setfunc(archinfo, osinfo, targetinfo, d): SITEINFO_EXTRA_DATAFUNCS += "arc_siteinfo_setfunc" def arc_machdata_setfunc(machdata, d): - machdata["elf"] = { "arc" : (195, 0, 0, True, 32), } + machdata["elf"]["arc"] = (195, 0, 0, True, 32) return machdata PACKAGEQA_EXTRA_MACHDEFFUNCS += "arc_machdata_setfunc" @@ -22,7 +21,7 @@ def iamcu_siteinfo_setfunc(archinfo, osinfo, targetinfo, d): SITEINFO_EXTRA_DATAFUNCS += "iamcu_siteinfo_setfunc" def nios2_machdata_setfunc(machdata, d): - machdata["elf"] = {"nios2": (113, 0, 0, True, 32), } + machdata["elf"]["nios2"] = (113, 0, 0, True, 32) return machdata -PACKAGEQA_EXTRA_MACHDEFFUNCS += "nios2_machdata_setfunc" \ No newline at end of file +PACKAGEQA_EXTRA_MACHDEFFUNCS += "nios2_machdata_setfunc"