summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-core
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@amd.com>2024-05-18 12:03:32 -0600
committerMark Hatle <mark.hatle@amd.com>2024-05-18 13:06:47 -0600
commit7d826f4747ab4b63089f71e44874f26e8e5b45f5 (patch)
tree2f34c888f0f520538e032e45cabbaf0363788b19 /meta-xilinx-core
parentfa7fc711d6a7e07c09927caa3f459a8a3bb04aed (diff)
downloadmeta-xilinx-7d826f4747ab4b63089f71e44874f26e8e5b45f5.tar.gz
qemu: Update from older versions to 2024.1 - 8.1.0 version
The 8.1.x integration is a forward port from poky as of commit 4bb222e0d71a4cb159b8a4f1a90b65b1af32ac10. We need the 8.1.x version to match the AMD qemu-xlnx fork version. Remove all of the older 2022.1 - 2023.2 versions. No reason to keep these old versions, as the latest will do everything the older one can. Note, some of the devicetrees may have changed names, requiring BSPs with integrated PS and PMU/PMC DTBs to be changed. This version corrects the QMP integration with the Yocto Project ptest runner. There may still be issues with the ptest runner, but qemu itself should now be compatible. Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Diffstat (limited to 'meta-xilinx-core')
-rw-r--r--meta-xilinx-core/conf/layer.conf9
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1.inc290
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch (renamed from meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch)13
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch355
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0003-apic-fixup-fallthrough-to-PIC.patch (renamed from meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0003-apic-fixup-fallthrough-to-PIC.patch)13
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch (renamed from meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch)17
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0005-qemu-Do-not-include-file-if-not-exists.patch (renamed from meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0005-qemu-Do-not-include-file-if-not-exists.patch)13
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch (renamed from meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch)13
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0007-qemu-Determinism-fixes.patch (renamed from meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0007-qemu-Determinism-fixes.patch)11
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch (renamed from meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch)29
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch (renamed from meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch)11
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch (renamed from meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch)17
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/cross.patch (renamed from meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/cross.patch)12
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixedmeson.patch20
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixmips.patch18
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/no-pip.patch45
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/powerpc_rom.bin (renamed from meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/powerpc_rom.bin)bin4096 -> 4096 bytes
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.init75
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.udev2
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/run-ptest (renamed from meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/run-ptest)0
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.1.bb8
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.2.bb6
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.1.bb6
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.2.bb6
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2024.1.bb6
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-native-8.1.inc7
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-targets-8.1.inc28
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.1.inc8
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.2.inc8
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.1.inc3
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.2.inc3
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2024.1.inc3
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-net-tulip-Restrict-DMA-engine-to-memories.patch64
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0002-chardev-connect-socket-to-a-spawned-command.patch246
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/CVE-2022-3165.patch59
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/arm-cpreg-fix.patch27
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/qemu-7.0.0-glibc-2.36.patch46
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.inc65
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-8.1.inc79
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-7.1.inc4
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-8.1.inc2
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.1.bb21
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.2.bb21
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.1.bb21
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.2.bb21
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2024.1.bb11
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb38
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.2.bb38
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.1.bb38
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.2.bb38
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2024.1.bb35
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.1.bb38
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.2.bb36
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.1.bb38
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2024.1.bb (renamed from meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.2.bb)42
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu_8.1.2.bb29
56 files changed, 1090 insertions, 1022 deletions
diff --git a/meta-xilinx-core/conf/layer.conf b/meta-xilinx-core/conf/layer.conf
index f7310bf1..ada4e688 100644
--- a/meta-xilinx-core/conf/layer.conf
+++ b/meta-xilinx-core/conf/layer.conf
@@ -46,15 +46,6 @@ XILINX_RELEASE_VERSION ??= "v2023.2"
46 46
47BUILDCFG_VARS:append = " SOC_VARIANT XILINX_RELEASE_VERSION" 47BUILDCFG_VARS:append = " SOC_VARIANT XILINX_RELEASE_VERSION"
48 48
49XILINX_QEMU_VERSION[v2022.1] = "v7.1.0-xilinx-v2022.1%"
50XILINX_QEMU_VERSION[v2022.2] = "v7.1.0-xilinx-v2022.2%"
51XILINX_QEMU_VERSION[v2023.1] = "v7.1.0-xilinx-v2023.1%"
52XILINX_QEMU_VERSION[v2023.2] = "v7.1.0-xilinx-v2023.2%"
53PREFERRED_VERSION_qemu-xilinx ?= "${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}"
54PREFERRED_VERSION_qemu-xilinx-native ?= "${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}"
55PREFERRED_VERSION_qemu-xilinx-system-native ?= "${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}"
56PREFERRED_VERSION_qemu-devicetrees ?= "xilinx-${XILINX_RELEASE_VERSION}%"
57
58DEFAULT_XILINX_QEMU = "qemu-xilinx" 49DEFAULT_XILINX_QEMU = "qemu-xilinx"
59DEFAULT_XILINX_QEMU:arm = "qemu" 50DEFAULT_XILINX_QEMU:arm = "qemu"
60PREFERRED_PROVIDER_qemu ?= "${DEFAULT_XILINX_QEMU}" 51PREFERRED_PROVIDER_qemu ?= "${DEFAULT_XILINX_QEMU}"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1.inc
new file mode 100644
index 00000000..5154e247
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1.inc
@@ -0,0 +1,290 @@
1SUMMARY = "Fast open source processor emulator"
2DESCRIPTION = "QEMU is a hosted virtual machine monitor: it emulates the \
3machine's processor through dynamic binary translation and provides a set \
4of different hardware and device models for the machine, enabling it to run \
5a variety of guest operating systems"
6HOMEPAGE = "http://qemu.org"
7LICENSE = "GPL-2.0-only & LGPL-2.1-only"
8
9DEPENDS += "bison-native meson-native ninja-native"
10
11RDEPENDS:${PN}-ptest = "bash"
12
13require qemu-targets-8.1.inc
14# https://gitlab.com/qemu-project/qemu/-/commit/81e2b198a8cb4ee5fdf108bd438f44b193ee3a36 means
15# we need a full python3-native setup
16inherit pkgconfig ptest update-rc.d systemd python3native
17
18LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
19 file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f"
20
21SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
22 file://powerpc_rom.bin \
23 file://run-ptest \
24 file://0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch \
25 file://0003-apic-fixup-fallthrough-to-PIC.patch \
26 file://0004-configure-Add-pkg-config-handling-for-libgcrypt.patch \
27 file://0005-qemu-Do-not-include-file-if-not-exists.patch \
28 file://0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch \
29 file://0007-qemu-Determinism-fixes.patch \
30 file://0008-tests-meson.build-use-relative-path-to-refer-to-file.patch \
31 file://0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch \
32 file://0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch \
33 file://0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch \
34 file://fixedmeson.patch \
35 file://fixmips.patch \
36 file://no-pip.patch \
37 file://qemu-guest-agent.init \
38 file://qemu-guest-agent.udev \
39 "
40UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
41
42
43SRC_URI[sha256sum] = "541526a764576eb494d2ff5ec46aeb253e62ea29035d1c23c0a8af4e6cd4f087"
44
45SRC_URI:append:class-target = " file://cross.patch"
46SRC_URI:append:class-nativesdk = " file://cross.patch"
47
48CVE_STATUS[CVE-2017-5957] = "cpe-incorrect: Applies against virglrender < 0.6.0 and not qemu itself"
49
50CVE_STATUS[CVE-2007-0998] = "not-applicable-config: The VNC server can expose host files uder some circumstances. We don't enable it by default."
51
52# https://bugzilla.redhat.com/show_bug.cgi?id=1609015#c11
53CVE_STATUS[CVE-2018-18438] = "disputed: The issues identified by this CVE were determined to not constitute a vulnerability."
54
55# As per https://nvd.nist.gov/vuln/detail/CVE-2023-0664
56# https://bugzilla.redhat.com/show_bug.cgi?id=2167423
57CVE_STATUS[CVE-2023-0664] = "not-applicable-platform: Issue only applies on Windows"
58
59# As per https://bugzilla.redhat.com/show_bug.cgi?id=2203387
60CVE_STATUS[CVE-2023-2680] = "not-applicable-platform: RHEL specific issue."
61
62COMPATIBLE_HOST:mipsarchn32 = "null"
63COMPATIBLE_HOST:mipsarchn64 = "null"
64COMPATIBLE_HOST:riscv32 = "null"
65
66# Per https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03873.html
67# upstream states qemu doesn't work without optimization
68DEBUG_BUILD = "0"
69
70do_install:append() {
71 # Prevent QA warnings about installed ${localstatedir}/run
72 if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi
73}
74
75do_install_ptest() {
76 cp -rL ${B}/tests ${D}${PTEST_PATH}
77 find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcodp]" | xargs -i rm -rf {}
78
79 # Don't check the file genreated by configure
80 sed -i -e "1s,#!/usr/bin/bash,#!${base_bindir}/bash," ${D}${PTEST_PATH}/tests/data/acpi/disassemle-aml.sh
81
82 # Strip the paths from the QEMU variable, we can use PATH
83 makfiles=$(find ${D}${PTEST_PATH} -name "*.mak")
84 sed -i -e "s#^QEMU=.*/qemu-#QEMU=qemu-#g" $makfiles
85
86 # Strip compiler flags as they break reproducibility
87 sed -i -e "s,^CC=.*,CC=gcc," \
88 -e "s,^CCAS=.*,CCAS=gcc," \
89 -e "s,^LD=.*,LD=ld," $makfiles
90
91 # Update SRC_PATH variable to the right place on target
92 sed -i -e "s#^SRC_PATH=.*#SRC_PATH=${PTEST_PATH}#g" $makfiles
93
94 # https://gitlab.com/qemu-project/qemu/-/issues/1403
95 rm ${D}${PTEST_PATH}/tests/unit/test-io-channel-command
96}
97
98# QEMU_TARGETS is overridable variable
99QEMU_TARGETS ?= "arm aarch64 i386 loongarch64 mips mipsel mips64 mips64el ppc ppc64 ppc64le riscv32 riscv64 sh4 x86_64"
100
101EXTRA_OECONF = " \
102 --prefix=${prefix} \
103 --bindir=${bindir} \
104 --includedir=${includedir} \
105 --libdir=${libdir} \
106 --mandir=${mandir} \
107 --datadir=${datadir} \
108 --docdir=${docdir}/${BPN} \
109 --sysconfdir=${sysconfdir} \
110 --libexecdir=${libexecdir} \
111 --localstatedir=${localstatedir} \
112 --with-suffix=${BPN} \
113 --disable-strip \
114 --disable-werror \
115 --extra-cflags='${CFLAGS}' \
116 --extra-ldflags='${LDFLAGS}' \
117 --disable-download \
118 --disable-docs \
119 --host-cc='${BUILD_CC}' \
120 ${PACKAGECONFIG_CONFARGS} \
121 "
122
123EXTRA_OECONF:append:class-target = " --cross-prefix=${HOST_PREFIX}"
124EXTRA_OECONF:append:class-nativesdk = " --cross-prefix=${HOST_PREFIX}"
125
126B = "${WORKDIR}/build"
127
128#EXTRA_OECONF:append = " --python=${HOSTTOOLS_DIR}/python3"
129
130do_configure:prepend:class-native() {
131 # Append build host pkg-config paths for native target since the host may provide sdl
132 BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config || echo "")
133 if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then
134 export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH
135 fi
136}
137
138do_configure() {
139 export PKG_CONFIG=pkg-config
140 ${S}/configure ${EXTRA_OECONF}
141}
142do_configure[cleandirs] += "${B}"
143
144do_install () {
145 export STRIP=""
146 oe_runmake 'DESTDIR=${D}' install
147
148 # If we built the guest agent, also install startup/udev rules
149 if [ -e "${D}${bindir}/qemu-ga" ]; then
150 install -d ${D}${sysconfdir}/init.d/
151 install -m 0755 ${WORKDIR}/qemu-guest-agent.init ${D}${sysconfdir}/init.d/qemu-guest-agent
152 sed -i 's:@bindir@:${bindir}:' ${D}${sysconfdir}/init.d/qemu-guest-agent
153
154 install -d ${D}${sysconfdir}/udev/rules.d/
155 install -m 0644 ${WORKDIR}/qemu-guest-agent.udev ${D}${sysconfdir}/udev/rules.d/60-qemu-guest-agent.rules
156
157 install -d ${D}${systemd_unitdir}/system/
158 install -m 0644 ${S}/contrib/systemd/qemu-guest-agent.service ${D}${systemd_unitdir}/system
159 sed -i -e 's,-/usr/bin/,-${bindir}/,g' ${D}${systemd_unitdir}/system/qemu-guest-agent.service
160 fi
161 # ELF binary /usr/share/qemu/s390-netboot.img has relocations in .text
162 rm ${D}${datadir}/qemu/s390-netboot.img -f
163 # ELF binary /usr/share/qemu/s390-ccw.img has relocations in .text [textrel]
164 rm ${D}${datadir}/qemu/s390-ccw.img -f
165}
166
167# The following fragment will create a wrapper for qemu-mips user emulation
168# binary in order to work around a segmentation fault issue. Basically, by
169# default, the reserved virtual address space for 32-on-64 bit is set to 4GB.
170# This will trigger a MMU access fault in the virtual CPU. With this change,
171# the qemu-mips works fine.
172# IMPORTANT: This piece needs to be removed once the root cause is fixed!
173do_install:append() {
174 if [ -e "${D}/${bindir}/qemu-mips" ]; then
175 create_wrapper ${D}/${bindir}/qemu-mips \
176 QEMU_RESERVED_VA=0x0
177 fi
178}
179# END of qemu-mips workaround
180
181# Disable kvm/virgl/mesa on targets that do not support it
182PACKAGECONFIG:remove:darwin = "kvm virglrenderer epoxy gtk+"
183PACKAGECONFIG:remove:mingw32 = "kvm virglrenderer epoxy gtk+ pie"
184
185PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl2"
186PACKAGECONFIG[png] = "--enable-png,--disable-png,libpng"
187PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr --enable-cap-ng,--disable-virtfs,libcap-ng attr,"
188PACKAGECONFIG[aio] = "--enable-linux-aio,--disable-linux-aio,libaio,"
189PACKAGECONFIG[uring] = "--enable-linux-io-uring,--disable-linux-io-uring,liburing"
190PACKAGECONFIG[xen] = "--enable-xen,--disable-xen,xen-tools,xen-tools-libxenstore xen-tools-libxenctrl xen-tools-libxenguest"
191PACKAGECONFIG[vnc-sasl] = "--enable-vnc --enable-vnc-sasl,--disable-vnc-sasl,cyrus-sasl,"
192PACKAGECONFIG[vnc-jpeg] = "--enable-vnc --enable-vnc-jpeg,--disable-vnc-jpeg,jpeg,"
193PACKAGECONFIG[libcurl] = "--enable-curl,--disable-curl,curl,"
194PACKAGECONFIG[nss] = "--enable-smartcard,--disable-smartcard,nss,"
195PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses,"
196PACKAGECONFIG[gtk+] = "--enable-gtk,--disable-gtk,gtk+3 gettext-native"
197PACKAGECONFIG[vte] = "--enable-vte,--disable-vte,vte gettext-native"
198PACKAGECONFIG[libcap-ng] = "--enable-cap-ng,--disable-cap-ng,libcap-ng,"
199PACKAGECONFIG[ssh] = "--enable-libssh,--disable-libssh,libssh,"
200PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt,"
201PACKAGECONFIG[nettle] = "--enable-nettle,--disable-nettle,nettle"
202PACKAGECONFIG[libusb] = "--enable-libusb,--disable-libusb,libusb1"
203PACKAGECONFIG[fdt] = "--enable-fdt,--disable-fdt,dtc"
204PACKAGECONFIG[alsa] = "--audio-drv-list=default,,alsa-lib"
205PACKAGECONFIG[epoxy] = "--enable-opengl,--disable-opengl,libepoxy"
206PACKAGECONFIG[lzo] = "--enable-lzo,--disable-lzo,lzo"
207PACKAGECONFIG[dax] = "--enable-libdaxctl,--disable-libdaxctl,ndctl"
208PACKAGECONFIG[numa] = "--enable-numa,--disable-numa,numactl"
209PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls"
210PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2"
211PACKAGECONFIG[libiscsi] = "--enable-libiscsi,--disable-libiscsi"
212PACKAGECONFIG[kvm] = "--enable-kvm,--disable-kvm"
213PACKAGECONFIG[virglrenderer] = "--enable-virglrenderer,--disable-virglrenderer,virglrenderer"
214# spice will be in meta-networking layer
215PACKAGECONFIG[spice] = "--enable-spice,--disable-spice,spice"
216# usbredir will be in meta-networking layer
217PACKAGECONFIG[dbus-display] = "--enable-dbus-display,--disable-dbus-display,glib-2.0-native,dbus"
218PACKAGECONFIG[usb-redir] = "--enable-usb-redir,--disable-usb-redir,usbredir"
219PACKAGECONFIG[snappy] = "--enable-snappy,--disable-snappy,snappy"
220PACKAGECONFIG[glusterfs] = "--enable-glusterfs,--disable-glusterfs,glusterfs"
221PACKAGECONFIG[xkbcommon] = "--enable-xkbcommon,--disable-xkbcommon,libxkbcommon"
222PACKAGECONFIG[libudev] = "--enable-libudev,--disable-libudev,udev"
223PACKAGECONFIG[attr] = "--enable-attr,--disable-attr,attr,"
224PACKAGECONFIG[rbd] = "--enable-rbd,--disable-rbd,ceph,ceph"
225PACKAGECONFIG[vhost] = "--enable-vhost-net,--disable-vhost-net,,"
226PACKAGECONFIG[ust] = "--enable-trace-backends=ust,,lttng-ust,"
227PACKAGECONFIG[pie] = "--enable-pie,--disable-pie,,"
228PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp"
229# libnfs is currently provided by meta-kodi
230PACKAGECONFIG[libnfs] = "--enable-libnfs,--disable-libnfs,libnfs"
231PACKAGECONFIG[pmem] = "--enable-libpmem,--disable-libpmem,pmdk"
232PACKAGECONFIG[pulseaudio] = "--enable-pa,--disable-pa,pulseaudio"
233PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux"
234PACKAGECONFIG[bpf] = "--enable-bpf,--disable-bpf,libbpf"
235PACKAGECONFIG[capstone] = "--enable-capstone,--disable-capstone"
236PACKAGECONFIG[rdma] = "--enable-rdma,--disable-rdma"
237PACKAGECONFIG[vde] = "--enable-vde,--disable-vde"
238PACKAGECONFIG[fuse] = "--enable-fuse --enable-fuse-lseek,--disable-fuse --disable-fuse-lseek,fuse3"
239PACKAGECONFIG[slirp] = "--enable-slirp,--disable-slirp,libslirp"
240PACKAGECONFIG[brlapi] = "--enable-brlapi,--disable-brlapi"
241PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack,"
242PACKAGECONFIG[debuginfo] = "--enable-libdw,--disable-libdw,elfutils"
243PACKAGECONFIG[pipewire] = "--enable-pipewire,--disable-pipewire,pipewire"
244PACKAGECONFIG[sndio] = "--enable-sndio,--disable-sndio,sndio"
245
246INSANE_SKIP:${PN}-common = "arch"
247
248FILES:${PN} += "${datadir}/icons"
249
250# For user who want to install all arch packages
251PACKAGES =+ "${PN}-common"
252RDEPENDS:${PN} += "${PN}-common"
253
254ALLOW_EMPTY:${PN} = "1"
255FILES:${PN} = ""
256
257FILES:${PN}-common = "${bindir}/* ${includedir}/* ${libexecdir}/* ${datadir}/* ${localstatedir}"
258
259PACKAGES_DYNAMIC += "^${PN}-user-.* ^${PN}-system-.*"
260
261PACKAGESPLITFUNCS =+ "split_qemu_packages"
262
263python split_qemu_packages () {
264 archdir = d.expand('${bindir}/')
265 subpackages = do_split_packages(d, archdir, r'^qemu-system-(.*)$', '${PN}-system-%s', 'QEMU full system emulation binaries(%s)' , prepend=True, extra_depends='${PN}-common')
266
267 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')
268 if subpackages:
269 d.appendVar('RDEPENDS:' + d.getVar('PN'), ' ' + ' '.join(subpackages))
270 mipspackage = d.getVar('PN') + "-user-mips"
271 if mipspackage in ' '.join(subpackages):
272 d.appendVar('RDEPENDS:' + mipspackage, ' ' + d.getVar("MLPREFIX") + 'bash')
273}
274
275# Put the guest agent in a separate package
276PACKAGES =+ "${PN}-guest-agent"
277SUMMARY:${PN}-guest-agent = "QEMU guest agent"
278FILES:${PN}-guest-agent += " \
279 ${bindir}/qemu-ga \
280 ${sysconfdir}/udev/rules.d/60-qemu-guest-agent.rules \
281 ${sysconfdir}/init.d/qemu-guest-agent \
282 ${systemd_unitdir}/system/qemu-guest-agent.service \
283"
284
285INITSCRIPT_PACKAGES = "${PN}-guest-agent"
286INITSCRIPT_NAME:${PN}-guest-agent = "qemu-guest-agent"
287INITSCRIPT_PARAMS:${PN}-guest-agent = "defaults"
288
289SYSTEMD_PACKAGES = "${PN}-guest-agent"
290SYSTEMD_SERVICE:${PN}-guest-agent = "qemu-guest-agent.service"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
index 6fb160e6..c6550801 100644
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
@@ -18,11 +18,11 @@ Signed-off-by: Roy Li <rongqing.li@windriver.com>
18 hw/mips/malta.c | 2 +- 18 hw/mips/malta.c | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-) 19 1 file changed, 1 insertion(+), 1 deletion(-)
20 20
21diff --git a/hw/mips/malta.c b/hw/mips/malta.c 21Index: qemu-8.0.0/hw/mips/malta.c
22index 628851172..12d37f35d 100644 22===================================================================
23--- a/hw/mips/malta.c 23--- qemu-8.0.0.orig/hw/mips/malta.c
24+++ b/hw/mips/malta.c 24+++ qemu-8.0.0/hw/mips/malta.c
25@@ -61,7 +61,7 @@ 25@@ -64,7 +64,7 @@
26 #define ENVP_PADDR 0x2000 26 #define ENVP_PADDR 0x2000
27 #define ENVP_VADDR cpu_mips_phys_to_kseg0(NULL, ENVP_PADDR) 27 #define ENVP_VADDR cpu_mips_phys_to_kseg0(NULL, ENVP_PADDR)
28 #define ENVP_NB_ENTRIES 16 28 #define ENVP_NB_ENTRIES 16
@@ -31,6 +31,3 @@ index 628851172..12d37f35d 100644
31 31
32 /* Hardware addresses */ 32 /* Hardware addresses */
33 #define FLASH_ADDRESS 0x1e000000ULL 33 #define FLASH_ADDRESS 0x1e000000ULL
34--
352.30.2
36
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch
new file mode 100644
index 00000000..ceae67be
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch
@@ -0,0 +1,355 @@
1From 71f14902256e3c3529710b713e1ea43100bf4c40 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 17 Dec 2022 08:37:46 -0800
4Subject: [PATCH 2/2] linux-user: Replace use of lfs64 related functions and
5 macros
6
7Builds defines -D_FILE_OFFSET_BITS=64 which makes the original functions
8anf macros behave same as their 64 suffixed counterparts. This also
9helps in compiling with latest musl C library, where these macros and
10functions are no more available under _GNU_SOURCE feature macro
11
12Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2022-12/msg02841.html]
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14Cc: Laurent Vivier <laurent@vivier.eu>
15---
16 linux-user/syscall.c | 153 +++++++++++--------------------------------
17 1 file changed, 39 insertions(+), 114 deletions(-)
18
19Index: qemu-8.0.0/linux-user/syscall.c
20===================================================================
21--- qemu-8.0.0.orig/linux-user/syscall.c
22+++ qemu-8.0.0/linux-user/syscall.c
23@@ -761,8 +761,8 @@ safe_syscall6(ssize_t, copy_file_range,
24 */
25 #define safe_ioctl(...) safe_syscall(__NR_ioctl, __VA_ARGS__)
26 /* Similarly for fcntl. Note that callers must always:
27- * pass the F_GETLK64 etc constants rather than the unsuffixed F_GETLK
28- * use the flock64 struct rather than unsuffixed flock
29+ * pass the F_GETLK etc constants rather than the unsuffixed F_GETLK
30+ * use the flock struct rather than unsuffixed flock
31 * This will then work and use a 64-bit offset for both 32-bit and 64-bit hosts.
32 */
33 #ifdef __NR_fcntl64
34@@ -6813,13 +6813,13 @@ static int target_to_host_fcntl_cmd(int
35 ret = cmd;
36 break;
37 case TARGET_F_GETLK:
38- ret = F_GETLK64;
39+ ret = F_GETLK;
40 break;
41 case TARGET_F_SETLK:
42- ret = F_SETLK64;
43+ ret = F_SETLK;
44 break;
45 case TARGET_F_SETLKW:
46- ret = F_SETLKW64;
47+ ret = F_SETLKW;
48 break;
49 case TARGET_F_GETOWN:
50 ret = F_GETOWN;
51@@ -6833,17 +6833,6 @@ static int target_to_host_fcntl_cmd(int
52 case TARGET_F_SETSIG:
53 ret = F_SETSIG;
54 break;
55-#if TARGET_ABI_BITS == 32
56- case TARGET_F_GETLK64:
57- ret = F_GETLK64;
58- break;
59- case TARGET_F_SETLK64:
60- ret = F_SETLK64;
61- break;
62- case TARGET_F_SETLKW64:
63- ret = F_SETLKW64;
64- break;
65-#endif
66 case TARGET_F_SETLEASE:
67 ret = F_SETLEASE;
68 break;
69@@ -6895,8 +6884,8 @@ static int target_to_host_fcntl_cmd(int
70 * them to 5, 6 and 7 before making the syscall(). Since we make the
71 * syscall directly, adjust to what is supported by the kernel.
72 */
73- if (ret >= F_GETLK64 && ret <= F_SETLKW64) {
74- ret -= F_GETLK64 - 5;
75+ if (ret >= F_GETLK && ret <= F_SETLKW) {
76+ ret -= F_GETLK - 5;
77 }
78 #endif
79
80@@ -6929,55 +6918,11 @@ static int host_to_target_flock(int type
81 return type;
82 }
83
84-static inline abi_long copy_from_user_flock(struct flock64 *fl,
85- abi_ulong target_flock_addr)
86-{
87- struct target_flock *target_fl;
88- int l_type;
89-
90- if (!lock_user_struct(VERIFY_READ, target_fl, target_flock_addr, 1)) {
91- return -TARGET_EFAULT;
92- }
93-
94- __get_user(l_type, &target_fl->l_type);
95- l_type = target_to_host_flock(l_type);
96- if (l_type < 0) {
97- return l_type;
98- }
99- fl->l_type = l_type;
100- __get_user(fl->l_whence, &target_fl->l_whence);
101- __get_user(fl->l_start, &target_fl->l_start);
102- __get_user(fl->l_len, &target_fl->l_len);
103- __get_user(fl->l_pid, &target_fl->l_pid);
104- unlock_user_struct(target_fl, target_flock_addr, 0);
105- return 0;
106-}
107-
108-static inline abi_long copy_to_user_flock(abi_ulong target_flock_addr,
109- const struct flock64 *fl)
110-{
111- struct target_flock *target_fl;
112- short l_type;
113-
114- if (!lock_user_struct(VERIFY_WRITE, target_fl, target_flock_addr, 0)) {
115- return -TARGET_EFAULT;
116- }
117-
118- l_type = host_to_target_flock(fl->l_type);
119- __put_user(l_type, &target_fl->l_type);
120- __put_user(fl->l_whence, &target_fl->l_whence);
121- __put_user(fl->l_start, &target_fl->l_start);
122- __put_user(fl->l_len, &target_fl->l_len);
123- __put_user(fl->l_pid, &target_fl->l_pid);
124- unlock_user_struct(target_fl, target_flock_addr, 1);
125- return 0;
126-}
127-
128-typedef abi_long from_flock64_fn(struct flock64 *fl, abi_ulong target_addr);
129-typedef abi_long to_flock64_fn(abi_ulong target_addr, const struct flock64 *fl);
130+typedef abi_long from_flock_fn(struct flock *fl, abi_ulong target_addr);
131+typedef abi_long to_flock_fn(abi_ulong target_addr, const struct flock *fl);
132
133 #if defined(TARGET_ARM) && TARGET_ABI_BITS == 32
134-struct target_oabi_flock64 {
135+struct target_oabi_flock {
136 abi_short l_type;
137 abi_short l_whence;
138 abi_llong l_start;
139@@ -6985,10 +6930,10 @@ struct target_oabi_flock64 {
140 abi_int l_pid;
141 } QEMU_PACKED;
142
143-static inline abi_long copy_from_user_oabi_flock64(struct flock64 *fl,
144+static inline abi_long copy_from_user_oabi_flock(struct flock *fl,
145 abi_ulong target_flock_addr)
146 {
147- struct target_oabi_flock64 *target_fl;
148+ struct target_oabi_flock *target_fl;
149 int l_type;
150
151 if (!lock_user_struct(VERIFY_READ, target_fl, target_flock_addr, 1)) {
152@@ -7009,10 +6954,10 @@ static inline abi_long copy_from_user_oa
153 return 0;
154 }
155
156-static inline abi_long copy_to_user_oabi_flock64(abi_ulong target_flock_addr,
157- const struct flock64 *fl)
158+static inline abi_long copy_to_user_oabi_flock(abi_ulong target_flock_addr,
159+ const struct flock *fl)
160 {
161- struct target_oabi_flock64 *target_fl;
162+ struct target_oabi_flock *target_fl;
163 short l_type;
164
165 if (!lock_user_struct(VERIFY_WRITE, target_fl, target_flock_addr, 0)) {
166@@ -7030,10 +6975,10 @@ static inline abi_long copy_to_user_oabi
167 }
168 #endif
169
170-static inline abi_long copy_from_user_flock64(struct flock64 *fl,
171+static inline abi_long copy_from_user_flock(struct flock *fl,
172 abi_ulong target_flock_addr)
173 {
174- struct target_flock64 *target_fl;
175+ struct target_flock *target_fl;
176 int l_type;
177
178 if (!lock_user_struct(VERIFY_READ, target_fl, target_flock_addr, 1)) {
179@@ -7054,10 +6999,10 @@ static inline abi_long copy_from_user_fl
180 return 0;
181 }
182
183-static inline abi_long copy_to_user_flock64(abi_ulong target_flock_addr,
184- const struct flock64 *fl)
185+static inline abi_long copy_to_user_flock(abi_ulong target_flock_addr,
186+ const struct flock *fl)
187 {
188- struct target_flock64 *target_fl;
189+ struct target_flock *target_fl;
190 short l_type;
191
192 if (!lock_user_struct(VERIFY_WRITE, target_fl, target_flock_addr, 0)) {
193@@ -7076,7 +7021,7 @@ static inline abi_long copy_to_user_floc
194
195 static abi_long do_fcntl(int fd, int cmd, abi_ulong arg)
196 {
197- struct flock64 fl64;
198+ struct flock fl64;
199 #ifdef F_GETOWN_EX
200 struct f_owner_ex fox;
201 struct target_f_owner_ex *target_fox;
202@@ -7089,6 +7034,7 @@ static abi_long do_fcntl(int fd, int cmd
203
204 switch(cmd) {
205 case TARGET_F_GETLK:
206+ case TARGET_F_OFD_GETLK:
207 ret = copy_from_user_flock(&fl64, arg);
208 if (ret) {
209 return ret;
210@@ -7098,32 +7044,11 @@ static abi_long do_fcntl(int fd, int cmd
211 ret = copy_to_user_flock(arg, &fl64);
212 }
213 break;
214-
215 case TARGET_F_SETLK:
216 case TARGET_F_SETLKW:
217- ret = copy_from_user_flock(&fl64, arg);
218- if (ret) {
219- return ret;
220- }
221- ret = get_errno(safe_fcntl(fd, host_cmd, &fl64));
222- break;
223-
224- case TARGET_F_GETLK64:
225- case TARGET_F_OFD_GETLK:
226- ret = copy_from_user_flock64(&fl64, arg);
227- if (ret) {
228- return ret;
229- }
230- ret = get_errno(safe_fcntl(fd, host_cmd, &fl64));
231- if (ret == 0) {
232- ret = copy_to_user_flock64(arg, &fl64);
233- }
234- break;
235- case TARGET_F_SETLK64:
236- case TARGET_F_SETLKW64:
237 case TARGET_F_OFD_SETLK:
238 case TARGET_F_OFD_SETLKW:
239- ret = copy_from_user_flock64(&fl64, arg);
240+ ret = copy_from_user_flock(&fl64, arg);
241 if (ret) {
242 return ret;
243 }
244@@ -7348,7 +7273,7 @@ static inline abi_long target_truncate64
245 arg2 = arg3;
246 arg3 = arg4;
247 }
248- return get_errno(truncate64(arg1, target_offset64(arg2, arg3)));
249+ return get_errno(truncate(arg1, target_offset64(arg2, arg3)));
250 }
251 #endif
252
253@@ -7362,7 +7287,7 @@ static inline abi_long target_ftruncate6
254 arg2 = arg3;
255 arg3 = arg4;
256 }
257- return get_errno(ftruncate64(arg1, target_offset64(arg2, arg3)));
258+ return get_errno(ftruncate(arg1, target_offset64(arg2, arg3)));
259 }
260 #endif
261
262@@ -8598,7 +8523,7 @@ static int do_getdents(abi_long dirfd, a
263 void *tdirp;
264 int hlen, hoff, toff;
265 int hreclen, treclen;
266- off64_t prev_diroff = 0;
267+ off_t prev_diroff = 0;
268
269 hdirp = g_try_malloc(count);
270 if (!hdirp) {
271@@ -8651,7 +8576,7 @@ static int do_getdents(abi_long dirfd, a
272 * Return what we have, resetting the file pointer to the
273 * location of the first record not returned.
274 */
275- lseek64(dirfd, prev_diroff, SEEK_SET);
276+ lseek(dirfd, prev_diroff, SEEK_SET);
277 break;
278 }
279
280@@ -8685,7 +8610,7 @@ static int do_getdents64(abi_long dirfd,
281 void *tdirp;
282 int hlen, hoff, toff;
283 int hreclen, treclen;
284- off64_t prev_diroff = 0;
285+ off_t prev_diroff = 0;
286
287 hdirp = g_try_malloc(count);
288 if (!hdirp) {
289@@ -8727,7 +8652,7 @@ static int do_getdents64(abi_long dirfd,
290 * Return what we have, resetting the file pointer to the
291 * location of the first record not returned.
292 */
293- lseek64(dirfd, prev_diroff, SEEK_SET);
294+ lseek(dirfd, prev_diroff, SEEK_SET);
295 break;
296 }
297
298@@ -11158,7 +11083,7 @@ static abi_long do_syscall1(CPUArchState
299 return -TARGET_EFAULT;
300 }
301 }
302- ret = get_errno(pread64(arg1, p, arg3, target_offset64(arg4, arg5)));
303+ ret = get_errno(pread(arg1, p, arg3, target_offset64(arg4, arg5)));
304 unlock_user(p, arg2, ret);
305 return ret;
306 case TARGET_NR_pwrite64:
307@@ -11175,7 +11100,7 @@ static abi_long do_syscall1(CPUArchState
308 return -TARGET_EFAULT;
309 }
310 }
311- ret = get_errno(pwrite64(arg1, p, arg3, target_offset64(arg4, arg5)));
312+ ret = get_errno(pwrite(arg1, p, arg3, target_offset64(arg4, arg5)));
313 unlock_user(p, arg2, 0);
314 return ret;
315 #endif
316@@ -11998,14 +11923,14 @@ static abi_long do_syscall1(CPUArchState
317 case TARGET_NR_fcntl64:
318 {
319 int cmd;
320- struct flock64 fl;
321- from_flock64_fn *copyfrom = copy_from_user_flock64;
322- to_flock64_fn *copyto = copy_to_user_flock64;
323+ struct flock fl;
324+ from_flock_fn *copyfrom = copy_from_user_flock;
325+ to_flock_fn *copyto = copy_to_user_flock;
326
327 #ifdef TARGET_ARM
328 if (!cpu_env->eabi) {
329- copyfrom = copy_from_user_oabi_flock64;
330- copyto = copy_to_user_oabi_flock64;
331+ copyfrom = copy_from_user_oabi_flock;
332+ copyto = copy_to_user_oabi_flock;
333 }
334 #endif
335
336@@ -12015,7 +11940,7 @@ static abi_long do_syscall1(CPUArchState
337 }
338
339 switch(arg2) {
340- case TARGET_F_GETLK64:
341+ case TARGET_F_GETLK:
342 ret = copyfrom(&fl, arg3);
343 if (ret) {
344 break;
345@@ -12026,8 +11951,8 @@ static abi_long do_syscall1(CPUArchState
346 }
347 break;
348
349- case TARGET_F_SETLK64:
350- case TARGET_F_SETLKW64:
351+ case TARGET_F_SETLK:
352+ case TARGET_F_SETLKW:
353 ret = copyfrom(&fl, arg3);
354 if (ret) {
355 break;
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0003-apic-fixup-fallthrough-to-PIC.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0003-apic-fixup-fallthrough-to-PIC.patch
index f350ffce..e85f8202 100644
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0003-apic-fixup-fallthrough-to-PIC.patch
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0003-apic-fixup-fallthrough-to-PIC.patch
@@ -29,11 +29,11 @@ Signed-off-by: He Zhe <zhe.he@windriver.com>
29 hw/intc/apic.c | 2 +- 29 hw/intc/apic.c | 2 +-
30 1 file changed, 1 insertion(+), 1 deletion(-) 30 1 file changed, 1 insertion(+), 1 deletion(-)
31 31
32diff --git a/hw/intc/apic.c b/hw/intc/apic.c 32Index: qemu-8.0.0/hw/intc/apic.c
33index 3df11c34d..9506c88ce 100644 33===================================================================
34--- a/hw/intc/apic.c 34--- qemu-8.0.0.orig/hw/intc/apic.c
35+++ b/hw/intc/apic.c 35+++ qemu-8.0.0/hw/intc/apic.c
36@@ -605,7 +605,7 @@ int apic_accept_pic_intr(DeviceState *dev) 36@@ -607,7 +607,7 @@ int apic_accept_pic_intr(DeviceState *de
37 APICCommonState *s = APIC(dev); 37 APICCommonState *s = APIC(dev);
38 uint32_t lvt0; 38 uint32_t lvt0;
39 39
@@ -42,6 +42,3 @@ index 3df11c34d..9506c88ce 100644
42 return -1; 42 return -1;
43 43
44 lvt0 = s->lvt[APIC_LVT_LINT0]; 44 lvt0 = s->lvt[APIC_LVT_LINT0];
45--
462.30.2
47
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch
index 6faebd4e..f981a64a 100644
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch
@@ -14,19 +14,16 @@ Signed-off-by: He Zhe <zhe.he@windriver.com>
14 meson.build | 2 +- 14 meson.build | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-) 15 1 file changed, 1 insertion(+), 1 deletion(-)
16 16
17diff --git a/meson.build b/meson.build 17Index: qemu-8.1.0/meson.build
18index 861de93c4..d45ff2d7c 100644 18===================================================================
19--- a/meson.build 19--- qemu-8.1.0.orig/meson.build
20+++ b/meson.build 20+++ qemu-8.1.0/meson.build
21@@ -1063,7 +1063,7 @@ endif 21@@ -1481,7 +1481,7 @@ endif
22 if not gnutls_crypto.found() 22 if not gnutls_crypto.found()
23 if (not get_option('gcrypt').auto() or have_system) and not get_option('nettle').enabled() 23 if (not get_option('gcrypt').auto() or have_system) and not get_option('nettle').enabled()
24 gcrypt = dependency('libgcrypt', version: '>=1.8', 24 gcrypt = dependency('libgcrypt', version: '>=1.8',
25- method: 'config-tool', 25- method: 'config-tool',
26+ method: 'pkg-config', 26+ method: 'pkg-config',
27 required: get_option('gcrypt'), 27 required: get_option('gcrypt'))
28 kwargs: static_kwargs)
29 # Debian has removed -lgpg-error from libgcrypt-config 28 # Debian has removed -lgpg-error from libgcrypt-config
30-- 29 # as it "spreads unnecessary dependencies" which in
312.30.2
32
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0005-qemu-Do-not-include-file-if-not-exists.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0005-qemu-Do-not-include-file-if-not-exists.patch
index 3f3c39f9..38aa4c3b 100644
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0005-qemu-Do-not-include-file-if-not-exists.patch
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0005-qemu-Do-not-include-file-if-not-exists.patch
@@ -16,11 +16,11 @@ Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
16 linux-user/syscall.c | 2 ++ 16 linux-user/syscall.c | 2 ++
17 1 file changed, 2 insertions(+) 17 1 file changed, 2 insertions(+)
18 18
19diff --git a/linux-user/syscall.c b/linux-user/syscall.c 19Index: qemu-8.0.0/linux-user/syscall.c
20index f65045efe..340e0c6f0 100644 20===================================================================
21--- a/linux-user/syscall.c 21--- qemu-8.0.0.orig/linux-user/syscall.c
22+++ b/linux-user/syscall.c 22+++ qemu-8.0.0/linux-user/syscall.c
23@@ -113,7 +113,9 @@ 23@@ -115,7 +115,9 @@
24 #include <linux/blkpg.h> 24 #include <linux/blkpg.h>
25 #include <netpacket/packet.h> 25 #include <netpacket/packet.h>
26 #include <linux/netlink.h> 26 #include <linux/netlink.h>
@@ -30,6 +30,3 @@ index f65045efe..340e0c6f0 100644
30 #include <linux/rtc.h> 30 #include <linux/rtc.h>
31 #include <sound/asound.h> 31 #include <sound/asound.h>
32 #ifdef HAVE_BTRFS_H 32 #ifdef HAVE_BTRFS_H
33--
342.30.2
35
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
index 75c03693..5d1d7c68 100644
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
@@ -23,11 +23,11 @@ Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org
23 linux-user/mmap.c | 10 +++++++--- 23 linux-user/mmap.c | 10 +++++++---
24 1 file changed, 7 insertions(+), 3 deletions(-) 24 1 file changed, 7 insertions(+), 3 deletions(-)
25 25
26diff --git a/linux-user/mmap.c b/linux-user/mmap.c 26Index: qemu-8.0.0/linux-user/mmap.c
27index c125031b9..e651834a5 100644 27===================================================================
28--- a/linux-user/mmap.c 28--- qemu-8.0.0.orig/linux-user/mmap.c
29+++ b/linux-user/mmap.c 29+++ qemu-8.0.0/linux-user/mmap.c
30@@ -749,12 +749,16 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size, 30@@ -776,12 +776,16 @@ abi_long target_mremap(abi_ulong old_add
31 int prot; 31 int prot;
32 void *host_addr; 32 void *host_addr;
33 33
@@ -47,6 +47,3 @@ index c125031b9..e651834a5 100644
47 return -1; 47 return -1;
48 } 48 }
49 49
50--
512.30.2
52
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0007-qemu-Determinism-fixes.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0007-qemu-Determinism-fixes.patch
index 0d7dae36..d3f965e0 100644
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0007-qemu-Determinism-fixes.patch
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0007-qemu-Determinism-fixes.patch
@@ -16,10 +16,10 @@ RP 2021/3/1
16 scripts/decodetree.py | 2 +- 16 scripts/decodetree.py | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-) 17 1 file changed, 1 insertion(+), 1 deletion(-)
18 18
19diff --git a/scripts/decodetree.py b/scripts/decodetree.py 19Index: qemu-8.0.0/scripts/decodetree.py
20index a03dc6b5e..4ea24c1f3 100644 20===================================================================
21--- a/scripts/decodetree.py 21--- qemu-8.0.0.orig/scripts/decodetree.py
22+++ b/scripts/decodetree.py 22+++ qemu-8.0.0/scripts/decodetree.py
23@@ -1328,7 +1328,7 @@ def main(): 23@@ -1328,7 +1328,7 @@ def main():
24 toppat = ExcMultiPattern(0) 24 toppat = ExcMultiPattern(0)
25 25
@@ -29,6 +29,3 @@ index a03dc6b5e..4ea24c1f3 100644
29 f = open(filename, 'rt', encoding='utf-8') 29 f = open(filename, 'rt', encoding='utf-8')
30 parse_file(f, toppat) 30 parse_file(f, toppat)
31 f.close() 31 f.close()
32--
332.30.2
34
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch
index 43d3c7cf..a84364cc 100644
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch
@@ -17,22 +17,25 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com>
17 tests/unit/meson.build | 4 ++-- 17 tests/unit/meson.build | 4 ++--
18 1 file changed, 2 insertions(+), 2 deletions(-) 18 1 file changed, 2 insertions(+), 2 deletions(-)
19 19
20diff --git a/tests/unit/meson.build b/tests/unit/meson.build 20Index: qemu-8.0.0/tests/unit/meson.build
21index 96b295263..e4c3246dc 100644 21===================================================================
22--- a/tests/unit/meson.build 22--- qemu-8.0.0.orig/tests/unit/meson.build
23+++ b/tests/unit/meson.build 23+++ qemu-8.0.0/tests/unit/meson.build
24@@ -44,9 +44,9 @@ tests = { 24@@ -46,7 +46,7 @@ tests = {
25 'test-keyval': [testqapi], 25 'test-keyval': [testqapi],
26 'test-logging': [], 26 'test-logging': [],
27 'test-uuid': [], 27 'test-uuid': [],
28- 'ptimer-test': ['ptimer-test-stubs.c', meson.project_source_root() / 'hw/core/ptimer.c'], 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'], 29+ 'ptimer-test': ['ptimer-test-stubs.c', '../../hw/core/ptimer.c'],
30 'test-qapi-util': [], 30 'test-qapi-util': [],
31- 'test-smp-parse': [qom, meson.project_source_root() / 'hw/core/machine-smp.c'], 31 'test-interval-tree': [],
32+ 'test-smp-parse': [qom, '../../hw/core/machine-smp.c'], 32 'test-xs-node': [qom],
33 } 33@@ -136,7 +136,7 @@ if have_system
34 34 'test-util-sockets': ['socket-helpers.c'],
35 if have_system or have_tools 35 'test-base64': [],
36-- 36 'test-bufferiszero': [],
372.30.2 37- 'test-smp-parse': [qom, meson.project_source_root() / 'hw/core/machine-smp.c'],
38 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 }
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
index 23d0a698..4de6cc24 100644
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
@@ -18,10 +18,10 @@ Cc: Michael S. Tsirkin <mst@redhat.com>
18 util/mmap-alloc.c | 10 +++++++--- 18 util/mmap-alloc.c | 10 +++++++---
19 1 file changed, 7 insertions(+), 3 deletions(-) 19 1 file changed, 7 insertions(+), 3 deletions(-)
20 20
21diff --git a/util/mmap-alloc.c b/util/mmap-alloc.c 21Index: qemu-8.0.0/util/mmap-alloc.c
22index 893d86435..86d3cda24 100644 22===================================================================
23--- a/util/mmap-alloc.c 23--- qemu-8.0.0.orig/util/mmap-alloc.c
24+++ b/util/mmap-alloc.c 24+++ qemu-8.0.0/util/mmap-alloc.c
25@@ -10,14 +10,18 @@ 25@@ -10,14 +10,18 @@
26 * later. See the COPYING file in the top-level directory. 26 * later. See the COPYING file in the top-level directory.
27 */ 27 */
@@ -44,6 +44,3 @@ index 893d86435..86d3cda24 100644
44 #include "qemu/mmap-alloc.h" 44 #include "qemu/mmap-alloc.h"
45 #include "qemu/host-utils.h" 45 #include "qemu/host-utils.h"
46 #include "qemu/cutils.h" 46 #include "qemu/cutils.h"
47--
482.30.2
49
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch
index 810c74fa..6caf35b6 100644
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch
@@ -21,13 +21,13 @@ Signed-off-by: Yuval Shaia <yuval.shaia.ml@gmail.com>
21 hw/rdma/vmw/pvrdma_cmd.c | 6 ++++++ 21 hw/rdma/vmw/pvrdma_cmd.c | 6 ++++++
22 1 file changed, 6 insertions(+) 22 1 file changed, 6 insertions(+)
23 23
24diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c 24Index: qemu-8.0.0/hw/rdma/vmw/pvrdma_cmd.c
25index da7ddfa548..89db963c46 100644 25===================================================================
26--- a/hw/rdma/vmw/pvrdma_cmd.c 26--- qemu-8.0.0.orig/hw/rdma/vmw/pvrdma_cmd.c
27+++ b/hw/rdma/vmw/pvrdma_cmd.c 27+++ qemu-8.0.0/hw/rdma/vmw/pvrdma_cmd.c
28@@ -796,6 +796,12 @@ int pvrdma_exec_cmd(PVRDMADev *dev) 28@@ -782,6 +782,12 @@ int pvrdma_exec_cmd(PVRDMADev *dev)
29 29 goto out;
30 dsr_info = &dev->dsr_info; 30 }
31 31
32+ if (!dsr_info->dsr) { 32+ if (!dsr_info->dsr) {
33+ /* Buggy or malicious guest driver */ 33+ /* Buggy or malicious guest driver */
@@ -38,6 +38,3 @@ index da7ddfa548..89db963c46 100644
38 if (dsr_info->req->hdr.cmd >= sizeof(cmd_handlers) / 38 if (dsr_info->req->hdr.cmd >= sizeof(cmd_handlers) /
39 sizeof(struct cmd_handler)) { 39 sizeof(struct cmd_handler)) {
40 rdma_error_report("Unsupported command"); 40 rdma_error_report("Unsupported command");
41--
422.34.1
43
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/cross.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/cross.patch
index ca2ad361..112eb925 100644
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/cross.patch
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/cross.patch
@@ -14,19 +14,19 @@ Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
14 configure | 4 ---- 14 configure | 4 ----
15 1 file changed, 4 deletions(-) 15 1 file changed, 4 deletions(-)
16 16
17Index: qemu-7.1.0/configure 17Index: qemu-8.0.0/configure
18=================================================================== 18===================================================================
19--- qemu-7.1.0.orig/configure 19--- qemu-8.0.0.orig/configure
20+++ qemu-7.1.0/configure 20+++ qemu-8.0.0/configure
21@@ -2710,7 +2710,6 @@ if test "$skip_meson" = no; then 21@@ -2590,7 +2590,6 @@ if test "$skip_meson" = no; then
22 echo "strip = [$(meson_quote $strip)]" >> $cross
23 echo "widl = [$(meson_quote $widl)]" >> $cross 22 echo "widl = [$(meson_quote $widl)]" >> $cross
24 echo "windres = [$(meson_quote $windres)]" >> $cross 23 echo "windres = [$(meson_quote $windres)]" >> $cross
24 echo "windmc = [$(meson_quote $windmc)]" >> $cross
25- if test "$cross_compile" = "yes"; then 25- if test "$cross_compile" = "yes"; then
26 cross_arg="--cross-file config-meson.cross" 26 cross_arg="--cross-file config-meson.cross"
27 echo "[host_machine]" >> $cross 27 echo "[host_machine]" >> $cross
28 echo "system = '$targetos'" >> $cross 28 echo "system = '$targetos'" >> $cross
29@@ -2728,9 +2727,6 @@ if test "$skip_meson" = no; then 29@@ -2608,9 +2607,6 @@ if test "$skip_meson" = no; then
30 else 30 else
31 echo "endian = 'little'" >> $cross 31 echo "endian = 'little'" >> $cross
32 fi 32 fi
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixedmeson.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixedmeson.patch
new file mode 100644
index 00000000..0cbaea07
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixedmeson.patch
@@ -0,0 +1,20 @@
1Upstream-Status: Inappropriate [workaround, would need a real fix for upstream]
2
3Index: 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.
20
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixmips.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixmips.patch
new file mode 100644
index 00000000..01546d10
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixmips.patch
@@ -0,0 +1,18 @@
1Patch to fix mips boot hangs where virtio appears broken. Patch under discussion upstream.
2Regression is introduced by other fixes to 8.1.0 to get x86 boots working.
3
4Upstream-Status: Pending [https://lore.kernel.org/qemu-devel/6c956b90-5a13-db96-9c02-9834a512fe6f@linaro.org/]
5
6Index: qemu-8.1.0/softmmu/physmem.c
7===================================================================
8--- qemu-8.1.0.orig/softmmu/physmem.c
9+++ qemu-8.1.0/softmmu/physmem.c
10@@ -2517,7 +2517,7 @@ static void tcg_commit(MemoryListener *l
11 * That said, the listener is also called during realize, before
12 * all of the tcg machinery for run-on is initialized: thus halt_cond.
13 */
14- if (cpu->halt_cond) {
15+ if (cpu->halt_cond && !qemu_cpu_is_self(cpu)) {
16 async_run_on_cpu(cpu, tcg_commit_cpu, RUN_ON_CPU_HOST_PTR(cpuas));
17 } else {
18 tcg_commit_cpu(cpu, RUN_ON_CPU_HOST_PTR(cpuas));
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/no-pip.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/no-pip.patch
new file mode 100644
index 00000000..09e13e8b
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/no-pip.patch
@@ -0,0 +1,45 @@
1qemu: Ensure pip and the python venv aren't used for meson
2
3Qemu wants to use a supported python version and a specific meson version
4to "help" users and uses pip and creates a venv to do this. This is a nightmare
5for us. Our versions stay up to date and should be supported so we don't
6really need/want this wrapping. Tweak things to disable it.
7
8There was breakage from the wrapper shown by:
9
10bitbake qemu-system-native
11<add DISTRO_FEATURES:remove = "opengl" to local.conf>
12bitbake qemu-system-native -c configure
13
14which would crash. The issue is the change in configuration removes pieces
15from the sysroot but pyc files remainm as do pieces of pip which causes
16problems.
17
18Ideally we'd convince upstream to allow some way to disable the venv on
19the understanding that if/when it breaks, we keep the pieces. The patch
20as it stands is a workaround.
21
22Upstream-Status: Inappropriate [oe specific]
23Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
24
25Index: 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
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/powerpc_rom.bin b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/powerpc_rom.bin
index c4044296..c4044296 100644
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/powerpc_rom.bin
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/powerpc_rom.bin
Binary files differ
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.init b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.init
new file mode 100644
index 00000000..5ebaadde
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.init
@@ -0,0 +1,75 @@
1# SPDX-License-Identifier: GPL-2.0-only
2# Initially written by: Michael Tokarev <mjt@tls.msk.ru>
3# For QEMU Debian downstream package
4
5set -e
6
7. /etc/init.d/functions
8
9PATH=/sbin:/usr/sbin:/bin:/usr/bin
10DESC="QEMU Guest Agent"
11NAME=qemu-ga
12DAEMON=@bindir@/$NAME
13PIDFILE=/var/run/$NAME.pid
14
15# config
16DAEMON_ARGS=""
17# default transport
18TRANSPORT=virtio-serial:/dev/virtio-ports/org.qemu.guest_agent.0
19NO_START=0
20
21test ! -r /etc/default/qemu-guest-agent || . /etc/default/qemu-guest-agent
22test "$NO_START" = "0" || exit 0
23test -x "$DAEMON" || exit 0
24
25#
26# Function that checks whenever system has necessary environment
27# It also splits $TRANSPORT into $method and $path
28#
29do_check_transport() {
30 method=${TRANSPORT%%:*};
31 path=${TRANSPORT#*:}
32 case "$method" in
33 virtio-serial | isa-serial)
34 if [ ! -e "$path" ]; then
35 echo "$NAME: transport endpoint not found, not starting"
36 return 1
37 fi
38 ;;
39 esac
40}
41
42case "$1" in
43 start)
44 do_check_transport || exit 0
45 echo -n "Starting $DESC: "
46 start-stop-daemon -S -p $PIDFILE -x "$DAEMON" -- \
47 $DAEMON_ARGS -d -m "$method" -p "$path"
48 echo "$NAME."
49 ;;
50 stop)
51 echo -n "Stopping $DESC: "
52 start-stop-daemon -K -x "$DAEMON" -p $PIDFILE
53 echo "$NAME."
54 ;;
55 status)
56 status "$DAEMON"
57 exit $?
58 ;;
59 restart|force-reload)
60 do_check_transport || exit 0
61 echo -n "Restarting $DESC: "
62 start-stop-daemon -K -x "$DAEMON" -p $PIDFILE
63 sleep 1
64 start-stop-daemon -S -p $PIDFILE -x "$DAEMON" -- \
65 $DAEMON_ARGS -d -m "$method" -p "$path"
66 echo "$NAME."
67 ;;
68 *)
69 N=/etc/init.d/$NAME
70 echo "Usage: $N {start|stop|status|restart|force-reload}" >&2
71 exit 1
72 ;;
73esac
74
75exit 0
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.udev b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.udev
new file mode 100644
index 00000000..47097057
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.udev
@@ -0,0 +1,2 @@
1SUBSYSTEM=="virtio-ports", ATTR{name}=="org.qemu.guest_agent.0", \
2 TAG+="systemd", ENV{SYSTEMD_WANTS}="qemu-guest-agent.service"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/run-ptest b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/run-ptest
index f9a4e8fb..f9a4e8fb 100644
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/run-ptest
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/run-ptest
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.1.bb
deleted file mode 100644
index 7c734cd6..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.1.bb
+++ /dev/null
@@ -1,8 +0,0 @@
1
2require qemu-devicetrees.inc
3
4BRANCH ?= "xlnx_rel_v2022.1"
5SRCREV ?= "0499324af1178057c3730b0989c8fb5c5bbc4cf8"
6
7FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
8SRC_URI:append = " file://0001-Makefile-Use-python3-instead-of-python.patch"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.2.bb
deleted file mode 100644
index 6675ba3e..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.2.bb
+++ /dev/null
@@ -1,6 +0,0 @@
1
2require qemu-devicetrees.inc
3
4BRANCH ?= "xlnx_rel_v2022.2"
5SRCREV ?= "cf5d357e16c13ac447861f908e83951ffb7b4301"
6
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.1.bb
deleted file mode 100644
index dc1feda4..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.1.bb
+++ /dev/null
@@ -1,6 +0,0 @@
1
2require qemu-devicetrees.inc
3
4BRANCH ?= "xlnx_rel_v2023.1"
5SRCREV ?= "56538937584f527fb408347c3b430142e74723e8"
6
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.2.bb
deleted file mode 100644
index d41743c1..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.2.bb
+++ /dev/null
@@ -1,6 +0,0 @@
1
2require qemu-devicetrees.inc
3
4BRANCH ?= "xlnx_rel_v2023.2"
5SRCREV ?= "d1013382d9a5ef816cd020e7840813b7a2d65c51"
6
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2024.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2024.1.bb
new file mode 100644
index 00000000..d10504d3
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2024.1.bb
@@ -0,0 +1,6 @@
1
2require qemu-devicetrees.inc
3
4BRANCH ?= "xlnx_rel_v2024.1"
5SRCREV ?= "b9c88cbfaaa0c8b8be70ea3c74f4cb69fb02a080"
6
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-native-8.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-native-8.1.inc
new file mode 100644
index 00000000..22fa9685
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-native-8.1.inc
@@ -0,0 +1,7 @@
1require qemu-8.1.inc
2
3inherit native
4
5EXTRA_OEMAKE:append = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'"
6
7LDFLAGS:append = " -fuse-ld=bfd"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-targets-8.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-targets-8.1.inc
new file mode 100644
index 00000000..24f9a039
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-targets-8.1.inc
@@ -0,0 +1,28 @@
1# possible arch values are:
2# aarch64 arm armeb alpha cris i386 x86_64 m68k microblaze
3# mips mipsel mips64 mips64el ppc ppc64 ppc64abi32 ppcemb
4# riscv32 riscv64 sparc sparc32 sparc32plus
5
6def get_qemu_target_list(d):
7 import bb
8 archs = d.getVar('QEMU_TARGETS').split()
9 tos = d.getVar('HOST_OS')
10 softmmuonly = ""
11 for arch in ['ppcemb', 'lm32']:
12 if arch in archs:
13 softmmuonly += arch + "-softmmu,"
14 archs.remove(arch)
15 linuxuseronly = ""
16 for arch in ['armeb', 'alpha', 'ppc64abi32', 'ppc64le', 'sparc32plus', 'aarch64_be']:
17 if arch in archs:
18 linuxuseronly += arch + "-linux-user,"
19 archs.remove(arch)
20 if 'linux' not in tos:
21 return softmmuonly + ''.join([arch + "-softmmu" + "," for arch in archs]).rstrip(',')
22 return softmmuonly + linuxuseronly + ''.join([arch + "-linux-user" + "," + arch + "-softmmu" + "," for arch in archs]).rstrip(',')
23
24def get_qemu_usermode_target_list(d):
25 return ",".join(filter(lambda i: "-linux-user" in i, get_qemu_target_list(d).split(',')))
26
27def get_qemu_system_target_list(d):
28 return ",".join(filter(lambda i: "-linux-user" not in i, get_qemu_target_list(d).split(',')))
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.1.inc
deleted file mode 100644
index bb8fac70..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.1.inc
+++ /dev/null
@@ -1,8 +0,0 @@
1# Note this isn't really the 2022.1 or 2022.2 version of qemu-xilinx
2# Instead it's the current master version, as qemu 6.1.0 doesn't
3# work reliabily anymore.
4
5XILINX_QEMU_VERSION = "v7.1.0"
6BRANCH = "master"
7SRCREV = "21adc9f99e813fb24fb65421259b5b0614938376"
8
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.2.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.2.inc
deleted file mode 100644
index bb8fac70..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.2.inc
+++ /dev/null
@@ -1,8 +0,0 @@
1# Note this isn't really the 2022.1 or 2022.2 version of qemu-xilinx
2# Instead it's the current master version, as qemu 6.1.0 doesn't
3# work reliabily anymore.
4
5XILINX_QEMU_VERSION = "v7.1.0"
6BRANCH = "master"
7SRCREV = "21adc9f99e813fb24fb65421259b5b0614938376"
8
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.1.inc
deleted file mode 100644
index 06ac05a1..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.1.inc
+++ /dev/null
@@ -1,3 +0,0 @@
1XILINX_QEMU_VERSION = "v7.1.0"
2BRANCH = "xlnx_rel_v2023.1"
3SRCREV = "21adc9f99e813fb24fb65421259b5b0614938376"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.2.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.2.inc
deleted file mode 100644
index db6e1528..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.2.inc
+++ /dev/null
@@ -1,3 +0,0 @@
1XILINX_QEMU_VERSION = "v7.1.0"
2BRANCH = "xlnx_rel_v2023.2"
3SRCREV = "23b643ba1683a47ef49447a45643fe2172d6f8ca"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2024.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2024.1.inc
new file mode 100644
index 00000000..d48350b2
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2024.1.inc
@@ -0,0 +1,3 @@
1XILINX_QEMU_VERSION = "v8.1.0"
2BRANCH = "xlnx_rel_v2024.1"
3SRCREV = "2319c870e754148ec3b9d40be0d3dbee959c3251"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-net-tulip-Restrict-DMA-engine-to-memories.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-net-tulip-Restrict-DMA-engine-to-memories.patch
deleted file mode 100644
index 6c85a77b..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-net-tulip-Restrict-DMA-engine-to-memories.patch
+++ /dev/null
@@ -1,64 +0,0 @@
1CVE: CVE-2022-2962
2Upstream-Status: Backport
3Signed-off-by: Ross Burton <ross.burton@arm.com>
4
5From 5c5c50b0a73d78ffe18336c9996fef5eae9bbbb0 Mon Sep 17 00:00:00 2001
6From: Zheyu Ma <zheyuma97@gmail.com>
7Date: Sun, 21 Aug 2022 20:43:43 +0800
8Subject: [PATCH] net: tulip: Restrict DMA engine to memories
9
10The DMA engine is started by I/O access and then itself accesses the
11I/O registers, triggering a reentrancy bug.
12
13The following log can reveal it:
14==5637==ERROR: AddressSanitizer: stack-overflow
15 #0 0x5595435f6078 in tulip_xmit_list_update qemu/hw/net/tulip.c:673
16 #1 0x5595435f204a in tulip_write qemu/hw/net/tulip.c:805:13
17 #2 0x559544637f86 in memory_region_write_accessor qemu/softmmu/memory.c:492:5
18 #3 0x5595446379fa in access_with_adjusted_size qemu/softmmu/memory.c:554:18
19 #4 0x5595446372fa in memory_region_dispatch_write qemu/softmmu/memory.c
20 #5 0x55954468b74c in flatview_write_continue qemu/softmmu/physmem.c:2825:23
21 #6 0x559544683662 in flatview_write qemu/softmmu/physmem.c:2867:12
22 #7 0x5595446833f3 in address_space_write qemu/softmmu/physmem.c:2963:18
23 #8 0x5595435fb082 in dma_memory_rw_relaxed qemu/include/sysemu/dma.h:87:12
24 #9 0x5595435fb082 in dma_memory_rw qemu/include/sysemu/dma.h:130:12
25 #10 0x5595435fb082 in dma_memory_write qemu/include/sysemu/dma.h:171:12
26 #11 0x5595435fb082 in stl_le_dma qemu/include/sysemu/dma.h:272:1
27 #12 0x5595435fb082 in stl_le_pci_dma qemu/include/hw/pci/pci.h:910:1
28 #13 0x5595435fb082 in tulip_desc_write qemu/hw/net/tulip.c:101:9
29 #14 0x5595435f7e3d in tulip_xmit_list_update qemu/hw/net/tulip.c:706:9
30 #15 0x5595435f204a in tulip_write qemu/hw/net/tulip.c:805:13
31
32Fix this bug by restricting the DMA engine to memories regions.
33
34Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
35Signed-off-by: Jason Wang <jasowang@redhat.com>
36---
37 hw/net/tulip.c | 4 ++--
38 1 file changed, 2 insertions(+), 2 deletions(-)
39
40diff --git a/hw/net/tulip.c b/hw/net/tulip.c
41index 097e905bec..b9e42c322a 100644
42--- a/hw/net/tulip.c
43+++ b/hw/net/tulip.c
44@@ -70,7 +70,7 @@ static const VMStateDescription vmstate_pci_tulip = {
45 static void tulip_desc_read(TULIPState *s, hwaddr p,
46 struct tulip_descriptor *desc)
47 {
48- const MemTxAttrs attrs = MEMTXATTRS_UNSPECIFIED;
49+ const MemTxAttrs attrs = { .memory = true };
50
51 if (s->csr[0] & CSR0_DBO) {
52 ldl_be_pci_dma(&s->dev, p, &desc->status, attrs);
53@@ -88,7 +88,7 @@ static void tulip_desc_read(TULIPState *s, hwaddr p,
54 static void tulip_desc_write(TULIPState *s, hwaddr p,
55 struct tulip_descriptor *desc)
56 {
57- const MemTxAttrs attrs = MEMTXATTRS_UNSPECIFIED;
58+ const MemTxAttrs attrs = { .memory = true };
59
60 if (s->csr[0] & CSR0_DBO) {
61 stl_be_pci_dma(&s->dev, p, desc->status, attrs);
62--
632.34.1
64
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0002-chardev-connect-socket-to-a-spawned-command.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0002-chardev-connect-socket-to-a-spawned-command.patch
deleted file mode 100644
index 63a99c96..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0002-chardev-connect-socket-to-a-spawned-command.patch
+++ /dev/null
@@ -1,246 +0,0 @@
1From 14cd62607c9de232edf0a9b8503bd02783e03411 Mon Sep 17 00:00:00 2001
2From: Alistair Francis <alistair.francis@xilinx.com>
3Date: Thu, 21 Dec 2017 11:35:16 -0800
4Subject: [PATCH 02/12] chardev: connect socket to a spawned command
5
6The command is started in a shell (sh -c) with stdin connect to QEMU
7via a Unix domain stream socket. QEMU then exchanges data via its own
8end of the socket, just like it normally does.
9
10"-chardev socket" supports some ways of connecting via protocols like
11telnet, but that is only a subset of the functionality supported by
12tools socat. To use socat instead, for example to connect via a socks
13proxy, use:
14
15 -chardev 'socket,id=socat,cmd=exec socat FD:0 SOCKS4A:socks-proxy.localdomain:example.com:9999,,socksuser=nobody' \
16 -device usb-serial,chardev=socat
17
18Beware that commas in the command must be escaped as double commas.
19
20Or interactively in the console:
21 (qemu) chardev-add socket,id=cat,cmd=cat
22 (qemu) device_add usb-serial,chardev=cat
23 ^ac
24 # cat >/dev/ttyUSB0
25 hello
26 hello
27
28Another usage is starting swtpm from inside QEMU. swtpm will
29automatically shut down once it looses the connection to the parent
30QEMU, so there is no risk of lingering processes:
31
32 -chardev 'socket,id=chrtpm0,cmd=exec swtpm socket --terminate --ctrl type=unixio,,clientfd=0 --tpmstate dir=... --log file=swtpm.log' \
33 -tpmdev emulator,id=tpm0,chardev=chrtpm0 \
34 -device tpm-tis,tpmdev=tpm0
35
36The patch was discussed upstream, but QEMU developers believe that the
37code calling QEMU should be responsible for managing additional
38processes. In OE-core, that would imply enhancing runqemu and
39oeqa. This patch is a simpler solution.
40
41Because it is not going upstream, the patch was written so that it is
42as simple as possible.
43
44Upstream-Status: Inappropriate [embedded specific]
45
46Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
47
48---
49 chardev/char-socket.c | 100 ++++++++++++++++++++++++++++++++++++++++++
50 chardev/char.c | 3 ++
51 qapi/char.json | 5 +++
52 3 files changed, 108 insertions(+)
53
54diff --git a/chardev/char-socket.c b/chardev/char-socket.c
55index fab2d791d..c79641f24 100644
56--- a/chardev/char-socket.c
57+++ b/chardev/char-socket.c
58@@ -1315,6 +1315,67 @@ static bool qmp_chardev_validate_socket(ChardevSocket *sock,
59 return true;
60 }
61
62+#ifndef _WIN32
63+static void chardev_open_socket_cmd(Chardev *chr,
64+ const char *cmd,
65+ Error **errp)
66+{
67+ int fds[2] = { -1, -1 };
68+ QIOChannelSocket *sioc = NULL;
69+ pid_t pid = -1;
70+ const char *argv[] = { "/bin/sh", "-c", cmd, NULL };
71+
72+ /*
73+ * We need a Unix domain socket for commands like swtpm and a single
74+ * connection, therefore we cannot use qio_channel_command_new_spawn()
75+ * without patching it first. Duplicating the functionality is easier.
76+ */
77+ if (socketpair(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0, fds)) {
78+ error_setg_errno(errp, errno, "Error creating socketpair(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC)");
79+ goto error;
80+ }
81+
82+ pid = qemu_fork(errp);
83+ if (pid < 0) {
84+ goto error;
85+ }
86+
87+ if (!pid) {
88+ /* child */
89+ dup2(fds[1], STDIN_FILENO);
90+ execv(argv[0], (char * const *)argv);
91+ _exit(1);
92+ }
93+
94+ /*
95+ * Hand over our end of the socket pair to the qio channel.
96+ *
97+ * We don't reap the child because it is expected to keep
98+ * running. We also don't support the "reconnect" option for the
99+ * same reason.
100+ */
101+ sioc = qio_channel_socket_new_fd(fds[0], errp);
102+ if (!sioc) {
103+ goto error;
104+ }
105+ fds[0] = -1;
106+
107+ g_free(chr->filename);
108+ chr->filename = g_strdup_printf("cmd:%s", cmd);
109+ tcp_chr_new_client(chr, sioc);
110+
111+ error:
112+ if (fds[0] >= 0) {
113+ close(fds[0]);
114+ }
115+ if (fds[1] >= 0) {
116+ close(fds[1]);
117+ }
118+ if (sioc) {
119+ object_unref(OBJECT(sioc));
120+ }
121+}
122+#endif
123
124 static void qmp_chardev_open_socket(Chardev *chr,
125 ChardevBackend *backend,
126@@ -1323,6 +1384,9 @@ static void qmp_chardev_open_socket(Chardev *chr,
127 {
128 SocketChardev *s = SOCKET_CHARDEV(chr);
129 ChardevSocket *sock = backend->u.socket.data;
130+#ifndef _WIN32
131+ const char *cmd = sock->cmd;
132+#endif
133 bool do_nodelay = sock->has_nodelay ? sock->nodelay : false;
134 bool is_listen = sock->has_server ? sock->server : true;
135 bool is_telnet = sock->has_telnet ? sock->telnet : false;
136@@ -1393,6 +1457,14 @@ static void qmp_chardev_open_socket(Chardev *chr,
137
138 update_disconnected_filename(s);
139
140+#ifndef _WIN32
141+ if (cmd) {
142+ chardev_open_socket_cmd(chr, cmd, errp);
143+
144+ /* everything ready (or failed permanently) before we return */
145+ *be_opened = true;
146+ } else
147+#endif
148 if (s->is_listen) {
149 if (qmp_chardev_open_socket_server(chr, is_telnet || is_tn3270,
150 is_waitconnect, errp) < 0) {
151@@ -1412,6 +1484,9 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
152 const char *host = qemu_opt_get(opts, "host");
153 const char *port = qemu_opt_get(opts, "port");
154 const char *fd = qemu_opt_get(opts, "fd");
155+#ifndef _WIN32
156+ const char *cmd = qemu_opt_get(opts, "cmd");
157+#endif
158 #ifdef CONFIG_LINUX
159 bool tight = qemu_opt_get_bool(opts, "tight", true);
160 bool abstract = qemu_opt_get_bool(opts, "abstract", false);
161@@ -1419,6 +1494,20 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
162 SocketAddressLegacy *addr;
163 ChardevSocket *sock;
164
165+#ifndef _WIN32
166+ if (cmd) {
167+ /*
168+ * Here we have to ensure that no options are set which are incompatible with
169+ * spawning a command, otherwise unmodified code that doesn't know about
170+ * command spawning (like socket_reconnect_timeout()) might get called.
171+ */
172+ if (path || sock->server || sock->has_telnet || sock->has_tn3270 || sock->reconnect || host || port || sock->tls_creds) {
173+ error_setg(errp, "chardev: socket: cmd does not support any additional options");
174+ return;
175+ }
176+ } else
177+#endif
178+
179 if ((!!path + !!fd + !!host) > 1) {
180 error_setg(errp,
181 "None or one of 'path', 'fd' or 'host' option required.");
182@@ -1469,13 +1558,24 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
183 sock->tls_creds = g_strdup(qemu_opt_get(opts, "tls-creds"));
184 sock->has_tls_authz = qemu_opt_get(opts, "tls-authz");
185 sock->tls_authz = g_strdup(qemu_opt_get(opts, "tls-authz"));
186+#ifndef _WIN32
187+ sock->cmd = g_strdup(cmd);
188+#endif
189
190 addr = g_new0(SocketAddressLegacy, 1);
191+#ifndef _WIN32
192+ if (path || cmd) {
193+#else
194 if (path) {
195+#endif
196 UnixSocketAddress *q_unix;
197 addr->type = SOCKET_ADDRESS_TYPE_UNIX;
198 q_unix = addr->u.q_unix.data = g_new0(UnixSocketAddress, 1);
199+#ifndef _WIN32
200+ q_unix->path = cmd ? g_strdup_printf("cmd:%s", cmd) : g_strdup(path);
201+#else
202 q_unix->path = g_strdup(path);
203+#endif
204 #ifdef CONFIG_LINUX
205 q_unix->has_tight = true;
206 q_unix->tight = tight;
207diff --git a/chardev/char.c b/chardev/char.c
208index 0169d8dde..ce9a21f41 100644
209--- a/chardev/char.c
210+++ b/chardev/char.c
211@@ -835,6 +835,9 @@ QemuOptsList qemu_chardev_opts = {
212 },{
213 .name = "path",
214 .type = QEMU_OPT_STRING,
215+ },{
216+ .name = "cmd",
217+ .type = QEMU_OPT_STRING,
218 },{
219 .name = "host",
220 .type = QEMU_OPT_STRING,
221diff --git a/qapi/char.json b/qapi/char.json
222index 7b4215157..37feabdac 100644
223--- a/qapi/char.json
224+++ b/qapi/char.json
225@@ -250,6 +250,10 @@
226 #
227 # @addr: socket address to listen on (server=true)
228 # or connect to (server=false)
229+# @cmd: command to run via "sh -c" with stdin as one end of
230+# a AF_UNIX SOCK_DSTREAM socket pair. The other end
231+# is used by the chardev. Either an addr or a cmd can
232+# be specified, but not both.
233 # @tls-creds: the ID of the TLS credentials object (since 2.6)
234 # @tls-authz: the ID of the QAuthZ authorization object against which
235 # the client's x509 distinguished name will be validated. This
236@@ -276,6 +280,7 @@
237 ##
238 { 'struct': 'ChardevSocket',
239 'data': { 'addr': 'SocketAddressLegacy',
240+ '*cmd': 'str',
241 '*tls-creds': 'str',
242 '*tls-authz' : 'str',
243 '*server': 'bool',
244--
2452.30.2
246
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/CVE-2022-3165.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/CVE-2022-3165.patch
deleted file mode 100644
index 3b4a6694..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/CVE-2022-3165.patch
+++ /dev/null
@@ -1,59 +0,0 @@
1CVE: CVE-2022-3165
2Upstream-Status: Backport
3Signed-off-by: Ross Burton <ross.burton@arm.com>
4
5From d307040b18bfcb1393b910f1bae753d5c12a4dc7 Mon Sep 17 00:00:00 2001
6From: Mauro Matteo Cascella <mcascell@redhat.com>
7Date: Sun, 25 Sep 2022 22:45:11 +0200
8Subject: [PATCH] ui/vnc-clipboard: fix integer underflow in
9 vnc_client_cut_text_ext
10
11Extended ClientCutText messages start with a 4-byte header. If len < 4,
12an integer underflow occurs in vnc_client_cut_text_ext. The result is
13used to decompress data in a while loop in inflate_buffer, leading to
14CPU consumption and denial of service. Prevent this by checking dlen in
15protocol_client_msg.
16
17Fixes: CVE-2022-3165
18Fixes: 0bf41cab93e5 ("ui/vnc: clipboard support")
19Reported-by: TangPeng <tangpeng@qianxin.com>
20Signed-off-by: Mauro Matteo Cascella <mcascell@redhat.com>
21Message-Id: <20220925204511.1103214-1-mcascell@redhat.com>
22Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
23---
24 ui/vnc.c | 11 ++++++++---
25 1 file changed, 8 insertions(+), 3 deletions(-)
26
27diff --git a/ui/vnc.c b/ui/vnc.c
28index 6a05d06147..acb3629cd8 100644
29--- a/ui/vnc.c
30+++ b/ui/vnc.c
31@@ -2442,8 +2442,8 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len)
32 if (len == 1) {
33 return 8;
34 }
35+ uint32_t dlen = abs(read_s32(data, 4));
36 if (len == 8) {
37- uint32_t dlen = abs(read_s32(data, 4));
38 if (dlen > (1 << 20)) {
39 error_report("vnc: client_cut_text msg payload has %u bytes"
40 " which exceeds our limit of 1MB.", dlen);
41@@ -2456,8 +2456,13 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len)
42 }
43
44 if (read_s32(data, 4) < 0) {
45- vnc_client_cut_text_ext(vs, abs(read_s32(data, 4)),
46- read_u32(data, 8), data + 12);
47+ if (dlen < 4) {
48+ error_report("vnc: malformed payload (header less than 4 bytes)"
49+ " in extended clipboard pseudo-encoding.");
50+ vnc_client_error(vs);
51+ break;
52+ }
53+ vnc_client_cut_text_ext(vs, dlen, read_u32(data, 8), data + 12);
54 break;
55 }
56 vnc_client_cut_text(vs, read_u32(data, 4), data + 8);
57--
58GitLab
59
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/arm-cpreg-fix.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/arm-cpreg-fix.patch
deleted file mode 100644
index 071691f8..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/arm-cpreg-fix.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1target/arm: mark SP_EL1 with ARM_CP_EL3_NO_EL2_KEEP
2
3SP_EL1 must be kept when EL3 is present but EL2 is not. Therefore mark
4it with ARM_CP_EL3_NO_EL2_KEEP.
5
6Fixes: 696ba3771894 ("target/arm: Handle cpreg registration for missing EL")
7Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
8
9Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2022-09/msg04515.html]
10
11---
12 target/arm/helper.c | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15Index: qemu-7.1.0/target/arm/helper.c
16===================================================================
17--- qemu-7.1.0.orig/target/arm/helper.c
18+++ qemu-7.1.0/target/arm/helper.c
19@@ -4971,7 +4971,7 @@ static const ARMCPRegInfo v8_cp_reginfo[
20 .fieldoffset = offsetof(CPUARMState, sp_el[0]) },
21 { .name = "SP_EL1", .state = ARM_CP_STATE_AA64,
22 .opc0 = 3, .opc1 = 4, .crn = 4, .crm = 1, .opc2 = 0,
23- .access = PL2_RW, .type = ARM_CP_ALIAS,
24+ .access = PL2_RW, .type = ARM_CP_ALIAS | ARM_CP_EL3_NO_EL2_KEEP,
25 .fieldoffset = offsetof(CPUARMState, sp_el[1]) },
26 { .name = "SPSel", .state = ARM_CP_STATE_AA64,
27 .opc0 = 3, .opc1 = 0, .crn = 4, .crm = 2, .opc2 = 0,
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/qemu-7.0.0-glibc-2.36.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/qemu-7.0.0-glibc-2.36.patch
deleted file mode 100644
index abad1cfe..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/qemu-7.0.0-glibc-2.36.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1Avoid conflicts between sys/mount.h and linux/mount.h that are seen
2with glibc 2.36
3
4Source: https://github.com/archlinux/svntogit-packages/blob/packages/qemu/trunk/qemu-7.0.0-glibc-2.36.patch
5
6Upstream-Status: Pending
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8--- a/linux-user/syscall.c
9+++ b/linux-user/syscall.c
10@@ -95,7 +95,25 @@
11 #include <linux/soundcard.h>
12 #include <linux/kd.h>
13 #include <linux/mtio.h>
14+
15+#ifdef HAVE_SYS_MOUNT_FSCONFIG
16+/*
17+ * glibc >= 2.36 linux/mount.h conflicts with sys/mount.h,
18+ * which in turn prevents use of linux/fs.h. So we have to
19+ * define the constants ourselves for now.
20+ */
21+#define FS_IOC_GETFLAGS _IOR('f', 1, long)
22+#define FS_IOC_SETFLAGS _IOW('f', 2, long)
23+#define FS_IOC_GETVERSION _IOR('v', 1, long)
24+#define FS_IOC_SETVERSION _IOW('v', 2, long)
25+#define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap)
26+#define FS_IOC32_GETFLAGS _IOR('f', 1, int)
27+#define FS_IOC32_SETFLAGS _IOW('f', 2, int)
28+#define FS_IOC32_GETVERSION _IOR('v', 1, int)
29+#define FS_IOC32_SETVERSION _IOW('v', 2, int)
30+#else
31 #include <linux/fs.h>
32+#endif
33 #include <linux/fd.h>
34 #if defined(CONFIG_FIEMAP)
35 #include <linux/fiemap.h>
36--- a/meson.build
37+++ b/meson.build
38@@ -1686,6 +1686,8 @@ config_host_data.set('HAVE_OPTRESET',
39 cc.has_header_symbol('getopt.h', 'optreset'))
40 config_host_data.set('HAVE_IPPROTO_MPTCP',
41 cc.has_header_symbol('netinet/in.h', 'IPPROTO_MPTCP'))
42+config_host_data.set('HAVE_SYS_MOUNT_FSCONFIG',
43+ cc.has_header_symbol('sys/mount.h', 'FSCONFIG_SET_FLAG'))
44
45 # has_member
46 config_host_data.set('HAVE_SIGEV_NOTIFY_THREAD_ID',
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.inc
deleted file mode 100644
index 4b0aceb8..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.inc
+++ /dev/null
@@ -1,65 +0,0 @@
1SUMMARY = "Xilinx's fork of a fast open source processor emulator"
2HOMEPAGE = "https://github.com/xilinx/qemu/"
3
4# This qemu fork is NOT compatible with running on a 32-bit system
5# See: https://github.com/Xilinx/qemu/issues/35
6COMPATIBLE_HOST:arm = "null"
7
8# x86_64 is needed to build nativesdks
9QEMU_TARGETS = "aarch64 arm microblaze microblazeel x86_64"
10
11LIC_FILES_CHKSUM = " \
12 file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
13 file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f \
14 "
15DEPENDS = "glib-2.0 zlib pixman bison-native ninja-native meson-native"
16
17FILESEXTRAPATHS:prepend := "${THISDIR}/qemu-xilinx-7.1.0:"
18
19PV = "${XILINX_QEMU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}"
20REPO ?= "gitsm://github.com/Xilinx/qemu.git;protocol=https"
21
22BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
23SRC_URI = "${REPO};${BRANCHARG}"
24
25FILESEXTRAPATHS:append := ":${COREBASE}/meta/recipes-devtools/qemu/qemu"
26
27SRC_URI += "\
28 file://powerpc_rom.bin \
29 file://run-ptest \
30 file://0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch \
31 file://0002-chardev-connect-socket-to-a-spawned-command.patch \
32 file://0003-apic-fixup-fallthrough-to-PIC.patch \
33 file://0004-configure-Add-pkg-config-handling-for-libgcrypt.patch \
34 file://0005-qemu-Do-not-include-file-if-not-exists.patch \
35 file://0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch \
36 file://0007-qemu-Determinism-fixes.patch \
37 file://0008-tests-meson.build-use-relative-path-to-refer-to-file.patch \
38 file://0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch \
39 file://0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch \
40 file://0001-net-tulip-Restrict-DMA-engine-to-memories.patch \
41 file://arm-cpreg-fix.patch \
42 file://CVE-2022-3165.patch \
43 file://qemu-guest-agent.init \
44 file://qemu-guest-agent.udev \
45 "
46
47# Workaround for 8.2 patch that doesn't apply
48SRC_URI:remove = "file://0011-linux-user-workaround-for-missing-MAP_FIXED_NOREPLAC.patch"
49SRC_URI:remove = "file://0012-linux-user-workaround-for-missing-MAP_SHARED_VALIDAT.patch"
50
51S = "${WORKDIR}/git"
52
53PACKAGECONFIG ??= " \
54 fdt sdl kvm gcrypt pie slirp \
55 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \
56 ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)} \
57"
58PACKAGECONFIG:class-nativesdk ??= "fdt sdl kvm gcrypt pie slirp"
59
60# Disable this
61PACKAGECONFIG[debuginfo] = ""
62PACKAGECONFIG[pipewire] = ""
63PACKAGECONFIG[sndio] = ""
64
65DISABLE_STATIC:pn-${PN} = ""
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-8.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-8.1.inc
new file mode 100644
index 00000000..ad2af244
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-8.1.inc
@@ -0,0 +1,79 @@
1SUMMARY = "Xilinx's fork of a fast open source processor emulator"
2HOMEPAGE = "https://github.com/xilinx/qemu/"
3
4# This qemu fork is NOT compatible with running on a 32-bit system
5# See: https://github.com/Xilinx/qemu/issues/35
6COMPATIBLE_HOST:arm = "null"
7
8# x86_64 is needed to build nativesdks
9QEMU_TARGETS = "aarch64 arm microblaze microblazeel riscv32 x86_64"
10
11LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
12 file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f"
13
14FILESEXTRAPATHS:prepend := "${THISDIR}/qemu-xilinx-8.1.0:"
15
16PV = "${XILINX_QEMU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}"
17REPO ?= "gitsm://github.com/Xilinx/qemu.git;protocol=https"
18
19BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
20SRC_URI = "${REPO};${BRANCHARG};name=qemu"
21SRCREV_qemu = "${SRCREV}"
22SRCREV_FORMAT = "qemu"
23
24FILESEXTRAPATHS:append := ":${THISDIR}/qemu-8.1"
25
26# Deal with the broken --disable-download
27SRCREV_berkeley-softfloat-3 = "b64af41c3276f97f0e181920400ee056b9c88037"
28SRCREV_berkeley-testfloat-3 = "40619cbb3bf32872df8c53cc457039229428a263"
29SRCREV_dtc = "b6910bec11614980a21e46fbccc35934b671bd81"
30SRCREV_keycodemapdb = "f5772a62ec52591ff6870b7e8ef32482371f22c6"
31SRCREV_libvfio-user = "0b28d205572c80b568a1003db2c8f37ca333e4d7"
32SRCREV_slirp = "26be815b86e8d49add8c9a8b320239b9594ff03d"
33SRC_URI += "\
34 git://gitlab.com/qemu-project/berkeley-softfloat-3;protocol=https;nobranch=1;destsuffix=git/subprojects/berkeley-softfloat-3;name=berkeley-softfloat-3 \
35 git://gitlab.com/qemu-project/berkeley-testfloat-3;protocol=https;nobranch=1;destsuffix=git/subprojects/berkeley-testfloat-3;name=berkeley-testfloat-3 \
36 git://gitlab.com/qemu-project/dtc.git;protocol=https;nobranch=1;destsuffix=git/subprojects/dtc;name=dtc \
37 git://gitlab.com/qemu-project/keycodemapdb.git;protocol=https;nobranch=1;destsuffix=git/subprojects/keycodemapdb;name=keycodemapdb \
38 git://gitlab.com/qemu-project/libvfio-user.git;protocol=https;nobranch=1;destsuffix=git/subprojects/libvfio-user;name=libvfio-user \
39 git://gitlab.freedesktop.org/slirp/libslirp;protocol=https;nobranch=1;destsuffix=git/subprojects/slirp;name=slirp \
40"
41
42# Configure meson for disable-download
43do_configure:prepend() {
44 cp ${S}/subprojects/packagefiles/berkeley-softfloat-3/* ${S}/subprojects/berkeley-softfloat-3/.
45 cp ${S}/subprojects/packagefiles/berkeley-testfloat-3/* ${S}/subprojects/berkeley-testfloat-3/.
46}
47
48
49# Keep this in sync with the main YP QEMU integration
50SRC_URI += "\
51 file://powerpc_rom.bin \
52 file://run-ptest \
53 file://0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch \
54 file://0003-apic-fixup-fallthrough-to-PIC.patch \
55 file://0004-configure-Add-pkg-config-handling-for-libgcrypt.patch \
56 file://0005-qemu-Do-not-include-file-if-not-exists.patch \
57 file://0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch \
58 file://0007-qemu-Determinism-fixes.patch \
59 file://0008-tests-meson.build-use-relative-path-to-refer-to-file.patch \
60 file://0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch \
61 file://0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch \
62 file://0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch \
63 file://fixedmeson.patch \
64 file://no-pip.patch \
65 file://qemu-guest-agent.init \
66 file://qemu-guest-agent.udev \
67 "
68
69# Patch doesn't apply to 8.1.0
70# file://fixmips.patch
71
72S = "${WORKDIR}/git"
73
74# Based on qemu settings in poky/meta/conf/distro/include/no-static-libs.inc
75DISABLE_STATIC:pn-qemu-xilinx = ""
76DISABLE_STATIC:pn-qemu-xilinx-native = ""
77DISABLE_STATIC:pn-nativesdk-qemu-xilinx = ""
78DISABLE_STATIC:pn-qemu-xilinx-system-native = ""
79
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-7.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-7.1.inc
deleted file mode 100644
index e664a580..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-7.1.inc
+++ /dev/null
@@ -1,4 +0,0 @@
1require recipes-devtools/qemu/qemu-native.inc
2require qemu-xilinx-7.1.inc
3
4DEPENDS = "glib-2.0-native zlib-native ninja-native meson-native"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-8.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-8.1.inc
new file mode 100644
index 00000000..ad00453f
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-8.1.inc
@@ -0,0 +1,2 @@
1require qemu-native-8.1.inc
2require qemu-xilinx-8.1.inc
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.1.bb
deleted file mode 100644
index bfdb916d..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.1.bb
+++ /dev/null
@@ -1,21 +0,0 @@
1require qemu-xilinx-2022.1.inc
2require qemu-xilinx-native-7.1.inc
3require qemu-native-alt.inc
4
5BPN = "qemu-xilinx"
6
7# Latest poky has changed the defaults, restore them to something compatible
8# with this QEMU. When we update to QEMU 8.x this won't be necessary.
9EXTRA_OECONF:remove = "--disable-download"
10EXTRA_OECONF:remove = "--disable-docs"
11EXTRA_OECONF:remove = "--disable-af-xdp"
12
13EXTRA_OECONF:append = "\
14 --with-git=/bin/false \
15 --with-git-submodules=ignore \
16 --meson=meson \
17"
18
19EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent"
20
21PACKAGECONFIG ??= "pie"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.2.bb
deleted file mode 100644
index f91eb891..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.2.bb
+++ /dev/null
@@ -1,21 +0,0 @@
1require qemu-xilinx-2022.2.inc
2require qemu-xilinx-native-7.1.inc
3require qemu-native-alt.inc
4
5BPN = "qemu-xilinx"
6
7# Latest poky has changed the defaults, restore them to something compatible
8# with this QEMU. When we update to QEMU 8.x this won't be necessary.
9EXTRA_OECONF:remove = "--disable-download"
10EXTRA_OECONF:remove = "--disable-docs"
11EXTRA_OECONF:remove = "--disable-af-xdp"
12
13EXTRA_OECONF:append = "\
14 --with-git=/bin/false \
15 --with-git-submodules=ignore \
16 --meson=meson \
17"
18
19EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent"
20
21PACKAGECONFIG ??= "pie"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.1.bb
deleted file mode 100644
index a19b2cc3..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.1.bb
+++ /dev/null
@@ -1,21 +0,0 @@
1require qemu-xilinx-2023.1.inc
2require qemu-xilinx-native-7.1.inc
3require qemu-native-alt.inc
4
5BPN = "qemu-xilinx"
6
7# Latest poky has changed the defaults, restore them to something compatible
8# with this QEMU. When we update to QEMU 8.x this won't be necessary.
9EXTRA_OECONF:remove = "--disable-download"
10EXTRA_OECONF:remove = "--disable-docs"
11EXTRA_OECONF:remove = "--disable-af-xdp"
12
13EXTRA_OECONF:append = "\
14 --with-git=/bin/false \
15 --with-git-submodules=ignore \
16 --meson=meson \
17"
18
19EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent"
20
21PACKAGECONFIG ??= "pie"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.2.bb
deleted file mode 100644
index 78ffedca..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.2.bb
+++ /dev/null
@@ -1,21 +0,0 @@
1require qemu-xilinx-2023.2.inc
2require qemu-xilinx-native-7.1.inc
3require qemu-native-alt.inc
4
5BPN = "qemu-xilinx"
6
7# Latest poky has changed the defaults, restore them to something compatible
8# with this QEMU. When we update to QEMU 8.x this won't be necessary.
9EXTRA_OECONF:remove = "--disable-download"
10EXTRA_OECONF:remove = "--disable-docs"
11EXTRA_OECONF:remove = "--disable-af-xdp"
12
13EXTRA_OECONF:append = "\
14 --with-git=/bin/false \
15 --with-git-submodules=ignore \
16 --meson=meson \
17"
18
19EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent"
20
21PACKAGECONFIG ??= "pie"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2024.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2024.1.bb
new file mode 100644
index 00000000..5ffdeb98
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2024.1.bb
@@ -0,0 +1,11 @@
1BPN = "qemu-xilinx"
2
3DEPENDS += "glib-2.0-native zlib-native"
4
5require qemu-xilinx-2024.1.inc
6require qemu-xilinx-native-8.1.inc
7require qemu-native-alt.inc
8
9EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-install-blobs --disable-guest-agent"
10
11PACKAGECONFIG ??= "pie"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb
deleted file mode 100644
index ba733ede..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb
+++ /dev/null
@@ -1,38 +0,0 @@
1require qemu-system-native-alt.inc
2require qemu-xilinx-2022.1.inc
3require qemu-xilinx-native-7.1.inc
4
5PROVIDES = "qemu-system-native"
6
7# Latest poky has changed the defaults, restore them to something compatible
8# with this QEMU. When we update to QEMU 8.x this won't be necessary.
9EXTRA_OECONF:remove = "--disable-download"
10EXTRA_OECONF:remove = "--disable-docs"
11EXTRA_OECONF:remove = "--disable-af-xdp"
12
13EXTRA_OECONF:append = "\
14 --with-git=/bin/false \
15 --with-git-submodules=ignore \
16 --meson=meson \
17"
18
19EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}"
20
21PACKAGECONFIG ??= "fdt alsa kvm gcrypt pie slirp"
22
23PACKAGECONFIG:remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}"
24
25DEPENDS += "pixman-native qemu-xilinx-native bison-native ninja-native meson-native"
26DEPENDS += "qemu-xilinx-multiarch-helper-native"
27
28do_install:append() {
29 # The following is also installed by qemu-native
30 rm -f ${D}${datadir}/qemu/trace-events-all
31 rm -rf ${D}${datadir}/qemu/keymaps
32 rm -rf ${D}${datadir}/icons
33 rm -rf ${D}${includedir}/qemu-plugin.h
34
35 # Install qmp.py to be used with testimage
36 install -d ${D}${libdir}/qemu-python/qmp/
37 install -D ${S}/python/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/
38}
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.2.bb
deleted file mode 100644
index 17386afe..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.2.bb
+++ /dev/null
@@ -1,38 +0,0 @@
1require qemu-system-native-alt.inc
2require qemu-xilinx-2022.2.inc
3require qemu-xilinx-native-7.1.inc
4
5PROVIDES = "qemu-system-native"
6
7# Latest poky has changed the defaults, restore them to something compatible
8# with this QEMU. When we update to QEMU 8.x this won't be necessary.
9EXTRA_OECONF:remove = "--disable-download"
10EXTRA_OECONF:remove = "--disable-docs"
11EXTRA_OECONF:remove = "--disable-af-xdp"
12
13EXTRA_OECONF:append = "\
14 --with-git=/bin/false \
15 --with-git-submodules=ignore \
16 --meson=meson \
17"
18
19EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}"
20
21PACKAGECONFIG ??= "fdt alsa kvm gcrypt pie slirp"
22
23PACKAGECONFIG:remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}"
24
25DEPENDS += "pixman-native qemu-xilinx-native bison-native ninja-native meson-native"
26DEPENDS += "qemu-xilinx-multiarch-helper-native"
27
28do_install:append() {
29 # The following is also installed by qemu-native
30 rm -f ${D}${datadir}/qemu/trace-events-all
31 rm -rf ${D}${datadir}/qemu/keymaps
32 rm -rf ${D}${datadir}/icons
33 rm -rf ${D}${includedir}/qemu-plugin.h
34
35 # Install qmp.py to be used with testimage
36 install -d ${D}${libdir}/qemu-python/qmp/
37 install -D ${S}/python/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/
38}
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.1.bb
deleted file mode 100644
index 3264c260..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.1.bb
+++ /dev/null
@@ -1,38 +0,0 @@
1require qemu-system-native-alt.inc
2require qemu-xilinx-2023.1.inc
3require qemu-xilinx-native-7.1.inc
4
5PROVIDES = "qemu-system-native"
6
7# Latest poky has changed the defaults, restore them to something compatible
8# with this QEMU. When we update to QEMU 8.x this won't be necessary.
9EXTRA_OECONF:remove = "--disable-download"
10EXTRA_OECONF:remove = "--disable-docs"
11EXTRA_OECONF:remove = "--disable-af-xdp"
12
13EXTRA_OECONF:append = "\
14 --with-git=/bin/false \
15 --with-git-submodules=ignore \
16 --meson=meson \
17"
18
19EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}"
20
21PACKAGECONFIG ??= "fdt alsa kvm gcrypt pie slirp"
22
23PACKAGECONFIG:remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}"
24
25DEPENDS += "pixman-native qemu-xilinx-native bison-native ninja-native meson-native"
26DEPENDS += "qemu-xilinx-multiarch-helper-native"
27
28do_install:append() {
29 # The following is also installed by qemu-native
30 rm -f ${D}${datadir}/qemu/trace-events-all
31 rm -rf ${D}${datadir}/qemu/keymaps
32 rm -rf ${D}${datadir}/icons
33 rm -rf ${D}${includedir}/qemu-plugin.h
34
35 # Install qmp.py to be used with testimage
36 install -d ${D}${libdir}/qemu-python/qmp/
37 install -D ${S}/python/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/
38}
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.2.bb
deleted file mode 100644
index fdf3be2e..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.2.bb
+++ /dev/null
@@ -1,38 +0,0 @@
1require qemu-system-native-alt.inc
2require qemu-xilinx-2023.2.inc
3require qemu-xilinx-native-7.1.inc
4
5PROVIDES = "qemu-system-native"
6
7# Latest poky has changed the defaults, restore them to something compatible
8# with this QEMU. When we update to QEMU 8.x this won't be necessary.
9EXTRA_OECONF:remove = "--disable-download"
10EXTRA_OECONF:remove = "--disable-docs"
11EXTRA_OECONF:remove = "--disable-af-xdp"
12
13EXTRA_OECONF:append = "\
14 --with-git=/bin/false \
15 --with-git-submodules=ignore \
16 --meson=meson \
17"
18
19EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}"
20
21PACKAGECONFIG ??= "fdt alsa kvm gcrypt pie slirp"
22
23PACKAGECONFIG:remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}"
24
25DEPENDS += "pixman-native qemu-xilinx-native bison-native ninja-native meson-native"
26DEPENDS += "qemu-xilinx-multiarch-helper-native"
27
28do_install:append() {
29 # The following is also installed by qemu-native
30 rm -f ${D}${datadir}/qemu/trace-events-all
31 rm -rf ${D}${datadir}/qemu/keymaps
32 rm -rf ${D}${datadir}/icons
33 rm -rf ${D}${includedir}/qemu-plugin.h
34
35 # Install qmp.py to be used with testimage
36 install -d ${D}${libdir}/qemu-python/qmp/
37 install -D ${S}/python/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/
38}
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2024.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2024.1.bb
new file mode 100644
index 00000000..7e985088
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2024.1.bb
@@ -0,0 +1,35 @@
1BPN = "qemu-xilinx"
2
3require qemu-system-native-alt.inc
4require qemu-xilinx-2024.1.inc
5require qemu-xilinx-native-8.1.inc
6
7# As some of the files installed by qemu-native and qemu-system-native
8# are the same, we depend on qemu-native to get the full installation set
9# and avoid file clashes
10DEPENDS += "glib-2.0-native zlib-native pixman-native qemu-native"
11
12DEPENDS += "qemu-xilinx-multiarch-helper-native"
13
14EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}"
15
16PACKAGECONFIG ??= "fdt alsa kvm pie slirp png gcrypt \
17 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', '', d)} \
18"
19
20# Handle distros such as CentOS 5 32-bit that do not have kvm support
21PACKAGECONFIG:remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}"
22
23do_install:append() {
24 install -Dm 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu-xilinx
25
26 # The following is also installed by qemu-native
27 rm -f ${D}${datadir}/qemu-xilinx/trace-events-all
28 rm -rf ${D}${datadir}/qemu-xilinx/keymaps
29 rm -rf ${D}${datadir}/icons/
30 rm -rf ${D}${includedir}/qemu-plugin.h
31
32 # Install qmp.py to be used with testimage
33 install -d ${D}${libdir}/qemu-python/qmp/
34 install -D ${S}/python/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/
35}
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.1.bb
deleted file mode 100644
index 96b26101..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.1.bb
+++ /dev/null
@@ -1,38 +0,0 @@
1require qemu-xilinx-2022.1.inc
2require recipes-devtools/qemu/qemu.inc
3require qemu-xilinx-7.1.inc
4require qemu-alt.inc
5
6# Links to libmali-xlnx, so it becomes MACHINE_ARCH specific
7DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}"
8MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH"
9MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}"
10PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH"
11PACKAGE_ARCH:class-target = "${@bb.utils.contains_any('DEPENDS', 'libepoxy virglrenderer', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}"
12
13BBCLASSEXTEND = "nativesdk"
14
15RDEPENDS:${PN}:class-target += "bash"
16
17PROVIDES:class-nativesdk = "nativesdk-qemu"
18RPROVIDES:${PN}:class-nativesdk = "nativesdk-qemu"
19
20# Latest poky has changed the defaults, restore them to something compatible
21# with this QEMU. When we update to QEMU 8.x this won't be necessary.
22EXTRA_OECONF:remove = "--disable-download"
23EXTRA_OECONF:remove = "--disable-docs"
24EXTRA_OECONF:remove = "--disable-af-xdp"
25
26EXTRA_OECONF:append = "\
27 --with-git=/bin/false \
28 --with-git-submodules=ignore \
29 --meson=meson \
30"
31
32EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}"
33EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}"
34EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}"
35
36do_install:append:class-nativesdk() {
37 ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)}
38}
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.2.bb
deleted file mode 100644
index c6e91fdd..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.2.bb
+++ /dev/null
@@ -1,36 +0,0 @@
1require qemu-xilinx-2022.2.inc
2require recipes-devtools/qemu/qemu.inc
3require qemu-xilinx-7.1.inc
4require qemu-alt.inc
5
6# Links to libmali-xlnx, so it becomes MACHINE_ARCH specific
7DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}"
8MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}"
9PACKAGE_ARCH:class-target = "${@bb.utils.contains_any('DEPENDS', 'libepoxy virglrenderer', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}"
10
11BBCLASSEXTEND = "nativesdk"
12
13RDEPENDS:${PN}:class-target += "bash"
14
15PROVIDES:class-nativesdk = "nativesdk-qemu"
16RPROVIDES:${PN}:class-nativesdk = "nativesdk-qemu"
17
18# Latest poky has changed the defaults, restore them to something compatible
19# with this QEMU. When we update to QEMU 8.x this won't be necessary.
20EXTRA_OECONF:remove = "--disable-download"
21EXTRA_OECONF:remove = "--disable-docs"
22EXTRA_OECONF:remove = "--disable-af-xdp"
23
24EXTRA_OECONF:append = "\
25 --with-git=/bin/false \
26 --with-git-submodules=ignore \
27 --meson=meson \
28"
29
30EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}"
31EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}"
32EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}"
33
34do_install:append:class-nativesdk() {
35 ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)}
36}
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.1.bb
deleted file mode 100644
index fca09883..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.1.bb
+++ /dev/null
@@ -1,38 +0,0 @@
1require qemu-xilinx-2023.1.inc
2require recipes-devtools/qemu/qemu.inc
3require qemu-xilinx-7.1.inc
4require qemu-alt.inc
5
6# Links to libmali-xlnx, so it becomes MACHINE_ARCH specific
7DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}"
8MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH"
9MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}"
10PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH"
11PACKAGE_ARCH:class-target = "${@bb.utils.contains_any('DEPENDS', 'libepoxy virglrenderer', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}"
12
13BBCLASSEXTEND = "nativesdk"
14
15RDEPENDS:${PN}:class-target += "bash"
16
17PROVIDES:class-nativesdk = "nativesdk-qemu"
18RPROVIDES:${PN}:class-nativesdk = "nativesdk-qemu"
19
20# Latest poky has changed the defaults, restore them to something compatible
21# with this QEMU. When we update to QEMU 8.x this won't be necessary.
22EXTRA_OECONF:remove = "--disable-download"
23EXTRA_OECONF:remove = "--disable-docs"
24EXTRA_OECONF:remove = "--disable-af-xdp"
25
26EXTRA_OECONF:append = "\
27 --with-git=/bin/false \
28 --with-git-submodules=ignore \
29 --meson=meson \
30"
31
32EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}"
33EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}"
34EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}"
35
36do_install:append:class-nativesdk() {
37 ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)}
38}
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2024.1.bb
index 070ae65f..cff60bd6 100644
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.2.bb
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2024.1.bb
@@ -1,6 +1,8 @@
1require qemu-xilinx-2023.2.inc 1BBCLASSEXTEND = "nativesdk"
2require recipes-devtools/qemu/qemu.inc 2
3require qemu-xilinx-7.1.inc 3require qemu-xilinx-2024.1.inc
4require qemu-8.1.inc
5require qemu-xilinx-8.1.inc
4require qemu-alt.inc 6require qemu-alt.inc
5 7
6# Links to libmali-xlnx, so it becomes MACHINE_ARCH specific 8# Links to libmali-xlnx, so it becomes MACHINE_ARCH specific
@@ -10,29 +12,27 @@ MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtua
10PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" 12PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH"
11PACKAGE_ARCH:class-target = "${@bb.utils.contains_any('DEPENDS', 'libepoxy virglrenderer', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" 13PACKAGE_ARCH:class-target = "${@bb.utils.contains_any('DEPENDS', 'libepoxy virglrenderer', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}"
12 14
13BBCLASSEXTEND = "nativesdk"
14 15
15RDEPENDS:${PN}:class-target += "bash" 16DEPENDS = "glib-2.0 zlib pixman bison-native ninja-native meson-native"
16 17
17PROVIDES:class-nativesdk = "nativesdk-qemu" 18DEPENDS:append:libc-musl = " libucontext"
18RPROVIDES:${PN}:class-nativesdk = "nativesdk-qemu"
19 19
20# Latest poky has changed the defaults, restore them to something compatible 20CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}"
21# with this QEMU. When we update to QEMU 8.x this won't be necessary.
22EXTRA_OECONF:remove = "--disable-download"
23EXTRA_OECONF:remove = "--disable-docs"
24EXTRA_OECONF:remove = "--disable-af-xdp"
25 21
26EXTRA_OECONF:append = "\ 22RDEPENDS:${PN}-common:class-target += "bash"
27 --with-git=/bin/false \
28 --with-git-submodules=ignore \
29 --meson=meson \
30"
31 23
32EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}" 24EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}"
33EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}"
34EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" 25EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}"
26EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}"
35 27
36do_install:append:class-nativesdk() { 28PACKAGECONFIG ??= " \
37 ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} 29 fdt sdl kvm pie slirp gcrypt \
38} 30 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa pulseaudio xen', d)} \
31 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', '', d)} \
32 ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)} \
33"
34PACKAGECONFIG:class-nativesdk ??= "fdt sdl kvm pie slirp gcrypt \
35 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', '', d)} \
36"
37# ppc32 hosts are no longer supported in qemu
38COMPATIBLE_HOST:powerpc = "null"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu_8.1.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu_8.1.2.bb
new file mode 100644
index 00000000..4722e1f5
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu_8.1.2.bb
@@ -0,0 +1,29 @@
1BBCLASSEXTEND = "nativesdk"
2
3FILESEXTRAPATHS:append := ":${THISDIR}/qemu-8.1"
4
5require qemu-8.1.inc
6
7DEPENDS += "glib-2.0 zlib pixman"
8
9DEPENDS:append:libc-musl = " libucontext"
10
11CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}"
12
13RDEPENDS:${PN}-common:class-target += "bash"
14
15EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}"
16EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}"
17EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}"
18
19PACKAGECONFIG ??= " \
20 fdt sdl kvm pie slirp \
21 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa pulseaudio xen', d)} \
22 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', '', d)} \
23 ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)} \
24"
25PACKAGECONFIG:class-nativesdk ??= "fdt sdl kvm pie slirp \
26 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', '', d)} \
27"
28# ppc32 hosts are no longer supported in qemu
29COMPATIBLE_HOST:powerpc = "null"