Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Fast open source processor emulator" |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame] | 2 | DESCRIPTION = "QEMU is a hosted virtual machine monitor: it emulates the \ |
| 3 | machine's processor through dynamic binary translation and provides a set \ |
| 4 | of different hardware and device models for the machine, enabling it to run \ |
| 5 | a variety of guest operating systems" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 6 | HOMEPAGE = "http://qemu.org" |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 7 | LICENSE = "GPL-2.0-only & LGPL-2.1-only" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 8 | |
Patrick Williams | 169d7bc | 2024-01-05 11:33:25 -0600 | [diff] [blame] | 9 | DEPENDS += "bison-native meson-native ninja-native" |
| 10 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 11 | RDEPENDS:${PN}-ptest = "bash" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 12 | |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 13 | require qemu-targets.inc |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 14 | # https://gitlab.com/qemu-project/qemu/-/commit/81e2b198a8cb4ee5fdf108bd438f44b193ee3a36 means |
| 15 | # we need a full python3-native setup |
| 16 | inherit pkgconfig ptest update-rc.d systemd python3native |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 17 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 18 | LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 19 | file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 20 | |
| 21 | SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ |
| 22 | file://powerpc_rom.bin \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 23 | file://run-ptest \ |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 24 | file://0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch \ |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 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 \ |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 33 | file://0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch \ |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 34 | file://fixedmeson.patch \ |
Patrick Williams | 169d7bc | 2024-01-05 11:33:25 -0600 | [diff] [blame] | 35 | file://no-pip.patch \ |
Patrick Williams | b58112e | 2024-03-07 11:16:36 -0600 | [diff] [blame] | 36 | file://4a8579ad8629b57a43daa62e46cc7af6e1078116.patch \ |
| 37 | file://0001-linux-user-x86_64-Handle-the-vsyscall-page-in-open_s.patch \ |
| 38 | file://0002-linux-user-loongarch64-Remove-TARGET_FORCE_SHMLBA.patch \ |
| 39 | file://0003-linux-user-Add-strace-for-shmat.patch \ |
| 40 | file://0004-linux-user-Rewrite-target_shmat.patch \ |
| 41 | file://0005-tests-tcg-Check-that-shmat-does-not-break-proc-self-.patch \ |
| 42 | file://CVE-2023-6683.patch \ |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 43 | file://qemu-guest-agent.init \ |
| 44 | file://qemu-guest-agent.udev \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 45 | " |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 46 | UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" |
| 47 | |
Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame] | 48 | # SDK_OLDEST_KERNEL is set below 4.17, which is the minimum version required by QEMU >= 8.1 |
| 49 | # This is due to two MMAP flags being used at certain points |
| 50 | SRC_URI:append:class-nativesdk = " \ |
| 51 | file://0011-linux-user-workaround-for-missing-MAP_FIXED_NOREPLAC.patch \ |
| 52 | file://0012-linux-user-workaround-for-missing-MAP_SHARED_VALIDAT.patch \ |
| 53 | " |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 54 | |
Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame] | 55 | # Support building and using native version on pre 4.17 kernels |
| 56 | SRC_URI:append:class-native = " \ |
| 57 | file://0011-linux-user-workaround-for-missing-MAP_FIXED_NOREPLAC.patch \ |
| 58 | file://0012-linux-user-workaround-for-missing-MAP_SHARED_VALIDAT.patch \ |
| 59 | " |
| 60 | |
| 61 | SRC_URI[sha256sum] = "8562751158175f9d187c5f22b57555abe3c870f0325c8ced12c34c6d987729be" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 62 | |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 63 | CVE_STATUS[CVE-2007-0998] = "not-applicable-config: The VNC server can expose host files uder some circumstances. We don't enable it by default." |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 64 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 65 | # https://bugzilla.redhat.com/show_bug.cgi?id=1609015#c11 |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 66 | CVE_STATUS[CVE-2018-18438] = "disputed: The issues identified by this CVE were determined to not constitute a vulnerability." |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 67 | |
Andrew Geissler | 028142b | 2023-05-05 11:29:21 -0500 | [diff] [blame] | 68 | # As per https://nvd.nist.gov/vuln/detail/CVE-2023-0664 |
| 69 | # https://bugzilla.redhat.com/show_bug.cgi?id=2167423 |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 70 | CVE_STATUS[CVE-2023-0664] = "not-applicable-platform: Issue only applies on Windows" |
Andrew Geissler | 028142b | 2023-05-05 11:29:21 -0500 | [diff] [blame] | 71 | |
Patrick Williams | ac13d5f | 2023-11-24 18:59:46 -0600 | [diff] [blame] | 72 | # As per https://bugzilla.redhat.com/show_bug.cgi?id=2203387 |
| 73 | CVE_STATUS[CVE-2023-2680] = "not-applicable-platform: RHEL specific issue." |
| 74 | |
Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame] | 75 | CVE_STATUS[CVE-2023-3019] = "cpe-incorrect: Applies only against versions before 8.2.0" |
| 76 | |
| 77 | CVE_STATUS[CVE-2023-5088] = "cpe-incorrect: Applies only against version 8.2.0 and earlier" |
| 78 | |
| 79 | CVE_STATUS[CVE-2023-6693] = "cpe-incorrect: Applies only against version 8.2.0 and earlier" |
| 80 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 81 | COMPATIBLE_HOST:mipsarchn32 = "null" |
| 82 | COMPATIBLE_HOST:mipsarchn64 = "null" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 83 | COMPATIBLE_HOST:riscv32 = "null" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 84 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 85 | # Per https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03873.html |
| 86 | # upstream states qemu doesn't work without optimization |
| 87 | DEBUG_BUILD = "0" |
| 88 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 89 | do_install:append() { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 90 | # Prevent QA warnings about installed ${localstatedir}/run |
| 91 | if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi |
| 92 | } |
| 93 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 94 | do_install_ptest() { |
| 95 | cp -rL ${B}/tests ${D}${PTEST_PATH} |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 96 | find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcodp]" | xargs -i rm -rf {} |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 97 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 98 | # Don't check the file genreated by configure |
Andrew Geissler | 635e0e4 | 2020-08-21 15:58:33 -0500 | [diff] [blame] | 99 | sed -i -e "1s,#!/usr/bin/bash,#!${base_bindir}/bash," ${D}${PTEST_PATH}/tests/data/acpi/disassemle-aml.sh |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 100 | |
| 101 | # Strip the paths from the QEMU variable, we can use PATH |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 102 | makfiles=$(find ${D}${PTEST_PATH} -name "*.mak") |
| 103 | sed -i -e "s#^QEMU=.*/qemu-#QEMU=qemu-#g" $makfiles |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 104 | |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 105 | # Strip compiler flags as they break reproducibility |
| 106 | sed -i -e "s,^CC=.*,CC=gcc," \ |
| 107 | -e "s,^CCAS=.*,CCAS=gcc," \ |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 108 | -e "s,^LD=.*,LD=ld," $makfiles |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 109 | |
| 110 | # Update SRC_PATH variable to the right place on target |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 111 | sed -i -e "s#^SRC_PATH=.*#SRC_PATH=${PTEST_PATH}#g" $makfiles |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 112 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 113 | # https://gitlab.com/qemu-project/qemu/-/issues/1403 |
| 114 | rm ${D}${PTEST_PATH}/tests/unit/test-io-channel-command |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 115 | } |
| 116 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 117 | # QEMU_TARGETS is overridable variable |
Patrick Williams | 864cc43 | 2023-02-09 14:54:44 -0600 | [diff] [blame] | 118 | QEMU_TARGETS ?= "arm aarch64 i386 loongarch64 mips mipsel mips64 mips64el ppc ppc64 ppc64le riscv32 riscv64 sh4 x86_64" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 119 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 120 | EXTRA_OECONF = " \ |
| 121 | --prefix=${prefix} \ |
| 122 | --bindir=${bindir} \ |
| 123 | --includedir=${includedir} \ |
| 124 | --libdir=${libdir} \ |
| 125 | --mandir=${mandir} \ |
| 126 | --datadir=${datadir} \ |
| 127 | --docdir=${docdir}/${BPN} \ |
| 128 | --sysconfdir=${sysconfdir} \ |
| 129 | --libexecdir=${libexecdir} \ |
| 130 | --localstatedir=${localstatedir} \ |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 131 | --with-suffix=${BPN} \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 132 | --disable-strip \ |
| 133 | --disable-werror \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 134 | --extra-cflags='${CFLAGS}' \ |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 135 | --extra-ldflags='${LDFLAGS}' \ |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 136 | --disable-download \ |
| 137 | --disable-docs \ |
Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame] | 138 | --host-cc='${BUILD_CC}' \ |
| 139 | --disable-af-xdp \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 140 | ${PACKAGECONFIG_CONFARGS} \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 141 | " |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 142 | |
Patrick Williams | f52e3dd | 2024-01-26 13:04:43 -0600 | [diff] [blame] | 143 | EXTRA_OECONF:append:class-target = " --cross-prefix=${HOST_PREFIX}" |
| 144 | EXTRA_OECONF:append:class-nativesdk = " --cross-prefix=${HOST_PREFIX}" |
| 145 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 146 | B = "${WORKDIR}/build" |
| 147 | |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 148 | #EXTRA_OECONF:append = " --python=${HOSTTOOLS_DIR}/python3" |
Brad Bishop | 96ff198 | 2019-08-19 13:50:42 -0400 | [diff] [blame] | 149 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 150 | do_configure:prepend:class-native() { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 151 | # Append build host pkg-config paths for native target since the host may provide sdl |
| 152 | BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config || echo "") |
| 153 | if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then |
| 154 | export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 155 | fi |
| 156 | } |
| 157 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 158 | do_configure() { |
Patrick Williams | f52e3dd | 2024-01-26 13:04:43 -0600 | [diff] [blame] | 159 | export PKG_CONFIG=pkg-config |
Andrew Geissler | 78b7279 | 2022-06-14 06:47:25 -0500 | [diff] [blame] | 160 | ${S}/configure ${EXTRA_OECONF} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 161 | } |
Brad Bishop | 64c979e | 2019-11-04 13:55:29 -0500 | [diff] [blame] | 162 | do_configure[cleandirs] += "${B}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 163 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 164 | do_install () { |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 165 | export STRIP="" |
| 166 | oe_runmake 'DESTDIR=${D}' install |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 167 | |
| 168 | # If we built the guest agent, also install startup/udev rules |
| 169 | if [ -e "${D}${bindir}/qemu-ga" ]; then |
| 170 | install -d ${D}${sysconfdir}/init.d/ |
| 171 | install -m 0755 ${WORKDIR}/qemu-guest-agent.init ${D}${sysconfdir}/init.d/qemu-guest-agent |
| 172 | sed -i 's:@bindir@:${bindir}:' ${D}${sysconfdir}/init.d/qemu-guest-agent |
| 173 | |
| 174 | install -d ${D}${sysconfdir}/udev/rules.d/ |
| 175 | install -m 0644 ${WORKDIR}/qemu-guest-agent.udev ${D}${sysconfdir}/udev/rules.d/60-qemu-guest-agent.rules |
| 176 | |
| 177 | install -d ${D}${systemd_unitdir}/system/ |
| 178 | install -m 0644 ${S}/contrib/systemd/qemu-guest-agent.service ${D}${systemd_unitdir}/system |
| 179 | sed -i -e 's,-/usr/bin/,-${bindir}/,g' ${D}${systemd_unitdir}/system/qemu-guest-agent.service |
| 180 | fi |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 181 | # ELF binary /usr/share/qemu/s390-netboot.img has relocations in .text |
| 182 | rm ${D}${datadir}/qemu/s390-netboot.img -f |
| 183 | # ELF binary /usr/share/qemu/s390-ccw.img has relocations in .text [textrel] |
| 184 | rm ${D}${datadir}/qemu/s390-ccw.img -f |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 185 | } |
| 186 | |
| 187 | # The following fragment will create a wrapper for qemu-mips user emulation |
| 188 | # binary in order to work around a segmentation fault issue. Basically, by |
| 189 | # default, the reserved virtual address space for 32-on-64 bit is set to 4GB. |
| 190 | # This will trigger a MMU access fault in the virtual CPU. With this change, |
| 191 | # the qemu-mips works fine. |
| 192 | # IMPORTANT: This piece needs to be removed once the root cause is fixed! |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 193 | do_install:append() { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 194 | if [ -e "${D}/${bindir}/qemu-mips" ]; then |
| 195 | create_wrapper ${D}/${bindir}/qemu-mips \ |
| 196 | QEMU_RESERVED_VA=0x0 |
| 197 | fi |
| 198 | } |
| 199 | # END of qemu-mips workaround |
| 200 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 201 | # Disable kvm/virgl/mesa on targets that do not support it |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 202 | PACKAGECONFIG:remove:darwin = "kvm virglrenderer epoxy gtk+" |
Patrick Williams | f52e3dd | 2024-01-26 13:04:43 -0600 | [diff] [blame] | 203 | PACKAGECONFIG:remove:mingw32 = "kvm virglrenderer epoxy gtk+ pie" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 204 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 205 | PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl2" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 206 | PACKAGECONFIG[png] = "--enable-png,--disable-png,libpng" |
Andrew Geissler | b7d2861 | 2020-07-24 16:15:54 -0500 | [diff] [blame] | 207 | PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr --enable-cap-ng,--disable-virtfs,libcap-ng attr," |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 208 | PACKAGECONFIG[aio] = "--enable-linux-aio,--disable-linux-aio,libaio," |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 209 | PACKAGECONFIG[uring] = "--enable-linux-io-uring,--disable-linux-io-uring,liburing" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 210 | PACKAGECONFIG[xen] = "--enable-xen,--disable-xen,xen-tools,xen-tools-libxenstore xen-tools-libxenctrl xen-tools-libxenguest" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 211 | PACKAGECONFIG[vnc-sasl] = "--enable-vnc --enable-vnc-sasl,--disable-vnc-sasl,cyrus-sasl," |
| 212 | PACKAGECONFIG[vnc-jpeg] = "--enable-vnc --enable-vnc-jpeg,--disable-vnc-jpeg,jpeg," |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 213 | PACKAGECONFIG[libcurl] = "--enable-curl,--disable-curl,curl," |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 214 | PACKAGECONFIG[nss] = "--enable-smartcard,--disable-smartcard,nss," |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 215 | PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses," |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 216 | PACKAGECONFIG[gtk+] = "--enable-gtk,--disable-gtk,gtk+3 gettext-native" |
| 217 | PACKAGECONFIG[vte] = "--enable-vte,--disable-vte,vte gettext-native" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 218 | PACKAGECONFIG[libcap-ng] = "--enable-cap-ng,--disable-cap-ng,libcap-ng," |
Brad Bishop | c68388fc | 2019-08-26 01:33:31 -0400 | [diff] [blame] | 219 | PACKAGECONFIG[ssh] = "--enable-libssh,--disable-libssh,libssh," |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 220 | PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt," |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 221 | PACKAGECONFIG[nettle] = "--enable-nettle,--disable-nettle,nettle" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 222 | PACKAGECONFIG[libusb] = "--enable-libusb,--disable-libusb,libusb1" |
| 223 | PACKAGECONFIG[fdt] = "--enable-fdt,--disable-fdt,dtc" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 224 | PACKAGECONFIG[alsa] = "--audio-drv-list=default,,alsa-lib" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 225 | PACKAGECONFIG[epoxy] = "--enable-opengl,--disable-opengl,libepoxy" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 226 | PACKAGECONFIG[lzo] = "--enable-lzo,--disable-lzo,lzo" |
Andrew Geissler | 220dafd | 2023-10-04 10:18:08 -0500 | [diff] [blame] | 227 | PACKAGECONFIG[dax] = "--enable-libdaxctl,--disable-libdaxctl,ndctl" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 228 | PACKAGECONFIG[numa] = "--enable-numa,--disable-numa,numactl" |
| 229 | PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 230 | PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 231 | PACKAGECONFIG[libiscsi] = "--enable-libiscsi,--disable-libiscsi" |
| 232 | PACKAGECONFIG[kvm] = "--enable-kvm,--disable-kvm" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 233 | PACKAGECONFIG[virglrenderer] = "--enable-virglrenderer,--disable-virglrenderer,virglrenderer" |
| 234 | # spice will be in meta-networking layer |
| 235 | PACKAGECONFIG[spice] = "--enable-spice,--disable-spice,spice" |
| 236 | # usbredir will be in meta-networking layer |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 237 | PACKAGECONFIG[dbus-display] = "--enable-dbus-display,--disable-dbus-display,glib-2.0-native,dbus" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 238 | PACKAGECONFIG[usb-redir] = "--enable-usb-redir,--disable-usb-redir,usbredir" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 239 | PACKAGECONFIG[snappy] = "--enable-snappy,--disable-snappy,snappy" |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 240 | PACKAGECONFIG[glusterfs] = "--enable-glusterfs,--disable-glusterfs,glusterfs" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 241 | PACKAGECONFIG[xkbcommon] = "--enable-xkbcommon,--disable-xkbcommon,libxkbcommon" |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 242 | PACKAGECONFIG[libudev] = "--enable-libudev,--disable-libudev,udev" |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 243 | PACKAGECONFIG[attr] = "--enable-attr,--disable-attr,attr," |
| 244 | PACKAGECONFIG[rbd] = "--enable-rbd,--disable-rbd,ceph,ceph" |
| 245 | PACKAGECONFIG[vhost] = "--enable-vhost-net,--disable-vhost-net,," |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 246 | PACKAGECONFIG[ust] = "--enable-trace-backends=ust,,lttng-ust," |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 247 | PACKAGECONFIG[pie] = "--enable-pie,--disable-pie,," |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 248 | PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp" |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 249 | # libnfs is currently provided by meta-kodi |
| 250 | PACKAGECONFIG[libnfs] = "--enable-libnfs,--disable-libnfs,libnfs" |
| 251 | PACKAGECONFIG[pmem] = "--enable-libpmem,--disable-libpmem,pmdk" |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 252 | PACKAGECONFIG[pulseaudio] = "--enable-pa,--disable-pa,pulseaudio" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 253 | PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux" |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 254 | PACKAGECONFIG[bpf] = "--enable-bpf,--disable-bpf,libbpf" |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 255 | PACKAGECONFIG[capstone] = "--enable-capstone,--disable-capstone" |
| 256 | PACKAGECONFIG[rdma] = "--enable-rdma,--disable-rdma" |
| 257 | PACKAGECONFIG[vde] = "--enable-vde,--disable-vde" |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 258 | PACKAGECONFIG[fuse] = "--enable-fuse --enable-fuse-lseek,--disable-fuse --disable-fuse-lseek,fuse3" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 259 | PACKAGECONFIG[slirp] = "--enable-slirp,--disable-slirp,libslirp" |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 260 | PACKAGECONFIG[brlapi] = "--enable-brlapi,--disable-brlapi" |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 261 | PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack," |
Patrick Williams | e760df8 | 2023-05-26 11:10:49 -0500 | [diff] [blame] | 262 | PACKAGECONFIG[debuginfo] = "--enable-libdw,--disable-libdw,elfutils" |
Patrick Williams | 169d7bc | 2024-01-05 11:33:25 -0600 | [diff] [blame] | 263 | PACKAGECONFIG[pipewire] = "--enable-pipewire,--disable-pipewire,pipewire" |
Patrick Williams | f52e3dd | 2024-01-26 13:04:43 -0600 | [diff] [blame] | 264 | PACKAGECONFIG[sndio] = "--enable-sndio,--disable-sndio,sndio" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 265 | |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 266 | INSANE_SKIP:${PN}-common = "arch" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 267 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 268 | FILES:${PN} += "${datadir}/icons" |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 269 | |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 270 | # For user who want to install all arch packages |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 271 | PACKAGES =+ "${PN}-common" |
| 272 | RDEPENDS:${PN} += "${PN}-common" |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 273 | |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 274 | ALLOW_EMPTY:${PN} = "1" |
| 275 | FILES:${PN} = "" |
| 276 | |
| 277 | FILES:${PN}-common = "${bindir}/* ${includedir}/* ${libexecdir}/* ${datadir}/* ${localstatedir}" |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 278 | |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 279 | PACKAGES_DYNAMIC += "^${PN}-user-.* ^${PN}-system-.*" |
| 280 | |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 281 | PACKAGESPLITFUNCS =+ "split_qemu_packages" |
| 282 | |
| 283 | python split_qemu_packages () { |
| 284 | archdir = d.expand('${bindir}/') |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 285 | subpackages = do_split_packages(d, archdir, r'^qemu-system-(.*)$', '${PN}-system-%s', 'QEMU full system emulation binaries(%s)' , prepend=True, extra_depends='${PN}-common') |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 286 | |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 287 | 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') |
| 288 | if subpackages: |
| 289 | d.appendVar('RDEPENDS:' + d.getVar('PN'), ' ' + ' '.join(subpackages)) |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 290 | mipspackage = d.getVar('PN') + "-user-mips" |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 291 | if mipspackage in ' '.join(subpackages): |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 292 | d.appendVar('RDEPENDS:' + mipspackage, ' ' + d.getVar("MLPREFIX") + 'bash') |
| 293 | } |
| 294 | |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 295 | # Put the guest agent in a separate package |
| 296 | PACKAGES =+ "${PN}-guest-agent" |
| 297 | SUMMARY:${PN}-guest-agent = "QEMU guest agent" |
| 298 | FILES:${PN}-guest-agent += " \ |
| 299 | ${bindir}/qemu-ga \ |
| 300 | ${sysconfdir}/udev/rules.d/60-qemu-guest-agent.rules \ |
| 301 | ${sysconfdir}/init.d/qemu-guest-agent \ |
| 302 | ${systemd_unitdir}/system/qemu-guest-agent.service \ |
| 303 | " |
| 304 | |
| 305 | INITSCRIPT_PACKAGES = "${PN}-guest-agent" |
| 306 | INITSCRIPT_NAME:${PN}-guest-agent = "qemu-guest-agent" |
| 307 | INITSCRIPT_PARAMS:${PN}-guest-agent = "defaults" |
| 308 | |
| 309 | SYSTEMD_PACKAGES = "${PN}-guest-agent" |
| 310 | SYSTEMD_SERVICE:${PN}-guest-agent = "qemu-guest-agent.service" |