mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] Documentation: devel: project-ideas: add SDL input support
@ 2024-12-16 11:33 Ahmad Fatoum
  2024-12-20  8:53 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2024-12-16 11:33 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

For developing barebox, it's often useful to run barebox directly as
userspace program by compiling it for the sandbox architecture, but
there is no input driver for sandbox yet although we have a virtio input
drive.

Add SDL input as project idea.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 Documentation/devel/project-ideas.rst | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/Documentation/devel/project-ideas.rst b/Documentation/devel/project-ideas.rst
index 8d6b5d6e584a..7ca827a6538e 100644
--- a/Documentation/devel/project-ideas.rst
+++ b/Documentation/devel/project-ideas.rst
@@ -198,3 +198,29 @@ hardware and tutorial is extended to make use of the new peripherals.
 
 This project does not require dedicated hardware. The development
 machine need only support a recent browser.
+
+Add Sandbox SDL input support
+=============================
+
+Skills: C (Basics). Difficulty: Lowest
+
+barebox on real hardware has multiple possible input method: buttons,
+keypads and even USB keyboards allow controlling barebox beyond what
+a serial console provides.
+
+For virtualized targets, barebox has ``virtio_input`` support, which
+JSBarebox uses to move the DOOM guy around.
+
+For developing barebox, it's often useful to run barebox directly as
+userspace program by compiling it for the ``sandbox`` architecture.
+
+This mode of operation can already use SDL 2.0 for video and sound
+and it would be nice to extend it with input support.
+
+As SDL is handled in a separate thread, this means we need a thread-safe
+FIFO, where the SDL thread would queue input events and barebox would
+dequeue events on the other side as they are polled.
+
+As the code will have a SDL 2.0 dependency anyway, it should probably
+make use of SDL 2.0 mutex/condition variables API for serializing
+accesses to the FIFO.
-- 
2.39.5




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

end of thread, other threads:[~2024-12-20  8:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-16 11:33 [PATCH] Documentation: devel: project-ideas: add SDL input support Ahmad Fatoum
2024-12-20  8:53 ` Sascha Hauer

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