summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu
AgeCommit message (Collapse)Author
2024-03-03qemu: backport patch for ui/clipboard issueSimone Weiß
Backported from upstream to fix CVE-2023-6683 Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-03qemu: Replace workaround with proper usermode fix for shmatRichard Purdie
We were using a workaround to avoid problems with the behaviour of shmat() calls in usermode qemu. Switch to patches from upstream which are in review but not merged yet. Update the mmap fixed/noreplace workaround for the changes. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-24meta: Remove some not needed CVE_STATUSSimone Weiß
CVE_STATUS was set for those components, but meanwhile databases are updated with corrected information, so setting the CVE_STATUS is not needed anymore. Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-19qemu: Set CVE_STATUS for wrong CVEsSimone Weiß
All are already fixed in 8.2.1, NVD was informed that cpes are wrong. Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-15qemu: disbale AF_XDP network backend supportJose Quaresma
This fix some host contaminations issues: | /poky/build/tmp/hosttools/ld.bfd: libcommon.fa.p/net_af-xdp.c.o: undefined reference to symbol 'bpf_xdp_detach@@LIBBPF_0.7.0' | /poky/build/tmp/hosttools/ld.bfd: /usr/lib/libbpf.so.1: error adding symbols: DSO missing from command line | collect2: error: ld returned 1 exit status The AF_XDP network backend support [1] requires the libxdp that is not available in any layer, otherwise you can configure this option: | PACKAGECONFIG[af-xdp] = "--enable-af-xdp,--disable-af-xdp,libxdp" [1] https://github.com/qemu/qemu/commit/cb039ef3d9e3112da01e1ecd9b136ac9809ef733 Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-05qemu: Upgrade 8.2.0 -> 8.2.1Richard Purdie
This was a bugfix release containing several important fixes according to upstream. Drop a backported patch. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-05qemu-native: Use inherit_defer for including native classKhem Raj
This helps working with native qemu recipes with devtool, since devtool inserts an internal class called devtool-source resulting in ERROR: QA Issue: qemu-system-native: native/nativesdk class is not inherited last, this can result in unexpected behaviour. Classes i nherited after native/nativesdk: devtool-source.bbclass [native-last] ERROR: Fatal QA errors were found, failing task. ERROR: Parsing halted due to errors, see error messages above ERROR: Command execution failed: Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-02qemu: Allow native and nativesdk versions on Linux older then 4.17Mark Hatle
Linux kernel 4.17 introduced two new mmap flags, MAP_FIXED_NOREPLACE and MAP_SHARED_VALIDATE. Starting with QEMU 8.1, these flags are now used and required for proper system operation. In order to build and run on a system older then 4.17, we need to emulate this new behavior. Not having a newer kernel could result in the mmap memory being allocated in a way that will cause failures without QEMU checking for these conditions. Note, memory allocation issues are rare in my experience so this is more of a 'just-in-case' behavior. SDK_OLDEST_KERNEL is currently set to 3.2.0, the only way this can claim that qemu works in an SDK is by checking the return values to emulate the expected behavior. Signed-off-by: Mark Hatle <mark.hatle@amd.com> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2024-01-30qemu: fix target build with ccache enabledMartin Jansa
* with ccache inheritted, the BUILD_CC is 'ccache gcc', but because of missing quote it ends passing just ccache to host-cc which gets stripped and then it calls compiler[0] on empty compiler variable and breaks meson as shown in: http://errors.yoctoproject.org/Errors/Details/751436/ python version: Python 3.12.1 Traceback (most recent call last): File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/mesonmain.py", line 194, in run return options.run_func(options) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/msetup.py", line 358, in run app.generate() File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/msetup.py", line 181, in generate return self._generate(env, capture, vslite_ctx) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/msetup.py", line 203, in _generate intr = interpreter.Interpreter(b, user_defined_options=user_defined_options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreter/interpreter.py", line 331, in __init__ self.parse_project() File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 132, in parse_project self.evaluate_codeblock(self.ast, end=1) File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 198, in evaluate_codeblock raise e File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 190, in evaluate_codeblock self.evaluate_statement(cur) File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 204, in evaluate_statement return self.function_call(cur) ^^^^^^^^^^^^^^^^^^^^^^^ File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 530, in function_call res = func(node, func_args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreterbase/decorators.py", line 260, in wrapper return f(*nargs, **wrapped_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreterbase/decorators.py", line 579, in wrapper return f(*wrapped_args, **wrapped_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreter/interpreter.py", line 1309, in func_project self.add_languages(proj_langs, False, MachineChoice.BUILD) File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreter/interpreter.py", line 1476, in add_languages success = self.add_languages_for(args, required, for_machine) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreter/interpreter.py", line 1519, in add_languages_for comp = compilers.detect_compiler_for(self.environment, lang, for_machine, skip_sanity_check) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/compilers/detect.py", line 115, in detect_compiler_for comp = compiler_from_language(env, lang, for_machine) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/compilers/detect.py", line 112, in compiler_from_language return lang_map[lang](env, for_machine) if lang in lang_map else None ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/compilers/detect.py", line 614, in detect_c_compiler return _detect_c_or_cpp_compiler(env, 'c', for_machine) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/compilers/detect.py", line 286, in _detect_c_or_cpp_compiler compiler_name = os.path.basename(compiler[0]) ~~~~~~~~^^^ IndexError: list index out of range ... Project name: qemu Project version: 8.2.0 C compiler for the host machine: ccache x86_64-oe-linux-clang -target x86_64-oe-linux -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -mlittle-endian --dyld-prefix=/usr -Qunused-arguments --sysroot=TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot -m64 -mcx16 (clang 17.0.6 "clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)") C linker for the host machine: x86_64-oe-linux-clang -target x86_64-oe-linux -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -mlittle-endian --dyld-prefix=/usr -Qunused-arguments --sysroot=TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot -m64 -mcx16 ld.lld 17.0.6 ../qemu-8.2.0/meson.build:1:0: ERROR: Unhandled python exception This is a Meson bug and should be reported! ERROR: meson setup failed Signed-off-by: Martin Jansa <martin.jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-27qemu: Replace the basename patch with backportKhem Raj
Backport the patch that got applied to fix this issue upstream Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26qemu: Fix segfaults in webkitgtk:do_compile on debian11Richard Purdie
Add a work around for segfaults we're seeing with qemu 8.2.0 when compiling webkitgtk on debian 11 autobuilder workers. The issue has been reported upstream to work out an official fix. [YOCTO #15367] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-24qemu: Upgrade 8.1.2 -> 8.2.0Richard Purdie
We can drop the mips workaround patch since there were fixes in 8.2.0. The build system changed and we should drop cross.patch and replace it with explicit settings for cross-prefix, and host-cc. To make that work we need to indicate we don't use a cross pkg-config. PIE isn't availale for mingw so tweak PACKAGECONFIG accordingly. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-21qemu: add PACKAGECONFIG for sndioRichard Purdie
In qemu's configuration this is an 'auto' configuration option so if the host has the sndio headers on then it gets enabled, causing sstate reuse problems. This is particularly problematic as some qemu pieces can 'see' into the host pkg-config due to openGL linkage. Add config and disable by default to avoid host contamination. [YOCTO #15284] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-21qemu: Ensure pip and the python venv aren't used for mesonRichard Purdie
Qemu wants to use a supported python version and a specific meson version to "help" users and uses pip and creates a venv to do this. This is a nightmare for us. Our versions stay up to date and should be supported so we don't really need/want this wrapping. Tweak things to disable it. There was breakage from the wrapper shown by: bitbake qemu-system-native <add DISTRO_FEATURES:remove = "opengl" to local.conf> bitbake qemu-system-native -c configure which would crash. The issue is the change in configuration removes pieces from the sysroot but pyc files remainm as do pieces of pip which causes problems. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-21qemu: Clean up DEPENDSRichard Purdie
Move the common dependencies to qemu.inc for cleaner entries in the various recipes. Remove an unneeded inherit. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-20qemu: Add packageconfig knob to enable pipewire supportKhem Raj
This gets into a quessing mode if not specified and it it probelamactic for native version since it maybe built on a machine having pipewire installed and used on another where pipewire is not installed ( minimal CI builder ) it ends up with runqemu - ERROR - Failed to run qemu: /mnt/b/yoe/master/build/tmp/work/x86_64-linux/qemu-helper-native/1.0/recipe-sysroot-native/usr/bin/qemu-system-x86_64: error while loading shared libraries: libpipewire-0.3.so.0: cannot open shared object file: No such file or directory Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-20qemu: Fix build with latest muslKhem Raj
musl dropped basename() from string.h, adjust for that Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-30qemu: Upgrade 8.1.0 -> 8.1.2Richard Purdie
Drop three backport patches as they're applied upstream. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-17qemu: ignore RHEL specific CVE-2023-2680Lee Chee Yang
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-14qemu: drop unreferenced patchJon Mason
OE Commit a7176c3b2a7e2041b9be5dabb6b0f1e62f235f76 removed the reference to this patch but did not remove the patch Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2023-10-06qemu: fix CVE-2023-42467Yogita Urade
QEMU through 8.0.0 could trigger a division by zero in scsi_disk_reset in hw/scsi/scsi-disk.c because scsi_disk_emulate_mode_select does not prevent s->qdev.blocksize from being 256. This stops QEMU and the guest immediately. References: https://nvd.nist.gov/vuln/detail/CVE-2023-42467 https://gitlab.com/qemu-project/qemu/-/issues/1813 Signed-off-by: Yogita Urade <yogita.urade@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-22recipes: Drop remaining PR values from recipesRichard Purdie
We've been removing PR values from recipes at upgrade time for a while. In general anyone maintaining a binary distro would end up having to curate these themselves so the values in OE-Core aren't really that useful anymore. In many ways it makes sense to clear out the remaining ones (which are mostly for 'config' recipes that are unlikely to increase in PV) and leave a clean slate for anyone implementing a binary distro config. References are left in meta-selftest since the tests there do involve them and their removal upon upgrade. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-20qemu: Add PACKAGECONFIG for daxKhem Raj
Othereise it pokes at the build system and if ndctl is installed on the system it adds dependency on libdaxctl which can make it not work on other hosts where this is not available and qemu fails to run Fixes <recipe-sysroot-native>/usr/bin/qemu-system-x86_64: error while loading shared libraries: libdaxctl.so Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-07qemu-system-native: enable PNG supportRoss Burton
It might be useful to grab screenshots from qemu-system-native (for example, for QA purposes). Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-07qemu: Add patches to resolve x86 and then mips boot issuesRichard Purdie
qemu 8.1.0 doesn't boot on x86. After adding tcg fixes for that, mips boot breaks so also add patches for that as well. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-07qemu: Upgrade 8.0.4 -> 8.1.0Richard Purdie
This upgrade isn't straighforward as upstream made changes. A pyenv is now needed containing meson. This doesn't work for us for reasons as yet unclear however it does mean we need python3native inherited for that to stand a chance of working as otherwise host system dependencies may be missing. For now, allow meson to work from our sysroot via a patch. Our meson is always deterministic anyway so we don't need their help for that. The submodules approach used previously has changed, switch the options for new ones to disable downloads and docs. Some of the images binaries shipped for s390 show QA warnings for relocations in code sections. Drop those binaries to avoid the QA warnings since we don't need them anyway. Drop a backported patch and refresh another. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-30qemu: Fix CVE-2023-40360Khem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-29qemu: add packageconfigs for fuse and dbus-displayMarkus Volk
glib-2.0-native is needed to provide gdbus-codegen Signed-off-by: Markus Volk <f_l_k@t-online.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-29qemu: build pulseaudio support depending on distro_featureMarkus Volk
Signed-off-by: Markus Volk <f_l_k@t-online.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-29qemu: fix libudev packageconfig for systemd imagesMarkus Volk
eudev is needed to provide libudev when not using systemd, but including eudev breaks things for systemd. We can't include eudev here since systemd provides libudev itself. Signed-off-by: Markus Volk <f_l_k@t-online.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-15qemu: Upgrade 8.0.3 -> 8.0.4Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-15qemu: Add qemu-common packageMingli Yu
We split the qemu package [1] to add support to make user can install one qemu arch emulation rpm to ease the concerns who care much about the rpm size in embedded device. But for the user who only install the qemu-*.rpm can't do anything except they install the qemu emulation rpm like qemu-system-x86-64-*.rpm explicitly. So add qemu-common package to package all thing into qemu-common when not split the package, and package only the basic into qemu-common and other arch related to each qemu arch emulation rpm when split the package to fix the backward compatibility. qenu-*.rpm which is meta package rdepends on qemu-common and the available qemu arch emulation rpm like qemu-system-x86-64-*.rpm and etc. [1] https://git.openembedded.org/openembedded-core/commit/?id=893846ead7ee54d53e9076150cd655e0c8bca5db Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-21cve_check: convert CVE_CHECK_IGNORE to CVE_STATUSAndrej Valek
- Try to add convert and apply statuses for old CVEs - Drop some obsolete ignores, while they are not relevant for current version Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Reviewed-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-07-14qemu: fix typoEtienne Cordonnier
Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-14qemu: upgrade 8.0.0 -> 8.0.3Trevor Gamblin
ppc.patch is removed because it is included in 8.0.3: https://github.com/qemu/qemu/commit/864ce70c1c747898063cc2df854920d354b1b78f General changelog for 8.x: https://wiki.qemu.org/ChangeLog/8.0 Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-10qemu: Add qemu-user-* and qemu-system-* to PACKAGES_DYNAMICMingli Yu
Fixes: Add below line to conf/local.conf IMAGE_INSTALL:append = " qemu-system-aarch64" $ bitbake core-image-base ERROR: Required build target 'core-image-base' has no buildable providers. Missing or unbuildable dependency chain was: ['core-image-base', 'qemu-system-aarch64'] (From OE-Core rev: b89201b7c163b075880a35733700c6d4205b4461) Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-17oeqa/selftest/oescripts: Fix qemu-helper selftestRichard Purdie
The updated selftest was assuming qemu-bridge-helper was available on the host system which isn't always the case. Tweak the test case to avoid this issue by adding dedicated help output and checking for this specifically. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-16runqemu/qemu-helper: Drop tunctlRichard Purdie
ip tuntap provides the functionality that we obtained from tunctl. We only needed tunctl when ifconfig was more available than ip. That isn't the case now so we can drop tunctl and all the hoops we need to jump through to build and provide it. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-15qemu: a pending patch was submitted and accepted upstreamAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-09qemu: Split the qemu packageMingli Yu
Currently all files as below packaged into one package such as qemu-7.2.0-*.rpm. After the qemu package installed on the target, it will take up about 464M which includes not only the one matches the arch of the target but aslo all available built qemu targets which set by QEMU_TARGETS. # ls tmp-glibc/work/core2-64-wrs-linux/qemu/7.2.0-r0/image/usr/bin/ qemu-aarch64 qemu-img qemu-mips64el qemu-ppc64 qemu-sh4 qemu-system-loongarch64 qemu-system-ppc qemu-system-x86_64 qemu-arm qemu-io qemu-mipsel qemu-ppc64le qemu-storage-daemon qemu-system-mips qemu-system-ppc64 qemu-x86_64 qemu-edid qemu-loongarch64 qemu-mips.real qemu-pr-helper qemu-system-aarch64 qemu-system-mips64 qemu-system-riscv32 qemu-ga qemu-mips qemu-nbd qemu-riscv32 qemu-system-arm qemu-system-mips64el qemu-system-riscv64 qemu-i386 qemu-mips64 qemu-ppc qemu-riscv64 qemu-system-i386 qemu-system-mipsel qemu-system-sh4 Split the qemu package into qemu-7.2.0-*.rpm, qemu-system-*.rpm, qemu-user-*.rpm and etc. And let user can only choose the corresponding qemu arch package they want to install should ease the concerns who cares much about the size in embedded device as it decreases the qemu rpm (qemu-7.2.0*.rpm) size from about 65M to about 19M and the size of the extracted qemu RPM decreased from about 464M to about 248M. For the users who want to install all arch packages, they can install qemu-system-all and qemu-user-all to meet their need. Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-25qemu: remove unused qemu-7.0.0-glibc-2.36.patchMartin Jansa
* it was removed from SRC_URI in: https://git.openembedded.org/openembedded-core/commit/?id=e94d182889ca3c02df913c59f0b66b228ffe588c Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-22qemu: add PACKAGECONFIG for debuginfo supportRoss Burton
qemu was auto-detecting the presence of libdw from elfutils, which causes problems with a sstate object for qemu-native built with libdw is ran on a machine without libdw. We have no need for the debuginfo support to be enabled, so disable this by default. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-05-11qemu: Further updates to the ppc patch after upstream discussionRichard Purdie
After someone tested real hardware, the patch needs tweaks to match the 3.0 ISA behaviour. It won't change much from our perspective but may as well keep the patch in sync. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-07qemu: Update ppc instruction fix to match revised upstream versionRichard Purdie
Upstream asked for some changes, this updates our patch to match. The differences likely don't change our real world use. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-05qemu: Whitelist CVE-2023-0664Virendra Thakur
This CVE is related to Windows. Link: https://nvd.nist.gov/vuln/detail/CVE-2023-0664 Signed-off-by: Virendra Thakur <virendrak@kpit.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-04qemu: Upgrade 7.2.0 -> 8.0.0Richard Purdie
Drop backported/merged patches: Revert-linux-user-add-more-compat-ioctl-definitions.patch configure-Fix-check-tcg-not-executing-any-tests.patch contrib-vhost-user-blk-Replace-lseek64-with-lseek.patch Revert-linux-user-fix-compat-with-glibc-2.36-sys-mou.patch Drop socket chardev patch with conflicts: chardev-connect-socket-to-a-spawned-command.patch This last patch was added in support of swtpm however it isn't clear if anyone is still using that workflow. The patch uses API calls such as as qemu_fork() which were removed in 8.0.0 and replaced with gspawn calls. If anyone needs the patch, it will be better for them to forward port it, test it and reinstate it, preferably with a discussion with upstream about it too. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-04qemu: Add fix for powerpc instruction fallback issueRichard Purdie
See the patch for more details, fixes a regression in qemu causing illegal instructions in libm on powerpc, triggered by a libinput upgrade. https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=f1c56cdff09f650ad721fae026eb6a3651631f3d was the glibc code generating the instruction and triggering the issue. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-04-05qemu: rename deprecated --enable-trace-backend configure optionThomas De Schampheleire
qemu 6.2 deprecated the configure option '--enable-trace-backend' in favor of '--enable-trace-backends' [1] Rename accordingly. [1] https://wiki.qemu.org/ChangeLog/6.2#Build_Information Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-04-05qemu: retain default trace backend if 'ust' is not enabledThomas De Schampheleire
The qemu build system enables the 'log' trace backend by default, if no explicit choice was made with '--enable-trace-backend=CHOICE'. However, the qemu recipe uses the following PACKAGECONFIG line: PACKAGECONFIG[ust] = "--enable-trace-backend=ust,--enable-trace-backend=nop,lttng-ust," which means that the 'nop' trace backend will be explicitly selected if the 'ust' feature is not enabled. The 'nop' backend removes almost all trace points at compile time, and thus basically means 'disable tracing'. To retain the default trace backend if 'ust' is not enabled, the above PACKAGECONFIG line should either explicitly fall back to the 'log' backend, or not provide any value for the 'disabled' case. This commit chooses the latter to not make any assumption about the upstream default. Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-04-05qemu: make tracetool-generated output reproducibleThomas De Schampheleire
'#line' directives written by qemu's tracetool makes the 'debug' package not reproducible due to absolute paths. Apply a patch to use a relative path instead. Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>