openembedded-core.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] qemu: Split the qemu package
@ 2023-05-30 13:17 mingli.yu
  2023-05-30 13:30 ` [OE-core] " Richard Purdie
  2023-05-30 13:51 ` Bruce Ashfield
  0 siblings, 2 replies; 26+ messages in thread
From: mingli.yu @ 2023-05-30 13:17 UTC (permalink / raw)
  To: openembedded-core

From: Mingli Yu <mingli.yu@windriver.com>

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 <mingli.yu@windriver.com>
---
 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



^ permalink raw reply related	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2023-06-09  3:31 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-30 13:17 [PATCH] qemu: Split the qemu package mingli.yu
2023-05-30 13:30 ` [OE-core] " Richard Purdie
2023-05-30 13:51 ` Bruce Ashfield
2023-05-30 14:33   ` Alexander Kanavin
2023-05-30 14:54     ` Richard Purdie
2023-05-30 15:09       ` Bruce Ashfield
2023-06-01  9:33         ` Yu, Mingli
2023-06-01 13:31           ` Bruce Ashfield
2023-06-01  9:28       ` [PATCH v2] " mingli.yu
2023-06-01 13:32         ` [OE-core] " Bruce Ashfield
2023-06-02  2:36           ` [PATCH v3] " mingli.yu
2023-06-02 13:08             ` [OE-core] " Bruce Ashfield
2023-06-02 13:19               ` Richard Purdie
2023-06-07  3:09                 ` Yu, Mingli
2023-06-07  8:33                   ` Richard Purdie
2023-06-07  9:08                     ` [PATCH v4] " mingli.yu
2023-06-07 20:53                       ` [OE-core] " Alexandre Belloni
2023-06-08  5:45                         ` [PATCH v5] " mingli.yu
2023-06-08 13:33                           ` [OE-core] " Bruce Ashfield
2023-06-08 13:55                             ` Richard Purdie
2023-06-08 15:03                               ` Bruce Ashfield
2023-06-08 15:44                                 ` Richard Purdie
2023-06-08 16:16                                   ` Bruce Ashfield
2023-06-09  2:01                                     ` Yu, Mingli
2023-06-09  3:25                                       ` Bruce Ashfield
2023-06-09  3:31                                         ` Yu, Mingli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).