From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] Documentation: devel: project-ideas: add SDL input support
Date: Mon, 16 Dec 2024 12:33:44 +0100 [thread overview]
Message-ID: <20241216113344.403540-1-a.fatoum@pengutronix.de> (raw)
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
next reply other threads:[~2024-12-16 11:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-16 11:33 Ahmad Fatoum [this message]
2024-12-20 8:53 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241216113344.403540-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox