summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu
diff options
context:
space:
mode:
authorMingli Yu <mingli.yu@windriver.com>2023-06-09 11:04:18 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-06-09 13:55:21 +0100
commit1edd0b41f82e9c4382642e5b574a6102b57e5820 (patch)
treeaa5dce38792d43c5ec9d8a3a326356d996e6f7c7 /meta/recipes-devtools/qemu
parent0241bdb49c52c28cc54ffed5bd4cde387f57451e (diff)
downloadpoky-1edd0b41f82e9c4382642e5b574a6102b57e5820.tar.gz
qemu: Split the qemu package
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. (From OE-Core rev: 893846ead7ee54d53e9076150cd655e0c8bca5db) Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu')
-rw-r--r--meta/recipes-devtools/qemu/qemu.inc22
1 files changed, 22 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index a87dee5c99..6acda61425 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -230,6 +230,28 @@ INSANE_SKIP:${PN} = "arch"
230 230
231FILES:${PN} += "${datadir}/icons" 231FILES:${PN} += "${datadir}/icons"
232 232
233# For user who want to install all arch packages
234PACKAGES =+ "${PN}-system-all ${PN}-user-all"
235
236ALLOW_EMPTY:${PN}-system-all = "1"
237ALLOW_EMPTY:${PN}-user-all = "1"
238
239PACKAGESPLITFUNCS =+ "split_qemu_packages"
240
241python split_qemu_packages () {
242 archdir = d.expand('${bindir}/')
243 syspackages = do_split_packages(d, archdir, r'^qemu-system-(.*)$', '${PN}-system-%s', 'QEMU full system emulation binaries(%s)' , prepend=True)
244 if syspackages:
245 d.setVar('RDEPENDS:' + d.getVar('PN') + '-system-all', ' '.join(syspackages))
246
247 userpackages = 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)
248 if userpackages:
249 d.setVar('RDEPENDS:' + d.getVar('PN') + '-user-all', ' '.join(userpackages))
250 mipspackage = d.getVar('PN') + "-user-mips"
251 if mipspackage in ' '.join(userpackages):
252 d.appendVar('RDEPENDS:' + mipspackage, ' ' + d.getVar("MLPREFIX") + 'bash')
253}
254
233# Put the guest agent in a separate package 255# Put the guest agent in a separate package
234PACKAGES =+ "${PN}-guest-agent" 256PACKAGES =+ "${PN}-guest-agent"
235SUMMARY:${PN}-guest-agent = "QEMU guest agent" 257SUMMARY:${PN}-guest-agent = "QEMU guest agent"