Skip to content

Commit 64dbdb4

Browse files
michalsimeknashif
authored andcommitted
meta-zephyr-sdk: xilinx_qemu: Update to QEMU 8.1.0
Update Xilinx Qemu version based on 8.1.0 which is aligned with Xilinx v2024.2 (xilinx_v2024.2 tag) tools. Also at the same time enable riscv32/64 targets and remove compilation flags which are not longer available. --disable-vnc-png was removed in Xilinx 2023.1. --disable-blobs was removed in Xilinx 2024.1. --disable-sheepdog was removed in 2022.1. There is also a need to cover new dependencies including libtasn1, bison libcrypt and ninja. And also disabling meson when Qemu is configured and enable gcrypt to emulate crypto models. Signed-off-by: Michal Simek <michal.simek@amd.com>
1 parent 2aa31a3 commit 64dbdb4

8 files changed

+262
-291
lines changed

meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/0001-Revert-target-arm-Revert-back-to-YIELD-for-WFI.patch

Lines changed: 0 additions & 39 deletions
This file was deleted.

meta-zephyr-sdk/recipes-devtools/qemu_xilinx/files/0002-Enable-WFI-CPU-halting-in-icount-mode.patch

Lines changed: 0 additions & 39 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
From d8265abdce5dc2bf74b3fccdf2b7257b4f3894f0 Mon Sep 17 00:00:00 2001
2+
From: He Zhe <zhe.he@windriver.com>
3+
Date: Wed, 28 Aug 2019 19:56:28 +0800
4+
Subject: [PATCH 04/12] configure: Add pkg-config handling for libgcrypt
5+
6+
libgcrypt may also be controlled by pkg-config, this patch adds pkg-config
7+
handling for libgcrypt.
8+
9+
Upstream-Status: Denied [https://lists.nongnu.org/archive/html/qemu-devel/2019-08/msg06333.html]
10+
11+
Signed-off-by: He Zhe <zhe.he@windriver.com>
12+
13+
---
14+
meson.build | 2 +-
15+
1 file changed, 1 insertion(+), 1 deletion(-)
16+
17+
Index: qemu-8.1.0/meson.build
18+
===================================================================
19+
--- qemu-8.1.0.orig/meson.build
20+
+++ qemu-8.1.0/meson.build
21+
@@ -1481,7 +1481,7 @@ endif
22+
if not gnutls_crypto.found()
23+
if (not get_option('gcrypt').auto() or have_system) and not get_option('nettle').enabled()
24+
gcrypt = dependency('libgcrypt', version: '>=1.8',
25+
- method: 'config-tool',
26+
+ method: 'pkg-config',
27+
required: get_option('gcrypt'))
28+
# Debian has removed -lgpg-error from libgcrypt-config
29+
# as it "spreads unnecessary dependencies" which in
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
From 2bf9388b801d4389e2d57e95a7897bfc1c42786e Mon Sep 17 00:00:00 2001
2+
From: Changqing Li <changqing.li@windriver.com>
3+
Date: Thu, 14 Jan 2021 06:33:04 +0000
4+
Subject: [PATCH 08/12] tests/meson.build: use relative path to refer to files
5+
6+
Fix error like:
7+
Fatal error: can't create tests/ptimer-test.p/..._qemu-5.2.0_hw_core_ptimer.c.o: File name too long
8+
9+
when build path is too long, use meson.source_root() will make this
10+
filename too long. Fixed by using relative path to refer to files
11+
12+
Upstream-Status: Submitted [send to qemu-devel]
13+
14+
Signed-off-by: Changqing Li <changqing.li@windriver.com>
15+
16+
---
17+
tests/unit/meson.build | 4 ++--
18+
1 file changed, 2 insertions(+), 2 deletions(-)
19+
20+
Index: qemu-8.0.0/tests/unit/meson.build
21+
===================================================================
22+
--- qemu-8.0.0.orig/tests/unit/meson.build
23+
+++ qemu-8.0.0/tests/unit/meson.build
24+
@@ -46,7 +46,7 @@ tests = {
25+
'test-keyval': [testqapi],
26+
'test-logging': [],
27+
'test-uuid': [],
28+
- 'ptimer-test': ['ptimer-test-stubs.c', meson.project_source_root() / 'hw/core/ptimer.c'],
29+
+ 'ptimer-test': ['ptimer-test-stubs.c', '../../hw/core/ptimer.c'],
30+
'test-qapi-util': [],
31+
'test-interval-tree': [],
32+
'test-xs-node': [qom],
33+
@@ -136,7 +136,7 @@ if have_system
34+
'test-util-sockets': ['socket-helpers.c'],
35+
'test-base64': [],
36+
'test-bufferiszero': [],
37+
- 'test-smp-parse': [qom, meson.project_source_root() / 'hw/core/machine-smp.c'],
38+
+ 'test-smp-parse': [qom, '../../hw/core/machine-smp.c'],
39+
'test-vmstate': [migration, io],
40+
'test-yank': ['socket-helpers.c', qom, io, chardev]
41+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
From 76c3fc4c87231bed32974ebbbdb5079cff45a6b7 Mon Sep 17 00:00:00 2001
2+
From: Richard Purdie <richard.purdie@linuxfoundation.org>
3+
Date: Tue, 5 Jan 2021 23:00:14 +0000
4+
Subject: [PATCH 12/12] qemu: Upgrade 5.1.0->5.2.0
5+
6+
We need to be able to trigger configure's cross code but we don't want
7+
to set cross_prefix as it does other things we don't want. Patch things
8+
so we can do what we need in the target config case.
9+
10+
Upstream-Status: Inappropriate [may be rewritten in a way upstream may accept?]
11+
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12+
13+
---
14+
configure | 4 ----
15+
1 file changed, 4 deletions(-)
16+
17+
Index: qemu-8.0.0/configure
18+
===================================================================
19+
--- qemu-8.0.0.orig/configure
20+
+++ qemu-8.0.0/configure
21+
@@ -2590,7 +2590,6 @@ if test "$skip_meson" = no; then
22+
echo "widl = [$(meson_quote $widl)]" >> $cross
23+
echo "windres = [$(meson_quote $windres)]" >> $cross
24+
echo "windmc = [$(meson_quote $windmc)]" >> $cross
25+
- if test "$cross_compile" = "yes"; then
26+
cross_arg="--cross-file config-meson.cross"
27+
echo "[host_machine]" >> $cross
28+
echo "system = '$targetos'" >> $cross
29+
@@ -2608,9 +2607,6 @@ if test "$skip_meson" = no; then
30+
else
31+
echo "endian = 'little'" >> $cross
32+
fi
33+
- else
34+
- cross_arg="--native-file config-meson.cross"
35+
- fi
36+
mv $cross config-meson.cross
37+
38+
rm -rf meson-private meson-info meson-logs
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Upstream-Status: Inappropriate [workaround, would need a real fix for upstream]
2+
3+
Index: qemu-8.1.0/configure
4+
===================================================================
5+
--- qemu-8.1.0.orig/configure
6+
+++ qemu-8.1.0/configure
7+
@@ -1032,12 +1032,7 @@ then
8+
exit 1
9+
fi
10+
11+
-# At this point, we expect Meson to be installed and available.
12+
-# We expect mkvenv or pip to have created pyvenv/bin/meson for us.
13+
-# We ignore PATH completely here: we want to use the venv's Meson
14+
-# *exclusively*.
15+
-
16+
-meson="$(cd pyvenv/bin; pwd)/meson"
17+
+meson=`which meson`
18+
19+
# Conditionally ensure Sphinx is installed.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
qemu: Ensure pip and the python venv aren't used for meson
2+
3+
Qemu wants to use a supported python version and a specific meson version
4+
to "help" users and uses pip and creates a venv to do this. This is a nightmare
5+
for us. Our versions stay up to date and should be supported so we don't
6+
really need/want this wrapping. Tweak things to disable it.
7+
8+
There was breakage from the wrapper shown by:
9+
10+
bitbake qemu-system-native
11+
<add DISTRO_FEATURES:remove = "opengl" to local.conf>
12+
bitbake qemu-system-native -c configure
13+
14+
which would crash. The issue is the change in configuration removes pieces
15+
from the sysroot but pyc files remainm as do pieces of pip which causes
16+
problems.
17+
18+
Ideally we'd convince upstream to allow some way to disable the venv on
19+
the understanding that if/when it breaks, we keep the pieces. The patch
20+
as it stands is a workaround.
21+
22+
Upstream-Status: Inappropriate [oe specific]
23+
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
24+
25+
Index: qemu-8.1.2/configure
26+
===================================================================
27+
--- qemu-8.1.2.orig/configure
28+
+++ qemu-8.1.2/configure
29+
@@ -1009,7 +1009,7 @@ python="$(command -v "$python")"
30+
echo "python determined to be '$python'"
31+
echo "python version: $($python --version)"
32+
33+
-python="$($python -B "${source_path}/python/scripts/mkvenv.py" create pyvenv)"
34+
+python=python3
35+
if test "$?" -ne 0 ; then
36+
error_exit "python venv creation failed"
37+
fi
38+
@@ -1017,6 +1017,7 @@ fi
39+
# Suppress writing compiled files
40+
python="$python -B"
41+
mkvenv="$python ${source_path}/python/scripts/mkvenv.py"
42+
+mkvenv=true
43+
44+
mkvenv_flags=""
45+
if test "$download" = "enabled" ; then

0 commit comments

Comments
 (0)