diff --git a/.gitmodules b/.gitmodules index 0291eeb2..82386a88 100644 --- a/.gitmodules +++ b/.gitmodules @@ -31,3 +31,12 @@ [submodule "binutils_arc"] path = binutils_arc url = https://github.com/zephyrproject-rtos/binutils-gdb.git +[submodule "qemu"] + path = qemu + url = https://github.com/zephyrproject-rtos/qemu.git +[submodule "qemu_arc"] + path = qemu_arc + url = https://github.com/foss-for-synopsys-dwc-arc-processors/qemu.git +[submodule "qemu_xilinx"] + path = qemu_xilinx + url = https://github.com/zephyrproject-rtos/xilinx-qemu.git diff --git a/meta-zephyr-sdk/recipes-devtools/qemu/qemu-zephyr_git.bb b/meta-zephyr-sdk/recipes-devtools/qemu/qemu-zephyr_git.bb index fb0926d1..f89b4566 100644 --- a/meta-zephyr-sdk/recipes-devtools/qemu/qemu-zephyr_git.bb +++ b/meta-zephyr-sdk/recipes-devtools/qemu/qemu-zephyr_git.bb @@ -37,7 +37,7 @@ inherit pkgconfig systemd python3native LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f" -SRCREV = "fe132ed0c9ae14a56bbf94b1d0d16b029b671c62" +SRCREV = "${ZEPHYR_SDK_QEMU_SRCREV}" SRC_URI = "gitsm://github.com/zephyrproject-rtos/qemu.git;protocol=https;nobranch=1 \ file://powerpc_rom.bin \ file://run-ptest \ diff --git a/meta-zephyr-sdk/recipes-devtools/qemu_arc/qemu-arc_git.bb b/meta-zephyr-sdk/recipes-devtools/qemu_arc/qemu-arc_git.bb index dcf336a8..7f60ae7c 100644 --- a/meta-zephyr-sdk/recipes-devtools/qemu_arc/qemu-arc_git.bb +++ b/meta-zephyr-sdk/recipes-devtools/qemu_arc/qemu-arc_git.bb @@ -5,7 +5,7 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f" -SRCREV = "b46c4ec2d07a4c56c426b3d48195d6f2902226e5" +SRCREV = "${ZEPHYR_SDK_QEMU_ARC_SRCREV}" SRC_URI = "gitsm://github.com/foss-for-synopsys-dwc-arc-processors/qemu.git;protocol=https;nobranch=1 \ file://cross.patch \ " diff --git a/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/0001-Revert-target-arm-Enforce-alignment-for-LDM-STM.patch b/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/0001-Revert-target-arm-Enforce-alignment-for-LDM-STM.patch deleted file mode 100644 index d8d34997..00000000 --- a/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/0001-Revert-target-arm-Enforce-alignment-for-LDM-STM.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 0d89d9811f25f757952ce098dcdf14c9465d2b65 Mon Sep 17 00:00:00 2001 -Message-ID: <0d89d9811f25f757952ce098dcdf14c9465d2b65.1747663373.git.michal.simek@amd.com> -From: Michal Simek -Date: Mon, 19 May 2025 15:17:52 +0200 -Subject: [PATCH] Revert "target/arm: Enforce alignment for LDM/STM" - -This reverts commit 9d7eb4183a17f129478adbdc314468d84573d83c. - -An alignment fault is generated if a data access is performed to an address -that is not aligned for the size of the access, and strict alignment is -required for the access. -https://developer.arm.com/documentation/ddi0460/d/Memory-Protection-Unit/MPU-faults/Alignment-fault?lang=en - -The Qemu patch is likely correct and Zephyr test should be fixed but in the -meantime revert this patch to pass tests in CI to give a time to find out -what's wrong with Zephyr test. - -When this patch is revert issue is visible by this test: -west twister -v -p qemu_cortex_r5 -O /tmp/twister -T tests/misc/llext-edk/ - -Signed-off-by: Michal Simek ---- - target/arm/tcg/translate.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/target/arm/tcg/translate.c b/target/arm/tcg/translate.c -index e555e885a13e..2b3ac25c71cd 100644 ---- a/target/arm/tcg/translate.c -+++ b/target/arm/tcg/translate.c -@@ -7927,7 +7927,7 @@ static bool op_stm(DisasContext *s, arg_ldst_block *a) - } else { - tmp = load_reg(s, i); - } -- gen_aa32_st_i32(s, tmp, addr, mem_idx, MO_UL | MO_ALIGN); -+ gen_aa32_st32(s, tmp, addr, mem_idx); - - /* No need to add after the last transfer. */ - if (++j != n) { -@@ -8009,7 +8009,7 @@ static bool do_ldm(DisasContext *s, arg_ldst_block *a) - } - - tmp = tcg_temp_new_i32(); -- gen_aa32_ld_i32(s, tmp, addr, mem_idx, MO_UL | MO_ALIGN); -+ gen_aa32_ld32u(s, tmp, addr, mem_idx); - if (user) { - gen_helper_set_user_reg(tcg_env, tcg_constant_i32(i), tmp); - } else if (i == a->rn) { --- -2.43.0 - diff --git a/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/0001-Revert-target-arm-Revert-back-to-YIELD-for-WFI.patch b/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/0001-Revert-target-arm-Revert-back-to-YIELD-for-WFI.patch deleted file mode 100644 index e7657d1b..00000000 --- a/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/0001-Revert-target-arm-Revert-back-to-YIELD-for-WFI.patch +++ /dev/null @@ -1,40 +0,0 @@ -From ab42d46c10d4e24cd19fb3339fc2738ba7b4a45e Mon Sep 17 00:00:00 2001 -Message-ID: -From: Stephanos Ioannidis -Date: Wed, 8 Jan 2020 17:47:05 +0900 -Subject: [PATCH] Revert "target/arm: Revert back to YIELD for WFI" - -This reverts commit 5f38ea92fb697b94ad43f01fe162f3ed6e6b0e16. - -The commit 5f38ea92fb697b94ad43f01fe162f3ed6e6b0e16 was probably -introduced in order to improve emulation performance, as well as to -address the stability issue when running co-simulations (refer to the -commit 708639f72be2a9425992ae9dc4b9a098dc804c94). - -This, unfortunately, breaks the WFI instruction; i.e. CPU is not halted -and keeps running regardless of whether an interrupt occurs, and this -is a problem for the Zephyr CI tests that expect the WFI instruction to -do its job (in particular, tests/kernel/context is broken because of -this change). - -Signed-off-by: Stephanos Ioannidis ---- - target/arm/tcg/op_helper.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/target/arm/tcg/op_helper.c b/target/arm/tcg/op_helper.c -index 1e9ff35f0c30..67add5c6973c 100644 ---- a/target/arm/tcg/op_helper.c -+++ b/target/arm/tcg/op_helper.c -@@ -353,7 +353,7 @@ void HELPER(wfi)(CPUARMState *env, uint32_t insn_len) - } - - qemu_mutex_lock_iothread(); -- if (use_icount || 1) { -+ if (use_icount) { - cs->exception_index = EXCP_YIELD; - } else { - cs->halted = 1; --- -2.43.0 - diff --git a/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/0002-Enable-WFI-CPU-halting-in-icount-mode.patch b/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/0002-Enable-WFI-CPU-halting-in-icount-mode.patch deleted file mode 100644 index 95d29efe..00000000 --- a/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/0002-Enable-WFI-CPU-halting-in-icount-mode.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 393c4e5f40fb4592b3cf8247feee73538f541437 Mon Sep 17 00:00:00 2001 -Message-ID: <393c4e5f40fb4592b3cf8247feee73538f541437.1747662482.git.michal.simek@amd.com> -From: Stephanos Ioannidis -Date: Wed, 26 Feb 2020 12:30:55 +0900 -Subject: [PATCH] Enable WFI CPU halting in icount mode - -This commit enables CPU halting via the WFI instruction in the -icount mode. - -The PetaLinux patch initially disabled WFI CPU halting, possibly for -performance reasons. - -Signed-off-by: Stephanos Ioannidis ---- - target/arm/tcg/op_helper.c | 8 ++------ - 1 file changed, 2 insertions(+), 6 deletions(-) - -diff --git a/target/arm/tcg/op_helper.c b/target/arm/tcg/op_helper.c -index 67add5c6973c..f76c6eb5484e 100644 ---- a/target/arm/tcg/op_helper.c -+++ b/target/arm/tcg/op_helper.c -@@ -353,12 +353,8 @@ void HELPER(wfi)(CPUARMState *env, uint32_t insn_len) - } - - qemu_mutex_lock_iothread(); -- if (use_icount) { -- cs->exception_index = EXCP_YIELD; -- } else { -- cs->halted = 1; -- cs->exception_index = EXCP_HLT; -- } -+ cs->halted = 1; -+ cs->exception_index = EXCP_HLT; - - /* Drive STANDBYWFI only if cpu reset-pin is inactive */ - if (cs->reset_pin == false) { --- -2.43.0 - diff --git a/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/0003-riscvXX-softmmu-Enable-emaclite-driver-for-MB-V.patch b/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/0003-riscvXX-softmmu-Enable-emaclite-driver-for-MB-V.patch deleted file mode 100644 index 09f232f6..00000000 --- a/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/0003-riscvXX-softmmu-Enable-emaclite-driver-for-MB-V.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 42593cded8643f4bd365a51c7d83fec601e49167 Mon Sep 17 00:00:00 2001 -Message-ID: <42593cded8643f4bd365a51c7d83fec601e49167.1747662482.git.michal.simek@amd.com> -From: Michal Simek -Date: Fri, 25 Apr 2025 09:24:48 +0200 -Subject: [PATCH] riscvXX-softmmu: Enable emaclite driver for MB-V - -Emaclite can be also wired with MB-V that's why enable it by default. - -Signed-off-by: Michal Simek -Signed-off-by: Francisco Iglesias ---- - configs/devices/riscv32-softmmu/default.mak | 1 + - configs/devices/riscv64-softmmu/default.mak | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/configs/devices/riscv32-softmmu/default.mak b/configs/devices/riscv32-softmmu/default.mak -index c6c3dcd4431a..7845858ae87c 100644 ---- a/configs/devices/riscv32-softmmu/default.mak -+++ b/configs/devices/riscv32-softmmu/default.mak -@@ -33,6 +33,7 @@ CONFIG_XILINX_IOMODULE_PIT=y - CONFIG_XILINX_IOMODULE_GPI=y - CONFIG_XILINX_IOMODULE_GPO=y - CONFIG_XILINX_IOMODULE_INTC=y -+CONFIG_XILINX_ETHLITE=y - - CONFIG_XLNX_ZYNQMP=y - CONFIG_XLNX_VERSAL=y -diff --git a/configs/devices/riscv64-softmmu/default.mak b/configs/devices/riscv64-softmmu/default.mak -index 4886ca35dcb7..4f5528eeda9a 100644 ---- a/configs/devices/riscv64-softmmu/default.mak -+++ b/configs/devices/riscv64-softmmu/default.mak -@@ -20,6 +20,7 @@ CONFIG_XILINX=y - CONFIG_SSI=y - CONFIG_I2C=y - CONFIG_XILINX_AXI=y -+CONFIG_XILINX_ETHLITE=y - CONFIG_XILINX_SPI=y - CONFIG_XILINX_SPIPS=y - CONFIG_PTIMER=y --- -2.43.0 - diff --git a/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch b/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch deleted file mode 100644 index f981a64a..00000000 --- a/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch +++ /dev/null @@ -1,29 +0,0 @@ -From d8265abdce5dc2bf74b3fccdf2b7257b4f3894f0 Mon Sep 17 00:00:00 2001 -From: He Zhe -Date: Wed, 28 Aug 2019 19:56:28 +0800 -Subject: [PATCH 04/12] configure: Add pkg-config handling for libgcrypt - -libgcrypt may also be controlled by pkg-config, this patch adds pkg-config -handling for libgcrypt. - -Upstream-Status: Denied [https://lists.nongnu.org/archive/html/qemu-devel/2019-08/msg06333.html] - -Signed-off-by: He Zhe - ---- - meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: qemu-8.1.0/meson.build -=================================================================== ---- qemu-8.1.0.orig/meson.build -+++ qemu-8.1.0/meson.build -@@ -1481,7 +1481,7 @@ endif - if not gnutls_crypto.found() - if (not get_option('gcrypt').auto() or have_system) and not get_option('nettle').enabled() - gcrypt = dependency('libgcrypt', version: '>=1.8', -- method: 'config-tool', -+ method: 'pkg-config', - required: get_option('gcrypt')) - # Debian has removed -lgpg-error from libgcrypt-config - # as it "spreads unnecessary dependencies" which in diff --git a/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/0004-riscv-Wire-CPU-timers.patch b/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/0004-riscv-Wire-CPU-timers.patch deleted file mode 100644 index 3d4025db..00000000 --- a/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/0004-riscv-Wire-CPU-timers.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 2b117b43bb34d5da17d096504c518ab5eaa362f0 Mon Sep 17 00:00:00 2001 -Message-ID: <2b117b43bb34d5da17d096504c518ab5eaa362f0.1747662482.git.michal.simek@amd.com> -From: Michal Simek -Date: Fri, 25 Apr 2025 09:54:45 +0200 -Subject: [PATCH] riscv: Wire CPU timers - -Our HW is supporting them and FDT model is not wiring them. - -Signed-off-by: Michal Simek ---- - target/riscv/cpu.c | 25 +++++++++++++------------ - 1 file changed, 13 insertions(+), 12 deletions(-) - -diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c -index 2685728f8a28..3bd69a961830 100644 ---- a/target/riscv/cpu.c -+++ b/target/riscv/cpu.c -@@ -553,6 +553,18 @@ static void rv128_base_cpu_init(Object *obj) - #endif - } - #else -+#ifndef CONFIG_USER_ONLY -+static uint64_t mb_v_rdtime(void *opaque) -+{ -+ CPURISCVState *env = &RISCV_CPU(opaque)->env; -+ uint32_t time, timeh; -+ -+ csr_ops[CSR_MCYCLE].read(env, CSR_MCYCLE, &time); -+ csr_ops[CSR_MCYCLEH].read(env, CSR_MCYCLEH, &timeh); -+ return (uint64_t) timeh << 32 | time; -+} -+#endif -+ - static void rv32_base_cpu_init(Object *obj) - { - CPURISCVState *env = &RISCV_CPU(obj)->env; -@@ -562,6 +574,7 @@ static void rv32_base_cpu_init(Object *obj) - env->priv_ver = PRIV_VERSION_LATEST; - #ifndef CONFIG_USER_ONLY - set_satp_mode_max_supported(RISCV_CPU(obj), VM_1_10_SV32); -+ riscv_cpu_set_rdtime_fn(env, mb_v_rdtime, obj); - #endif - } - -@@ -634,18 +647,6 @@ static void rv32_imafcu_nommu_cpu_init(Object *obj) - cpu->cfg.pmp = true; - } - --#ifndef CONFIG_USER_ONLY --static uint64_t mb_v_rdtime(void *opaque) --{ -- CPURISCVState *env = &RISCV_CPU(opaque)->env; -- uint32_t time, timeh; -- -- csr_ops[CSR_MCYCLE].read(env, CSR_MCYCLE, &time); -- csr_ops[CSR_MCYCLEH].read(env, CSR_MCYCLEH, &timeh); -- return (uint64_t) timeh << 32 | time; --} --#endif -- - static void rv32_microblaze_v_cpu_init(Object *obj) - { - #ifndef CONFIG_USER_ONLY --- -2.43.0 - diff --git a/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch b/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch deleted file mode 100644 index a84364cc..00000000 --- a/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 2bf9388b801d4389e2d57e95a7897bfc1c42786e Mon Sep 17 00:00:00 2001 -From: Changqing Li -Date: Thu, 14 Jan 2021 06:33:04 +0000 -Subject: [PATCH 08/12] tests/meson.build: use relative path to refer to files - -Fix error like: -Fatal error: can't create tests/ptimer-test.p/..._qemu-5.2.0_hw_core_ptimer.c.o: File name too long - -when build path is too long, use meson.source_root() will make this -filename too long. Fixed by using relative path to refer to files - -Upstream-Status: Submitted [send to qemu-devel] - -Signed-off-by: Changqing Li - ---- - tests/unit/meson.build | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: qemu-8.0.0/tests/unit/meson.build -=================================================================== ---- qemu-8.0.0.orig/tests/unit/meson.build -+++ qemu-8.0.0/tests/unit/meson.build -@@ -46,7 +46,7 @@ tests = { - 'test-keyval': [testqapi], - 'test-logging': [], - 'test-uuid': [], -- 'ptimer-test': ['ptimer-test-stubs.c', meson.project_source_root() / 'hw/core/ptimer.c'], -+ 'ptimer-test': ['ptimer-test-stubs.c', '../../hw/core/ptimer.c'], - 'test-qapi-util': [], - 'test-interval-tree': [], - 'test-xs-node': [qom], -@@ -136,7 +136,7 @@ if have_system - 'test-util-sockets': ['socket-helpers.c'], - 'test-base64': [], - 'test-bufferiszero': [], -- 'test-smp-parse': [qom, meson.project_source_root() / 'hw/core/machine-smp.c'], -+ 'test-smp-parse': [qom, '../../hw/core/machine-smp.c'], - 'test-vmstate': [migration, io], - 'test-yank': ['socket-helpers.c', qom, io, chardev] - } diff --git a/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/cross.patch b/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/cross.patch deleted file mode 100644 index 566e3c92..00000000 --- a/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/cross.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 76c3fc4c87231bed32974ebbbdb5079cff45a6b7 Mon Sep 17 00:00:00 2001 -From: Richard Purdie -Date: Tue, 5 Jan 2021 23:00:14 +0000 -Subject: [PATCH 12/12] qemu: Upgrade 5.1.0->5.2.0 - -We need to be able to trigger configure's cross code but we don't want -to set cross_prefix as it does other things we don't want. Patch things -so we can do what we need in the target config case. - -Upstream-Status: Inappropriate [may be rewritten in a way upstream may accept?] -Signed-off-by: Richard Purdie - ---- - configure | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/configure b/configure -index c1e03801f14d..bd81dcb98df8 100755 ---- a/configure -+++ b/configure -@@ -1795,7 +1795,6 @@ if test "$skip_meson" = no; then - echo "widl = [$(meson_quote $widl)]" >> $cross - echo "windres = [$(meson_quote $windres)]" >> $cross - echo "windmc = [$(meson_quote $windmc)]" >> $cross -- if test "$cross_compile" = "yes"; then - echo "[host_machine]" >> $cross - echo "system = '$targetos'" >> $cross - case "$cpu" in -@@ -1820,7 +1819,6 @@ if test "$skip_meson" = no; then - mv $native config-meson.native - meson_option_add --native-file - meson_option_add config-meson.native -- fi - mv $cross config-meson.cross - meson_add_machine_file config-meson.cross - if test -f "$source_path/configs/meson/$targetos.txt"; then diff --git a/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/fixedmeson.patch b/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/fixedmeson.patch deleted file mode 100644 index 198d0cd7..00000000 --- a/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/fixedmeson.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 72002fcd5673d0144d3fe756521348e9381061e1 Mon Sep 17 00:00:00 2001 -Message-ID: <72002fcd5673d0144d3fe756521348e9381061e1.1747667452.git.michal.simek@amd.com> -From: Michal Simek -Date: Mon, 19 May 2025 17:10:43 +0200 -Subject: [PATCH] Upstream-Status: Inappropriate [workaround, would need a real - fix for upstream] - ---- - configure | 7 +------ - 1 file changed, 1 insertion(+), 6 deletions(-) - -diff --git a/configure b/configure -index bd81dcb98df8..d462e56417f2 100755 ---- a/configure -+++ b/configure -@@ -964,12 +964,7 @@ fi - $mkvenv ensuregroup --dir "${source_path}/python/wheels" \ - ${source_path}/pythondeps.toml meson || exit 1 - --# At this point, we expect Meson to be installed and available. --# We expect mkvenv or pip to have created pyvenv/bin/meson for us. --# We ignore PATH completely here: we want to use the venv's Meson --# *exclusively*. -- --meson="$(cd pyvenv/bin; pwd)/meson" -+meson=`which meson` - - # Conditionally ensure Sphinx is installed. - --- -2.43.0 - diff --git a/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/no-pip.patch b/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/no-pip.patch deleted file mode 100644 index ec71b0f2..00000000 --- a/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/no-pip.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 757ff30fe336a1304355eefa3fc93e0b8cc86986 Mon Sep 17 00:00:00 2001 -Message-ID: <757ff30fe336a1304355eefa3fc93e0b8cc86986.1747667700.git.michal.simek@amd.com> -From: Richard Purdie -Date: Mon, 19 May 2025 17:14:55 +0200 -Subject: [PATCH] qemu: Ensure pip and the python venv aren't used for meson - -Qemu wants to use a supported python version and a specific meson version -to "help" users and uses pip and creates a venv to do this. This is a nightmare -for us. Our versions stay up to date and should be supported so we don't -really need/want this wrapping. Tweak things to disable it. - -There was breakage from the wrapper shown by: - -bitbake qemu-system-native - -bitbake qemu-system-native -c configure - -which would crash. The issue is the change in configuration removes pieces -from the sysroot but pyc files remainm as do pieces of pip which causes -problems. - -Ideally we'd convince upstream to allow some way to disable the venv on -the understanding that if/when it breaks, we keep the pieces. The patch -as it stands is a workaround. - -Upstream-Status: Inappropriate [oe specific] -Signed-off-by: Richard Purdie ---- - configure | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/configure b/configure -index d462e56417f2..3aa817827525 100755 ---- a/configure -+++ b/configure -@@ -946,7 +946,7 @@ python="$(command -v "$python")" - echo "python determined to be '$python'" - echo "python version: $($python --version)" - --python="$($python -B "${source_path}/python/scripts/mkvenv.py" create pyvenv)" -+python=python3 - if test "$?" -ne 0 ; then - error_exit "python venv creation failed" - fi -@@ -954,6 +954,7 @@ fi - # Suppress writing compiled files - python="$python -B" - mkvenv="$python ${source_path}/python/scripts/mkvenv.py" -+mkvenv=true - - # Finish preparing the virtual environment using vendored .whl files - --- -2.43.0 - diff --git a/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/qemu-xilinx_git.bb b/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/qemu-xilinx_git.bb index 4ebe8700..60881a68 100644 --- a/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/qemu-xilinx_git.bb +++ b/meta-zephyr-sdk/recipes-devtools/qemu_xilinx/qemu-xilinx_git.bb @@ -6,20 +6,10 @@ RDEPENDS:${PN}-common:class-target += "bash" LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f" -SRCREV_qemu = "b05c9752662eb4b8120a57454a323445d78d1463" +SRCREV_qemu = "{ZEPHYR_SDK_QEMU_XILINX_SRCREV}" SRCREV_FORMAT = "qemu" SRC_URI += "gitsm://github.com/Xilinx/qemu.git;protocol=https;nobranch=1;name=qemu \ - file://cross.patch \ - file://0004-configure-Add-pkg-config-handling-for-libgcrypt.patch \ - file://0001-Revert-target-arm-Revert-back-to-YIELD-for-WFI.patch \ - file://0002-Enable-WFI-CPU-halting-in-icount-mode.patch \ - file://0003-riscvXX-softmmu-Enable-emaclite-driver-for-MB-V.patch \ - file://0004-riscv-Wire-CPU-timers.patch \ - file://0001-Revert-target-arm-Enforce-alignment-for-LDM-STM.patch \ - file://0008-tests-meson.build-use-relative-path-to-refer-to-file.patch \ - file://fixedmeson.patch \ - file://no-pip.patch \ " # Deal with the broken --disable-download diff --git a/meta-zephyr-sdk/scripts/meta-zephyr-sdk-build.sh b/meta-zephyr-sdk/scripts/meta-zephyr-sdk-build.sh index 828d5ea6..0a2b5e69 100755 --- a/meta-zephyr-sdk/scripts/meta-zephyr-sdk-build.sh +++ b/meta-zephyr-sdk/scripts/meta-zephyr-sdk-build.sh @@ -49,6 +49,15 @@ if [ ! -d $TOOLCHAINS ] ; then fi rm -rf $TOOLCHAINS/* +export ZEPHYR_SDK_QEMU_SRCREV=$(cd qemu; git rev-parse HEAD) +export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS} ZEPHYR_SDK_QEMU_SRCREV" + +export ZEPHYR_SDK_QEMU_ARC_SRCREV=$(cd qemu_arc; git rev-parse HEAD) +export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS} ZEPHYR_SDK_QEMU_ARC_SRCREV" + +export ZEPHYR_SDK_QEMU_XILINX_SRCREV=$(cd qemu_xilinx; git rev-parse HEAD) +export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS} ZEPHYR_SDK_QEMU_XILINX_SRCREV" + # setconf_var, i.e. "MACHINE","qemuarm",$localconf setconf_var() { diff --git a/qemu b/qemu new file mode 160000 index 00000000..fe132ed0 --- /dev/null +++ b/qemu @@ -0,0 +1 @@ +Subproject commit fe132ed0c9ae14a56bbf94b1d0d16b029b671c62 diff --git a/qemu_arc b/qemu_arc new file mode 160000 index 00000000..b46c4ec2 --- /dev/null +++ b/qemu_arc @@ -0,0 +1 @@ +Subproject commit b46c4ec2d07a4c56c426b3d48195d6f2902226e5 diff --git a/qemu_xilinx b/qemu_xilinx new file mode 160000 index 00000000..3c86427a --- /dev/null +++ b/qemu_xilinx @@ -0,0 +1 @@ +Subproject commit 3c86427a87ea668b4c12952d00f7382722f96816