Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/qemu: allow building only the guest agent
@ 2023-03-22 23:15 unixmania
  2023-03-24 10:15 ` Thomas Petazzoni via buildroot
  2023-05-13  8:25 ` Yann E. MORIN
  0 siblings, 2 replies; 5+ messages in thread
From: unixmania @ 2023-03-22 23:15 UTC (permalink / raw)
  To: buildroot; +Cc: Carlos Santos, Romain Naour

From: Carlos Santos <unixmania@gmail.com>

Most of the tools are useful only on virtualization hosts. After the
upgrade to QEMU 7.2.0, it is possible to build only quemu-ga, which
makes more sense when we build guest VM images.

Also do not build the other tools by default if none of the emulators is
selected, since the user does not necessarily wants them. Ideally, it
should not be possible to select qemu without selecting at least one of
the subcomponents but it is hard to guess what the user wants.

Signed-off-by: Carlos Santos <unixmania@gmail.com>
---
NOTE

This was also possible on older QEMU versions, but required a trick to
force compiling the code required to link qemu-ga without building the
other tools:

   ./configure --enable-system --target-list="" --disable-tools --enable-guest-agent
---
 package/qemu/Config.in | 8 +++++++-
 package/qemu/qemu.mk   | 6 ++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/package/qemu/Config.in b/package/qemu/Config.in
index a446c0cf68..6a9b08648d 100644
--- a/package/qemu/Config.in
+++ b/package/qemu/Config.in
@@ -26,7 +26,6 @@ menuconfig BR2_PACKAGE_QEMU
 	depends on BR2_USE_MMU # fork()
 	select BR2_PACKAGE_LIBGLIB2
 	select BR2_PACKAGE_ZLIB
-	select BR2_PACKAGE_QEMU_TOOLS if !BR2_PACKAGE_QEMU_SYSTEM && !BR2_PACKAGE_QEMU_LINUX_USER
 	help
 	  QEMU is a generic and open source machine emulator and
 	  virtualizer.
@@ -358,4 +357,11 @@ config BR2_PACKAGE_QEMU_TOOLS
 	  Say 'y' here to include tools packaged with QEMU
 	  (e.g. qemu-img).
 
+config BR2_PACKAGE_QEMU_GUEST_AGENT
+	bool "Enable guest agent"
+	help
+	  Say 'y' here to include an agent to run on guests, which
+	  communicates with the host over a virtio-serial channel
+	  named "org.qemu.guest_agent.0".
+
 endif # BR2_PACKAGE_QEMU
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index 3cbeffe213..4194670bb0 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -165,6 +165,12 @@ else
 QEMU_OPTS += --disable-tools
 endif
 
+ifeq ($(BR2_PACKAGE_QEMU_GUEST_AGENT),y)
+QEMU_OPTS += --enable-guest-agent
+else
+QEMU_OPTS += --disable-guest-agent
+endif
+
 ifeq ($(BR2_PACKAGE_LIBFUSE3),y)
 QEMU_OPTS += --enable-fuse --enable-fuse-lseek
 QEMU_DEPENDENCIES += libfuse3
-- 
2.31.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2023-05-13  8:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-22 23:15 [Buildroot] [PATCH] package/qemu: allow building only the guest agent unixmania
2023-03-24 10:15 ` Thomas Petazzoni via buildroot
2023-03-25  1:14   ` Carlos Santos
2023-03-31 10:20     ` Thomas Petazzoni via buildroot
2023-05-13  8:25 ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox