From: Mingli Yu <[email protected]> Currently all files packaged into one package such as qemu-7.2.0-*.rpm. After the qemu package installed on the target, it will take up 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.
Split the qemu package into qemu-7.2.0-*.rpm, qemu-aarch64-7.2.0*.rpm, qemu-arm-7.2.0*.rpm, qemu-x86_64-7.2.0*.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 17M and the size of the extracted qemu RPM decreased from about 464M to about 248M. Signed-off-by: Mingli Yu <[email protected]> --- meta/recipes-devtools/qemu/qemu.inc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index a87dee5c99..7302d63747 100644 --- a/meta/recipes-devtools/qemu/qemu.inc +++ b/meta/recipes-devtools/qemu/qemu.inc @@ -230,6 +230,25 @@ INSANE_SKIP:${PN} = "arch" FILES:${PN} += "${datadir}/icons" +python(){ + allarchs = d.getVar('QEMU_TARGETS').split() + packages = d.getVar('PACKAGES').split() + pn = d.getVar('PN') + + newpackages=[] + for arch in allarchs: + archpackage = 'qemu-' + arch + if archpackage not in packages: + newpackages.append(archpackage) + d.setVar('FILES:' + pn + "-" + arch, '${bindir}/qemu-' + arch) + d.appendVar('FILES:' + pn + "-" + arch, ' ' + '${bindir}/qemu-system-' + arch) + if arch == "mips": + d.appendVar('RDEPENDS:' + pn + '-' + arch, ' ' + 'bash') + packages = newpackages + packages + d.setVar('PACKAGES', ' '.join(packages)) +} + + # Put the guest agent in a separate package PACKAGES =+ "${PN}-guest-agent" SUMMARY:${PN}-guest-agent = "QEMU guest agent" -- 2.25.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#181922): https://lists.openembedded.org/g/openembedded-core/message/181922 Mute This Topic: https://lists.openembedded.org/mt/99219254/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
