mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Aleksander Morgado <aleksander@aleksander.es>
To: barebox@lists.infradead.org
Cc: Aleksander Morgado <aleksander@aleksander.es>
Subject: [PATCH 0/2] Enabling support for the FIFO based console in sandbox
Date: Wed, 31 May 2017 18:12:39 +0200	[thread overview]
Message-ID: <cover.1496247033.git.aleksander@aleksander.es> (raw)

Hey,

I've been trying to make the FIFO based extra sandbox console work for some time now, and ended up preparing a couple of patches that seem to serve the purpose. I'm not totally sure whether this hasn't been working for a long time or if I was doing somethin wrong myself (possibly!).

The first one is a fix to allow registering multiple sandbox consoles; looks like this was not possible with the current codebase as the additional consoles were all being registered as devices with the same name and id.

The second patch is open for discussion. I wasn't able to make the setup work with separate console devices registered for input and output, the only way I could make it work was registering a console that did both input and output, so I ended up modifying it so that the logic of the application allows only that, an extra bidirectional console using two separate FIFO files. If either --stdin or --stdout is not given, or if either of them gets given multiple times, an error is issued. With this setup it works for me, I can run barebox and use either the default stdin/stdout console or the FIFO based one, but maybe we're losing other useful usecases.

What do you think?

Aleksander Morgado (2):
  sandbox: fix registering multiple consoles
  sandbox: --stdin and --stdout allow max one bidirectional console

 arch/sandbox/board/console.c                   |  5 ++-
 arch/sandbox/mach-sandbox/include/mach/linux.h |  2 +-
 arch/sandbox/os/common.c                       | 50 +++++++++++++++++++-------
 drivers/serial/linux_console.c                 |  3 ++
 4 files changed, 44 insertions(+), 16 deletions(-)

--
2.13.0

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2017-05-31 16:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-31 16:12 Aleksander Morgado [this message]
2017-05-31 16:12 ` [PATCH 1/2] sandbox: fix registering multiple consoles Aleksander Morgado
2017-05-31 16:12 ` [PATCH 2/2] sandbox: --stdin and --stdout allow max one bidirectional console Aleksander Morgado
2017-06-01  8:24   ` Sascha Hauer
2017-06-01  8:28     ` Aleksander Morgado
2017-06-01  8:41       ` 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=cover.1496247033.git.aleksander@aleksander.es \
    --to=aleksander@aleksander.es \
    --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