diff mbox series

[4/4] fragments/qemu: add support for enabling sdl in qemu

Message ID 20250603113558.3104618-4-alex.kanavin@gmail.com (mailing list archive)
State New
Headers show
Series [1/4] meta/conf/templates: add a blank template | expand

Commit Message

Alexander Kanavin June 3, 2025, 11:35 a.m. UTC
From: Alexander Kanavin <alex@linutronix.de>

This has been the default in poky's local.conf template for
a long time, but it's not enabled directly in poky distro.
To allow better sstate reuse and a better user experience
on a typical laptop (qemu will pop up a graphical window directly),
let's add this fragment and enable it in official bitbake-setup
configurations.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 meta/conf/fragments/qemu/enable-native-sdl.conf | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 meta/conf/fragments/qemu/enable-native-sdl.conf

Comments

Richard Purdie June 3, 2025, 7:44 p.m. UTC | #1
On Tue, 2025-06-03 at 13:35 +0200, Alexander Kanavin via lists.yoctoproject.org wrote:
> From: Alexander Kanavin <alex@linutronix.de>
> 
> This has been the default in poky's local.conf template for
> a long time, but it's not enabled directly in poky distro.
> To allow better sstate reuse and a better user experience
> on a typical laptop (qemu will pop up a graphical window directly),
> let's add this fragment and enable it in official bitbake-setup
> configurations.
> 
> Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> ---
>  meta/conf/fragments/qemu/enable-native-sdl.conf | 8 ++++++++
>  1 file changed, 8 insertions(+)
>  create mode 100644 meta/conf/fragments/qemu/enable-native-sdl.conf
> 
> diff --git a/meta/conf/fragments/qemu/enable-native-sdl.conf b/meta/conf/fragments/qemu/enable-native-sdl.conf
> new file mode 100644
> index 00000000000..21c1298171e
> --- /dev/null
> +++ b/meta/conf/fragments/qemu/enable-native-sdl.conf
> @@ -0,0 +1,8 @@
> +BB_CONF_FRAGMENT_SUMMARY = "Enable SDL support for direct graphical output on the build host."
> +BB_CONF_FRAGMENT_DESCRIPTION = "By default qemu is built with a internal VNC server \
> +support. To see graphical output from the guest system, one can use a VNC client to \
> +connect to it. This fragment enables Simple Directmedia Layer support, which allows \
> +seeing the graphical output from guest directly in a X/Wayland session on the build host machine. \
> +"
> +
> +PACKAGECONFIG:append:pn-qemu-system-native = " sdl"

I have to wonder whether rather than making this a fragment, we should just change the default...

Cheers,

Richard
Alexander Kanavin June 4, 2025, 7:40 a.m. UTC | #2
On Tue, 3 Jun 2025 at 21:44, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> > This has been the default in poky's local.conf template for
> > a long time, but it's not enabled directly in poky distro.
> > To allow better sstate reuse and a better user experience
> > on a typical laptop (qemu will pop up a graphical window directly),
> > let's add this fragment and enable it in official bitbake-setup
> > configurations.

> I have to wonder whether rather than making this a fragment, we should just change the default...

Yes. I am somewhat unsure where to set it: in the recipe, or in poky
distro? I'm leaning towards the former, as both oe-core and poky
default local.conf templates add the setting.

Alex
Richard Purdie June 4, 2025, 7:43 a.m. UTC | #3
On Wed, 2025-06-04 at 09:40 +0200, Alexander Kanavin wrote:
> On Tue, 3 Jun 2025 at 21:44, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > > This has been the default in poky's local.conf template for
> > > a long time, but it's not enabled directly in poky distro.
> > > To allow better sstate reuse and a better user experience
> > > on a typical laptop (qemu will pop up a graphical window
> > > directly),
> > > let's add this fragment and enable it in official bitbake-setup
> > > configurations.
> 
> > I have to wonder whether rather than making this a fragment, we
> > should just change the default...
> 
> Yes. I am somewhat unsure where to set it: in the recipe, or in poky
> distro? I'm leaning towards the former, as both oe-core and poky
> default local.conf templates add the setting.

I agree, I think we should change the recipe.

Cheers,

Richard
diff mbox series

Patch

diff --git a/meta/conf/fragments/qemu/enable-native-sdl.conf b/meta/conf/fragments/qemu/enable-native-sdl.conf
new file mode 100644
index 00000000000..21c1298171e
--- /dev/null
+++ b/meta/conf/fragments/qemu/enable-native-sdl.conf
@@ -0,0 +1,8 @@ 
+BB_CONF_FRAGMENT_SUMMARY = "Enable SDL support for direct graphical output on the build host."
+BB_CONF_FRAGMENT_DESCRIPTION = "By default qemu is built with a internal VNC server \
+support. To see graphical output from the guest system, one can use a VNC client to \
+connect to it. This fragment enables Simple Directmedia Layer support, which allows \
+seeing the graphical output from guest directly in a X/Wayland session on the build host machine. \
+"
+
+PACKAGECONFIG:append:pn-qemu-system-native = " sdl"