Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 1 | BPN = "qemu" |
| 2 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 3 | inherit python3-dir |
| 4 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 5 | require qemu-native.inc |
| 6 | |
Brad Bishop | c68388fc | 2019-08-26 01:33:31 -0400 | [diff] [blame] | 7 | # As some of the files installed by qemu-native and qemu-system-native |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 8 | # are the same, we depend on qemu-native to get the full installation set |
| 9 | # and avoid file clashes |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 10 | DEPENDS = "glib-2.0-native zlib-native pixman-native qemu-native bison-native meson-native ninja-native" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 11 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 12 | EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 13 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 14 | PACKAGECONFIG ??= "fdt alsa kvm pie \ |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 15 | ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer glx', '', d)} \ |
Andrew Geissler | 1e34c2d | 2020-05-29 16:02:59 -0500 | [diff] [blame] | 16 | " |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 17 | |
| 18 | # Handle distros such as CentOS 5 32-bit that do not have kvm support |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 19 | PACKAGECONFIG:remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 20 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 21 | do_install:append() { |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 22 | install -Dm 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu |
| 23 | |
| 24 | # The following is also installed by qemu-native |
| 25 | rm -f ${D}${datadir}/qemu/trace-events-all |
| 26 | rm -rf ${D}${datadir}/qemu/keymaps |
| 27 | rm -rf ${D}${datadir}/icons/ |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 28 | |
| 29 | # Install qmp.py to be used with testimage |
| 30 | install -D ${S}/python/qemu/qmp.py ${D}${PYTHON_SITEPACKAGES_DIR}/qmp.py |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 31 | } |