diff --git a/meta-zephyr-sdk/recipes-devtools/qemu/files/0001-Revert-target-xtensa-Make-use-of-segment-in-pptlb-he.patch b/meta-zephyr-sdk/recipes-devtools/qemu/files/0001-Revert-target-xtensa-Make-use-of-segment-in-pptlb-he.patch new file mode 100644 index 00000000..c400dbe3 --- /dev/null +++ b/meta-zephyr-sdk/recipes-devtools/qemu/files/0001-Revert-target-xtensa-Make-use-of-segment-in-pptlb-he.patch @@ -0,0 +1,36 @@ +From 1fcd2c937b1b7a2bc748f9828d242f7031d31c28 Mon Sep 17 00:00:00 2001 +From: Anas Nashif +Date: Fri, 16 May 2025 17:58:04 -0400 +Subject: [PATCH] Revert "target/xtensa: Make use of 'segment' in pptlb helper + less confusing" + +This reverts commit b42ba4ea4322357fcbfcb0e6e613d79ede84de64. +--- + target/xtensa/mmu_helper.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/target/xtensa/mmu_helper.c b/target/xtensa/mmu_helper.c +index 29b84d5dbf..997b21d389 100644 +--- a/target/xtensa/mmu_helper.c ++++ b/target/xtensa/mmu_helper.c +@@ -991,7 +991,7 @@ uint32_t HELPER(rptlb1)(CPUXtensaState *env, uint32_t s) + uint32_t HELPER(pptlb)(CPUXtensaState *env, uint32_t v) + { + unsigned nhits; +- unsigned segment; ++ unsigned segment = XTENSA_MPU_PROBE_B; + unsigned bg_segment; + + nhits = xtensa_mpu_lookup(env->mpu_fg, env->config->n_mpu_fg_segments, +@@ -1005,7 +1005,7 @@ uint32_t HELPER(pptlb)(CPUXtensaState *env, uint32_t v) + xtensa_mpu_lookup(env->config->mpu_bg, + env->config->n_mpu_bg_segments, + v, &bg_segment); +- return env->config->mpu_bg[bg_segment].attr | XTENSA_MPU_PROBE_B; ++ return env->config->mpu_bg[bg_segment].attr | segment; + } + } + +-- +2.43.0 + diff --git a/meta-zephyr-sdk/recipes-devtools/qemu/files/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch b/meta-zephyr-sdk/recipes-devtools/qemu/files/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch index 5e21855c..7ca79b0e 100644 --- a/meta-zephyr-sdk/recipes-devtools/qemu/files/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch +++ b/meta-zephyr-sdk/recipes-devtools/qemu/files/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch @@ -1,4 +1,4 @@ -From 930b75aeade33690cec4bf748a954401da2be782 Mon Sep 17 00:00:00 2001 +From 29dce25c090792e360a1c1ff081af25d63d7df29 Mon Sep 17 00:00:00 2001 From: Jason Wessel Date: Fri, 28 Mar 2014 17:42:43 +0800 Subject: [PATCH] qemu: Add addition environment space to boot loader @@ -18,7 +18,7 @@ Signed-off-by: Roy Li 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/mips/malta.c b/hw/mips/malta.c -index 664a2ae0a..5124b158a 100644 +index 198da5ba3..736bf0999 100644 --- a/hw/mips/malta.c +++ b/hw/mips/malta.c @@ -64,7 +64,7 @@ diff --git a/meta-zephyr-sdk/recipes-devtools/qemu/files/0001-sched_attr-Do-not-define-for-glibc-2.41.patch b/meta-zephyr-sdk/recipes-devtools/qemu/files/0001-sched_attr-Do-not-define-for-glibc-2.41.patch deleted file mode 100644 index 1233a07f..00000000 --- a/meta-zephyr-sdk/recipes-devtools/qemu/files/0001-sched_attr-Do-not-define-for-glibc-2.41.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 7030c0cd98de9e6c42e69be314204727ae335912 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 10 Oct 2024 22:40:32 -0700 -Subject: [PATCH] sched_attr: Do not define for glibc >= 2.41 - -glibc 2.41+ has added [1] definitions for sched_setattr and sched_getattr functions -and struct sched_attr. Therefore, it needs to be checked for here as well before -defining sched_attr - -Define sched_attr conditionally on SCHED_ATTR_SIZE_VER0 - -Fixes builds with glibc/trunk - -[1] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=21571ca0d70302909cf72707b2a7736cf12190a0;hp=298bc488fdc047da37482f4003023cb9adef78f8 - -Upstream-Status: Submitted [https://patchwork.ozlabs.org/project/qemu-devel/patch/20241011193140.1047648-1-raj.khem@gmail.com/] -Signed-off-by: Khem Raj -Cc: Laurent Vivier -Cc: Paolo Bonzini ---- - linux-user/syscall.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 27aa59594..b2c45b4c4 100644 ---- a/linux-user/syscall.c -+++ b/linux-user/syscall.c -@@ -361,7 +361,8 @@ _syscall3(int, sys_sched_getaffinity, pid_t, pid, unsigned int, len, - #define __NR_sys_sched_setaffinity __NR_sched_setaffinity - _syscall3(int, sys_sched_setaffinity, pid_t, pid, unsigned int, len, - unsigned long *, user_mask_ptr); --/* sched_attr is not defined in glibc */ -+/* sched_attr is not defined in glibc < 2.41 */ -+#ifndef SCHED_ATTR_SIZE_VER0 - struct sched_attr { - uint32_t size; - uint32_t sched_policy; -@@ -374,6 +375,7 @@ struct sched_attr { - uint32_t sched_util_min; - uint32_t sched_util_max; - }; -+#endif - #define __NR_sys_sched_getattr __NR_sched_getattr - _syscall4(int, sys_sched_getattr, pid_t, pid, struct sched_attr *, attr, - unsigned int, size, unsigned int, flags); diff --git a/meta-zephyr-sdk/recipes-devtools/qemu/files/0001-target-xtensa-add-translation-for-wsr.mpucfg.patch b/meta-zephyr-sdk/recipes-devtools/qemu/files/0001-target-xtensa-add-translation-for-wsr.mpucfg.patch index 2b33ef6b..0debfe02 100644 --- a/meta-zephyr-sdk/recipes-devtools/qemu/files/0001-target-xtensa-add-translation-for-wsr.mpucfg.patch +++ b/meta-zephyr-sdk/recipes-devtools/qemu/files/0001-target-xtensa-add-translation-for-wsr.mpucfg.patch @@ -1,7 +1,7 @@ -From 40de936cb535e9645d562ef32ef70d224f4f80ec Mon Sep 17 00:00:00 2001 +From c4c7e54d418f2a61188c85be05320d51ff1244a3 Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Thu, 14 Dec 2023 18:08:26 -0800 -Subject: [PATCH 1/4] target/xtensa: add translation for wsr.mpucfg +Subject: [PATCH 1/5] target/xtensa: add translation for wsr.mpucfg Although MPUCFG is not writable, the opcode wsr.mpucfg is defined and it just does nothing. Define wsr.mpucfg as nop. diff --git a/meta-zephyr-sdk/recipes-devtools/qemu/files/0002-apic-fixup-fallthrough-to-PIC.patch b/meta-zephyr-sdk/recipes-devtools/qemu/files/0002-apic-fixup-fallthrough-to-PIC.patch index bcb0d0c0..292c5424 100644 --- a/meta-zephyr-sdk/recipes-devtools/qemu/files/0002-apic-fixup-fallthrough-to-PIC.patch +++ b/meta-zephyr-sdk/recipes-devtools/qemu/files/0002-apic-fixup-fallthrough-to-PIC.patch @@ -1,4 +1,4 @@ -From 1ba58dbd2dce4e6ccaf3be3ad5c9ecc22565313f Mon Sep 17 00:00:00 2001 +From e069c66ccf29fb13ef5938b68f5362737b64d638 Mon Sep 17 00:00:00 2001 From: Mark Asselstine Date: Tue, 26 Feb 2013 11:43:28 -0500 Subject: [PATCH] apic: fixup fallthrough to PIC diff --git a/meta-zephyr-sdk/recipes-devtools/qemu/files/0002-target-xtensa-import-sample_controller32-core.patch b/meta-zephyr-sdk/recipes-devtools/qemu/files/0002-target-xtensa-import-sample_controller32-core.patch index 5670d808..9e9ab667 100644 --- a/meta-zephyr-sdk/recipes-devtools/qemu/files/0002-target-xtensa-import-sample_controller32-core.patch +++ b/meta-zephyr-sdk/recipes-devtools/qemu/files/0002-target-xtensa-import-sample_controller32-core.patch @@ -1,7 +1,7 @@ -From f45b7fe1a7a5cbb2445f4bfd36a6a929fa22bef6 Mon Sep 17 00:00:00 2001 +From 73b26889b8e68efee58d3a3bef4e3672c7b166fc Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Thu, 14 Dec 2023 16:47:09 -0800 -Subject: [PATCH 2/4] target/xtensa: import sample_controller32 core +Subject: [PATCH 2/5] target/xtensa: import sample_controller32 core This is an LX core with MPU and exclusive access options. diff --git a/meta-zephyr-sdk/recipes-devtools/qemu/files/0003-tests-tcg-xtensa-tidy-test-linker-script.patch b/meta-zephyr-sdk/recipes-devtools/qemu/files/0003-tests-tcg-xtensa-tidy-test-linker-script.patch index e3c51dd7..47d43cef 100644 --- a/meta-zephyr-sdk/recipes-devtools/qemu/files/0003-tests-tcg-xtensa-tidy-test-linker-script.patch +++ b/meta-zephyr-sdk/recipes-devtools/qemu/files/0003-tests-tcg-xtensa-tidy-test-linker-script.patch @@ -1,7 +1,7 @@ -From c700aa6373e4cee40cba849f3bbb4927165d7243 Mon Sep 17 00:00:00 2001 +From 7b358c875242cd90ce64b175f9585c0da933b6b6 Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Thu, 14 Dec 2023 16:46:08 -0800 -Subject: [PATCH 3/4] tests/tcg/xtensa: tidy test linker script +Subject: [PATCH 3/5] tests/tcg/xtensa: tidy test linker script Drop MEMORY clause and related size definitions and output section region specifications. Drop .rodata output section as the tests don't diff --git a/meta-zephyr-sdk/recipes-devtools/qemu/files/0004-qemu-Do-not-include-file-if-not-exists.patch b/meta-zephyr-sdk/recipes-devtools/qemu/files/0004-qemu-Do-not-include-file-if-not-exists.patch index 2b4f2b17..ecfddfc0 100644 --- a/meta-zephyr-sdk/recipes-devtools/qemu/files/0004-qemu-Do-not-include-file-if-not-exists.patch +++ b/meta-zephyr-sdk/recipes-devtools/qemu/files/0004-qemu-Do-not-include-file-if-not-exists.patch @@ -1,4 +1,4 @@ -From 081c1e4ee93b22ec00136db45c36650427213c09 Mon Sep 17 00:00:00 2001 +From 24e16b32dd0a4136ac30f8e2d48e266892814de6 Mon Sep 17 00:00:00 2001 From: Oleksiy Obitotskyy Date: Wed, 25 Mar 2020 21:21:35 +0200 Subject: [PATCH] qemu: Do not include file if not exists @@ -16,10 +16,10 @@ Signed-off-by: Sakib Sajal 1 file changed, 2 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 9d5415674..22df46859 100644 +index 549e39e19..439c7beb0 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -117,7 +117,9 @@ +@@ -116,7 +116,9 @@ #include #include #include diff --git a/meta-zephyr-sdk/recipes-devtools/qemu/files/0004-tests-tcg-xtensa-fix-SR-test-for-configs-with-MPU.patch b/meta-zephyr-sdk/recipes-devtools/qemu/files/0004-tests-tcg-xtensa-fix-SR-test-for-configs-with-MPU.patch index c01e56b6..070fb4f2 100644 --- a/meta-zephyr-sdk/recipes-devtools/qemu/files/0004-tests-tcg-xtensa-fix-SR-test-for-configs-with-MPU.patch +++ b/meta-zephyr-sdk/recipes-devtools/qemu/files/0004-tests-tcg-xtensa-fix-SR-test-for-configs-with-MPU.patch @@ -1,7 +1,7 @@ -From f814bc5b4d16403b15fcd80b1678d12202dab0f2 Mon Sep 17 00:00:00 2001 +From 21f01eb5a8dfa0ca7d4e4f9b2bf51b89ecc1e3b3 Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Thu, 14 Dec 2023 18:14:00 -0800 -Subject: [PATCH 4/4] tests/tcg/xtensa: fix SR test for configs with MPU +Subject: [PATCH 4/5] tests/tcg/xtensa: fix SR test for configs with MPU - atomctl is available not only in the presence of s32c1i, but also with the exclusive access option diff --git a/meta-zephyr-sdk/recipes-devtools/qemu/files/0005-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch b/meta-zephyr-sdk/recipes-devtools/qemu/files/0005-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch index 26ddf5e5..0e22a4fd 100644 --- a/meta-zephyr-sdk/recipes-devtools/qemu/files/0005-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch +++ b/meta-zephyr-sdk/recipes-devtools/qemu/files/0005-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch @@ -1,4 +1,4 @@ -From 76efeccfd73a76834ac1c75d3c94de1899085714 Mon Sep 17 00:00:00 2001 +From ef7497674b2d41cffcb90f36bfe145c4951a03ba Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 8 Jan 2021 17:27:06 +0000 Subject: [PATCH] qemu: Add some user space mmap tweaks to address musl 32 bit diff --git a/meta-zephyr-sdk/recipes-devtools/qemu/files/0005-target-xtensa-fix-sample_controller32-build-for-QEMU.patch b/meta-zephyr-sdk/recipes-devtools/qemu/files/0005-target-xtensa-fix-sample_controller32-build-for-QEMU.patch new file mode 100644 index 00000000..d16072d7 --- /dev/null +++ b/meta-zephyr-sdk/recipes-devtools/qemu/files/0005-target-xtensa-fix-sample_controller32-build-for-QEMU.patch @@ -0,0 +1,30 @@ +From 1b83e396296f32f7fdd4cf430494e813e5573949 Mon Sep 17 00:00:00 2001 +From: Daniel Leung +Date: Tue, 14 May 2024 09:52:26 -0700 +Subject: [PATCH 5/5] target/xtensa: fix sample_controller32 build for QEMU 7 + +The original patches for adding sample_controller32 are based on +QEMU 9. The GDB stub header file is not in the same place between +these two version. So fix that for QEMU 7. This can be reverted +when we move to QEMU 9. + +Signed-off-by: Daniel Leung +--- + target/xtensa/core-sample_controller32.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/target/xtensa/core-sample_controller32.c b/target/xtensa/core-sample_controller32.c +index 94e75ad6ef..1e6028bc17 100644 +--- a/target/xtensa/core-sample_controller32.c ++++ b/target/xtensa/core-sample_controller32.c +@@ -1,6 +1,6 @@ + #include "qemu/osdep.h" + #include "cpu.h" +-#include "gdbstub/helpers.h" ++#include "exec/gdbstub.h" + #include "qemu/host-utils.h" + + #include "core-sample_controller32/core-isa.h" +-- +2.43.0 + diff --git a/meta-zephyr-sdk/recipes-devtools/qemu/files/0006-qemu-Determinism-fixes.patch b/meta-zephyr-sdk/recipes-devtools/qemu/files/0006-qemu-Determinism-fixes.patch index 059257bc..33de959f 100644 --- a/meta-zephyr-sdk/recipes-devtools/qemu/files/0006-qemu-Determinism-fixes.patch +++ b/meta-zephyr-sdk/recipes-devtools/qemu/files/0006-qemu-Determinism-fixes.patch @@ -1,4 +1,4 @@ -From 09e8fac984cea71867c0b7a05b0dd8f7025bd25a Mon Sep 17 00:00:00 2001 +From b0862cf4fecc11a181bc8c6602c7d09812148249 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 1 Mar 2021 13:00:47 +0000 Subject: [PATCH] qemu: Determinism fixes diff --git a/meta-zephyr-sdk/recipes-devtools/qemu/files/0007-tests-meson.build-use-relative-path-to-refer-to-file.patch b/meta-zephyr-sdk/recipes-devtools/qemu/files/0007-tests-meson.build-use-relative-path-to-refer-to-file.patch index cd919048..335d50be 100644 --- a/meta-zephyr-sdk/recipes-devtools/qemu/files/0007-tests-meson.build-use-relative-path-to-refer-to-file.patch +++ b/meta-zephyr-sdk/recipes-devtools/qemu/files/0007-tests-meson.build-use-relative-path-to-refer-to-file.patch @@ -1,4 +1,4 @@ -From 1a574aa22c9b3700af7e5c0901abef59c72bb874 Mon Sep 17 00:00:00 2001 +From 7bce3a9379b09dfa7d24a377a9f7f1c6a2f8bdde Mon Sep 17 00:00:00 2001 From: Changqing Li Date: Thu, 14 Jan 2021 06:33:04 +0000 Subject: [PATCH] tests/meson.build: use relative path to refer to files @@ -17,10 +17,10 @@ Signed-off-by: Changqing Li 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/meson.build b/tests/unit/meson.build -index 490ab8182..d19ee5606 100644 +index d5248ae51..2c581f055 100644 --- a/tests/unit/meson.build +++ b/tests/unit/meson.build -@@ -128,17 +128,17 @@ endif +@@ -127,17 +127,17 @@ endif if have_system tests += { diff --git a/meta-zephyr-sdk/recipes-devtools/qemu/files/0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch b/meta-zephyr-sdk/recipes-devtools/qemu/files/0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch index 7bbd96df..3f81154d 100644 --- a/meta-zephyr-sdk/recipes-devtools/qemu/files/0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch +++ b/meta-zephyr-sdk/recipes-devtools/qemu/files/0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch @@ -1,4 +1,4 @@ -From 06b5b26a0a1f7687576d90066e492cf2665fff1d Mon Sep 17 00:00:00 2001 +From 2c2fde4042578ee29714a6421c33e00c4301d744 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 21 Mar 2022 10:09:38 -0700 Subject: [PATCH] Define MAP_SYNC and MAP_SHARED_VALIDATE on needed linux diff --git a/meta-zephyr-sdk/recipes-devtools/qemu/files/0010-configure-lookup-meson-exutable-from-PATH.patch b/meta-zephyr-sdk/recipes-devtools/qemu/files/0010-configure-lookup-meson-exutable-from-PATH.patch index f20851bf..4a777dee 100644 --- a/meta-zephyr-sdk/recipes-devtools/qemu/files/0010-configure-lookup-meson-exutable-from-PATH.patch +++ b/meta-zephyr-sdk/recipes-devtools/qemu/files/0010-configure-lookup-meson-exutable-from-PATH.patch @@ -1,4 +1,4 @@ -From 2e9642b9001df523628ab2cacbbbf2b208c49437 Mon Sep 17 00:00:00 2001 +From b3435faf13837f487231a01c2dca45a260ae323c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= Date: Wed, 22 May 2024 14:02:55 +0200 Subject: [PATCH] configure: lookup meson exutable from PATH @@ -9,10 +9,10 @@ Upstream-Status: Inappropriate [workaround, would need a real fix for upstream] 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/configure b/configure -index d08b71f14..af0bd2c66 100755 +index 18336376b..2b014b97c 100755 --- a/configure +++ b/configure -@@ -958,12 +958,7 @@ mkvenv="$python ${source_path}/python/scripts/mkvenv.py" +@@ -1002,12 +1002,7 @@ mkvenv="$python ${source_path}/python/scripts/mkvenv.py" $mkvenv ensuregroup --dir "${source_path}/python/wheels" \ ${source_path}/pythondeps.toml meson || exit 1 diff --git a/meta-zephyr-sdk/recipes-devtools/qemu/files/0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch b/meta-zephyr-sdk/recipes-devtools/qemu/files/0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch index 4adb2e5f..f9492067 100644 --- a/meta-zephyr-sdk/recipes-devtools/qemu/files/0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch +++ b/meta-zephyr-sdk/recipes-devtools/qemu/files/0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch @@ -1,4 +1,4 @@ -From 68a13afd6606c2aaf1f0debd325d7314aaa61411 Mon Sep 17 00:00:00 2001 +From 81b55a014b2e5f0863a5a3fd584168c9d4ce9eb8 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 22 May 2024 13:58:23 +0200 Subject: [PATCH] qemu: Ensure pip and the python venv aren't used for meson @@ -29,10 +29,10 @@ Signed-off-by: Richard Purdie 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure -index af0bd2c66..88dab6a95 100755 +index 2b014b97c..45dc8b146 100755 --- a/configure +++ b/configure -@@ -944,14 +944,14 @@ python="$(command -v "$python")" +@@ -988,14 +988,14 @@ python="$(command -v "$python")" echo "python determined to be '$python'" echo "python version: $($python --version)" diff --git a/meta-zephyr-sdk/recipes-devtools/qemu/files/fix-strerrorname_np.patch b/meta-zephyr-sdk/recipes-devtools/qemu/files/fix-strerrorname_np.patch index b57c4811..ca667692 100644 --- a/meta-zephyr-sdk/recipes-devtools/qemu/files/fix-strerrorname_np.patch +++ b/meta-zephyr-sdk/recipes-devtools/qemu/files/fix-strerrorname_np.patch @@ -1,4 +1,4 @@ -From 9de5de85fa917af58e7bc9cdd88f8f7ef8da2ca9 Mon Sep 17 00:00:00 2001 +From 6e5a6d44950c48957f3906294b8efd6a76b91576 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 18 Sep 2024 16:19:37 -0700 Subject: [PATCH] target/riscv/kvm: do not use non-portable strerrorname_np() @@ -20,10 +20,10 @@ Signed-off-by: Natanael Copa 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/riscv/kvm/kvm-cpu.c b/target/riscv/kvm/kvm-cpu.c -index f6e3156b8..fad9eb21c 100644 +index c53ca1f76..3c67129ef 100644 --- a/target/riscv/kvm/kvm-cpu.c +++ b/target/riscv/kvm/kvm-cpu.c -@@ -1859,8 +1859,7 @@ static bool kvm_cpu_realize(CPUState *cs, Error **errp) +@@ -1870,8 +1870,7 @@ static bool kvm_cpu_realize(CPUState *cs, Error **errp) if (riscv_has_ext(&cpu->env, RVV)) { ret = prctl(PR_RISCV_V_SET_CONTROL, PR_RISCV_V_VSTATE_CTRL_ON); if (ret) { diff --git a/meta-zephyr-sdk/recipes-devtools/qemu/qemu-zephyr_9.2.1.bb b/meta-zephyr-sdk/recipes-devtools/qemu/qemu-zephyr_9.2.3.bb similarity index 96% rename from meta-zephyr-sdk/recipes-devtools/qemu/qemu-zephyr_9.2.1.bb rename to meta-zephyr-sdk/recipes-devtools/qemu/qemu-zephyr_9.2.3.bb index a7fce814..f7635710 100644 --- a/meta-zephyr-sdk/recipes-devtools/qemu/qemu-zephyr_9.2.1.bb +++ b/meta-zephyr-sdk/recipes-devtools/qemu/qemu-zephyr_9.2.3.bb @@ -38,6 +38,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f" SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ + file://powerpc_rom.bin \ file://run-ptest \ file://fix-strerrorname_np.patch \ file://0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch \ @@ -49,17 +50,20 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch \ file://0010-configure-lookup-meson-exutable-from-PATH.patch \ file://0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch \ - file://0001-sched_attr-Do-not-define-for-glibc-2.41.patch \ - file://qemu-guest-agent.init \ - file://qemu-guest-agent.udev \ file://0001-target-xtensa-add-translation-for-wsr.mpucfg.patch \ file://0002-target-xtensa-import-sample_controller32-core.patch \ file://0003-tests-tcg-xtensa-tidy-test-linker-script.patch \ file://0004-tests-tcg-xtensa-fix-SR-test-for-configs-with-MPU.patch \ + file://0005-target-xtensa-fix-sample_controller32-build-for-QEMU.patch \ + file://0001-Revert-target-xtensa-Make-use-of-segment-in-pptlb-he.patch \ + file://qemu-guest-agent.init \ + file://qemu-guest-agent.udev \ " +# file index at download.qemu.org isn't reliable: https://gitlab.com/qemu-project/qemu-web/-/issues/9 +UPSTREAM_CHECK_URI = "https://www.qemu.org" UPSTREAM_CHECK_REGEX = "qemu-(?P\d+(\.\d+)+)\.tar" -SRC_URI[sha256sum] = "b7b0782ead63a5373fdfe08e084d3949a9395ec196180286b841f78a464d169c" +SRC_URI[sha256sum] = "baed494270c361bf69816acc84512e3efed71c7a23f76691642b80bc3de7693e" CVE_STATUS[CVE-2007-0998] = "not-applicable-config: The VNC server can expose host files uder some circumstances. We don't enable it by default." diff --git a/meta-zephyr-sdk/recipes-devtools/qemu/qemu.inc b/meta-zephyr-sdk/recipes-devtools/qemu/qemu.inc deleted file mode 100644 index f6d27bb7..00000000 --- a/meta-zephyr-sdk/recipes-devtools/qemu/qemu.inc +++ /dev/null @@ -1,284 +0,0 @@ -SUMMARY = "Fast open source processor emulator" -DESCRIPTION = "QEMU is a hosted virtual machine monitor: it emulates the \ -machine's processor through dynamic binary translation and provides a set \ -of different hardware and device models for the machine, enabling it to run \ -a variety of guest operating systems" -HOMEPAGE = "http://qemu.org" -LICENSE = "GPL-2.0-only & LGPL-2.1-only" - -DEPENDS += "bison-native meson-native ninja-native" - -RDEPENDS:${PN}-ptest = "bash" - -require qemu-targets.inc -# https://gitlab.com/qemu-project/qemu/-/commit/81e2b198a8cb4ee5fdf108bd438f44b193ee3a36 means -# we need a full python3-native setup -inherit pkgconfig ptest update-rc.d systemd python3native - -LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ - file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f" - -SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ - file://powerpc_rom.bin \ - file://run-ptest \ - file://fix-strerrorname_np.patch \ - file://0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch \ - file://0002-apic-fixup-fallthrough-to-PIC.patch \ - file://0004-qemu-Do-not-include-file-if-not-exists.patch \ - file://0005-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch \ - file://0006-qemu-Determinism-fixes.patch \ - file://0007-tests-meson.build-use-relative-path-to-refer-to-file.patch \ - file://0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch \ - file://0010-configure-lookup-meson-exutable-from-PATH.patch \ - file://0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch \ - file://0001-sched_attr-Do-not-define-for-glibc-2.41.patch \ - file://qemu-guest-agent.init \ - file://qemu-guest-agent.udev \ - " -UPSTREAM_CHECK_REGEX = "qemu-(?P\d+(\.\d+)+)\.tar" - -SRC_URI[sha256sum] = "f859f0bc65e1f533d040bbe8c92bcfecee5af2c921a6687c652fb44d089bd894" - -CVE_STATUS[CVE-2007-0998] = "not-applicable-config: The VNC server can expose host files uder some circumstances. We don't enable it by default." - -# https://bugzilla.redhat.com/show_bug.cgi?id=1609015#c11 -CVE_STATUS[CVE-2018-18438] = "disputed: The issues identified by this CVE were determined to not constitute a vulnerability." - -# As per https://bugzilla.redhat.com/show_bug.cgi?id=2203387 -CVE_STATUS[CVE-2023-2680] = "not-applicable-platform: RHEL specific issue." - -# NVD DB has this CVE as version-less (with "-") -CVE_STATUS[CVE-2024-6505] = "fixed-version: this CVE is fixed since 9.1.0" - -COMPATIBLE_HOST:mipsarchn32 = "null" -COMPATIBLE_HOST:mipsarchn64 = "null" -COMPATIBLE_HOST:riscv32 = "null" - -# Per https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03873.html -# upstream states qemu doesn't work without optimization -DEBUG_BUILD = "0" - -do_install:append() { - # Prevent QA warnings about installed ${localstatedir}/run - if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi -} - -do_install_ptest() { - cp -rL ${B}/tests ${D}${PTEST_PATH} - find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcodp]" | xargs -i rm -rf {} - - # Don't check the file genreated by configure - sed -i -e "1s,#!/usr/bin/bash,#!${base_bindir}/bash," ${D}${PTEST_PATH}/tests/data/acpi/disassemle-aml.sh - - # Strip the paths from the QEMU variable, we can use PATH - makfiles=$(find ${D}${PTEST_PATH} -name "*.mak") - sed -i -e "s#^QEMU=.*/qemu-#QEMU=qemu-#g" $makfiles - - # Strip compiler flags as they break reproducibility - sed -i -e "s,^CC=.*,CC=gcc," \ - -e "s,^CCAS=.*,CCAS=gcc," \ - -e "s,^LD=.*,LD=ld," $makfiles - - # Update SRC_PATH variable to the right place on target - sed -i -e "s#^SRC_PATH=.*#SRC_PATH=${PTEST_PATH}#g" $makfiles - - # https://gitlab.com/qemu-project/qemu/-/issues/1403 - rm ${D}${PTEST_PATH}/tests/unit/test-io-channel-command -} - -EXTRA_OECONF = " \ - --prefix=${prefix} \ - --bindir=${bindir} \ - --includedir=${includedir} \ - --libdir=${libdir} \ - --mandir=${mandir} \ - --datadir=${datadir} \ - --docdir=${docdir}/${BPN} \ - --sysconfdir=${sysconfdir} \ - --libexecdir=${libexecdir} \ - --localstatedir=${localstatedir} \ - --with-suffix=${BPN} \ - --disable-strip \ - --disable-werror \ - --extra-cflags='${CFLAGS}' \ - --extra-ldflags='${LDFLAGS}' \ - --disable-download \ - --disable-docs \ - --host-cc='${BUILD_CC}' \ - --disable-af-xdp \ - ${PACKAGECONFIG_CONFARGS} \ - " -QEMU_TARGETS = "aarch64-softmmu arm-softmmu i386-softmmu mips-softmmu mipsel-softmmu xtensa-softmmu riscv32-softmmu riscv64-softmmu x86_64-softmmu" - -EXTRA_OECONF:append:class-target = " --target-list=${QEMU_TARGETS}" -EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" -EXTRA_OECONF:append:class-nativesdk = " --target-list=${QEMU_TARGETS}" - - -EXTRA_OECONF:append:class-target = " --cross-prefix=${HOST_PREFIX}" -EXTRA_OECONF:append:class-nativesdk = " --cross-prefix=${HOST_PREFIX}" - -B = "${WORKDIR}/build" - -#EXTRA_OECONF:append = " --python=${HOSTTOOLS_DIR}/python3" - -do_configure:prepend:class-native() { - # Append build host pkg-config paths for native target since the host may provide sdl - BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config || echo "") - if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH - fi -} - -do_configure() { - export PKG_CONFIG=pkg-config - ${S}/configure ${EXTRA_OECONF} -} -do_configure[cleandirs] += "${B}" - -do_install () { - export STRIP="" - oe_runmake 'DESTDIR=${D}' install - - # If we built the guest agent, also install startup/udev rules - if [ -e "${D}${bindir}/qemu-ga" ]; then - install -d ${D}${sysconfdir}/init.d/ - install -m 0755 ${WORKDIR}/qemu-guest-agent.init ${D}${sysconfdir}/init.d/qemu-guest-agent - sed -i 's:@bindir@:${bindir}:' ${D}${sysconfdir}/init.d/qemu-guest-agent - - install -d ${D}${sysconfdir}/udev/rules.d/ - install -m 0644 ${WORKDIR}/qemu-guest-agent.udev ${D}${sysconfdir}/udev/rules.d/60-qemu-guest-agent.rules - - install -d ${D}${systemd_unitdir}/system/ - install -m 0644 ${S}/contrib/systemd/qemu-guest-agent.service ${D}${systemd_unitdir}/system - sed -i -e 's,-/usr/bin/,-${bindir}/,g' ${D}${systemd_unitdir}/system/qemu-guest-agent.service - fi - # ELF binary /usr/share/qemu/s390-netboot.img has relocations in .text - rm ${D}${datadir}/qemu/s390-netboot.img -f - # ELF binary /usr/share/qemu/s390-ccw.img has relocations in .text [textrel] - rm ${D}${datadir}/qemu/s390-ccw.img -f - # We don't support PARISC and these cause strip and SDK relocation errors - rm ${D}${datadir}/qemu/hppa* -f -} - -do_install:append() { - # Link Xilinx QEMU executables - ln -sf ../xilinx/bin/qemu-system-aarch64 ${D}${bindir}/qemu-system-xilinx-aarch64 - ln -sf ../xilinx/bin/qemu-system-microblazeel ${D}${bindir}/qemu-system-xilinx-microblazeel - - # Link ARC (Synopsys) QEMU executables - ln -sf ../synopsys/bin/qemu-system-arc ${D}${bindir}/qemu-system-arc - ln -sf ../synopsys/bin/qemu-system-arc64 ${D}${bindir}/qemu-system-arc64 - - # Link other legacy QEMU executables - ln -sf ../legacy/bin/qemu-system-nios2 ${D}${bindir}/qemu-system-nios2 - ln -sf ../legacy/bin/qemu-system-sparc ${D}${bindir}/qemu-system-sparc -} - -# Disable kvm/virgl/mesa on targets that do not support it -PACKAGECONFIG:remove:darwin = "kvm virglrenderer epoxy gtk+" -PACKAGECONFIG:remove:mingw32 = "kvm virglrenderer epoxy gtk+ pie" - -PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl2" -PACKAGECONFIG[png] = "--enable-png,--disable-png,libpng" -PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr --enable-cap-ng,--disable-virtfs,libcap-ng attr," -PACKAGECONFIG[aio] = "--enable-linux-aio,--disable-linux-aio,libaio," -PACKAGECONFIG[uring] = "--enable-linux-io-uring,--disable-linux-io-uring,liburing" -PACKAGECONFIG[xen] = "--enable-xen,--disable-xen,xen-tools,xen-tools-libxenstore xen-tools-libxenctrl xen-tools-libxenguest" -PACKAGECONFIG[vnc-sasl] = "--enable-vnc --enable-vnc-sasl,--disable-vnc-sasl,cyrus-sasl," -PACKAGECONFIG[vnc-jpeg] = "--enable-vnc --enable-vnc-jpeg,--disable-vnc-jpeg,jpeg," -PACKAGECONFIG[libcurl] = "--enable-curl,--disable-curl,curl," -PACKAGECONFIG[nss] = "--enable-smartcard,--disable-smartcard,nss," -PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses," -PACKAGECONFIG[gtk+] = "--enable-gtk,--disable-gtk,gtk+3 gettext-native" -PACKAGECONFIG[vte] = "--enable-vte,--disable-vte,vte gettext-native" -PACKAGECONFIG[libcap-ng] = "--enable-cap-ng,--disable-cap-ng,libcap-ng," -PACKAGECONFIG[ssh] = "--enable-libssh,--disable-libssh,libssh," -PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt," -PACKAGECONFIG[nettle] = "--enable-nettle,--disable-nettle,nettle" -PACKAGECONFIG[libusb] = "--enable-libusb,--disable-libusb,libusb1" -PACKAGECONFIG[fdt] = "--enable-fdt,--disable-fdt,dtc" -PACKAGECONFIG[alsa] = "--audio-drv-list=default,,alsa-lib" -PACKAGECONFIG[epoxy] = "--enable-opengl,--disable-opengl,libepoxy" -PACKAGECONFIG[lzo] = "--enable-lzo,--disable-lzo,lzo" -PACKAGECONFIG[dax] = "--enable-libdaxctl,--disable-libdaxctl,ndctl" -PACKAGECONFIG[numa] = "--enable-numa,--disable-numa,numactl" -PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls" -PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2" -PACKAGECONFIG[libiscsi] = "--enable-libiscsi,--disable-libiscsi" -PACKAGECONFIG[kvm] = "--enable-kvm,--disable-kvm" -PACKAGECONFIG[virglrenderer] = "--enable-virglrenderer,--disable-virglrenderer,virglrenderer" -# spice will be in meta-networking layer -PACKAGECONFIG[spice] = "--enable-spice,--disable-spice,spice" -# usbredir will be in meta-networking layer -PACKAGECONFIG[dbus-display] = "--enable-dbus-display,--disable-dbus-display,glib-2.0-native,dbus" -PACKAGECONFIG[usb-redir] = "--enable-usb-redir,--disable-usb-redir,usbredir" -PACKAGECONFIG[snappy] = "--enable-snappy,--disable-snappy,snappy" -PACKAGECONFIG[glusterfs] = "--enable-glusterfs,--disable-glusterfs,glusterfs" -PACKAGECONFIG[xkbcommon] = "--enable-xkbcommon,--disable-xkbcommon,libxkbcommon" -PACKAGECONFIG[libudev] = "--enable-libudev,--disable-libudev,udev" -PACKAGECONFIG[attr] = "--enable-attr,--disable-attr,attr," -PACKAGECONFIG[rbd] = "--enable-rbd,--disable-rbd,ceph,ceph" -PACKAGECONFIG[vhost] = "--enable-vhost-net,--disable-vhost-net,," -PACKAGECONFIG[ust] = "--enable-trace-backends=ust,,lttng-ust," -PACKAGECONFIG[pie] = "--enable-pie,--disable-pie,," -PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp" -# libnfs is currently provided by meta-kodi -PACKAGECONFIG[libnfs] = "--enable-libnfs,--disable-libnfs,libnfs" -PACKAGECONFIG[pmem] = "--enable-libpmem,--disable-libpmem,pmdk" -PACKAGECONFIG[pulseaudio] = "--enable-pa,--disable-pa,pulseaudio" -PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux" -PACKAGECONFIG[bpf] = "--enable-bpf,--disable-bpf,libbpf" -PACKAGECONFIG[capstone] = "--enable-capstone,--disable-capstone" -PACKAGECONFIG[rdma] = "--enable-rdma,--disable-rdma" -PACKAGECONFIG[vde] = "--enable-vde,--disable-vde" -PACKAGECONFIG[fuse] = "--enable-fuse --enable-fuse-lseek,--disable-fuse --disable-fuse-lseek,fuse3" -PACKAGECONFIG[slirp] = "--enable-slirp,--disable-slirp,libslirp" -PACKAGECONFIG[brlapi] = "--enable-brlapi,--disable-brlapi" -PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack," -PACKAGECONFIG[debuginfo] = "--enable-libdw,--disable-libdw,elfutils" -PACKAGECONFIG[pipewire] = "--enable-pipewire,--disable-pipewire,pipewire" -PACKAGECONFIG[sndio] = "--enable-sndio,--disable-sndio,sndio" - -INSANE_SKIP:${PN}-common = "arch" - -FILES:${PN} += "${datadir}/icons" - -# For user who want to install all arch packages -PACKAGES =+ "${PN}-common" -RDEPENDS:${PN} += "${PN}-common" - -ALLOW_EMPTY:${PN} = "1" -FILES:${PN} = "" - -FILES:${PN}-common = "${bindir}/* ${includedir}/* ${libexecdir}/* ${datadir}/* ${localstatedir}" - -PACKAGES_DYNAMIC += "^${PN}-user-.* ^${PN}-system-.*" - -#PACKAGESPLITFUNCS =+ "split_qemu_packages" - -python split_qemu_packages () { - archdir = d.expand('${bindir}/') - subpackages = do_split_packages(d, archdir, r'^qemu-system-(.*)$', '${PN}-system-%s', 'QEMU full system emulation binaries(%s)' , prepend=True, extra_depends='${PN}-common') - - subpackages += do_split_packages(d, archdir, r'^qemu-((?!system|edid|ga|img|io|nbd|pr-helper|storage-daemon).*)$', '${PN}-user-%s', 'QEMU full user emulation binaries(%s)' , prepend=True, extra_depends='${PN}-common') - if subpackages: - d.appendVar('RDEPENDS:' + d.getVar('PN'), ' ' + ' '.join(subpackages)) -} - -# Put the guest agent in a separate package -PACKAGES =+ "${PN}-guest-agent" -SUMMARY:${PN}-guest-agent = "QEMU guest agent" -FILES:${PN}-guest-agent += " \ - ${bindir}/qemu-ga \ - ${sysconfdir}/udev/rules.d/60-qemu-guest-agent.rules \ - ${sysconfdir}/init.d/qemu-guest-agent \ - ${systemd_unitdir}/system/qemu-guest-agent.service \ -" - -INITSCRIPT_PACKAGES = "${PN}-guest-agent" -INITSCRIPT_NAME:${PN}-guest-agent = "qemu-guest-agent" -INITSCRIPT_PARAMS:${PN}-guest-agent = "defaults" - -SYSTEMD_PACKAGES = "${PN}-guest-agent" -SYSTEMD_SERVICE:${PN}-guest-agent = "qemu-guest-agent.service"