diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-07-07 18:07:11 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-07-16 10:46:18 +0200 |
commit | e4caa90188430e1d527a40edb0e613b05900b243 (patch) | |
tree | 98f0411ba84dc3e33d7b062472b2ec52c905daf5 /commands | |
parent | 62a123fb589178a41dff91db709696f04269ad76 (diff) | |
download | barebox-e4caa90188430e1d527a40edb0e613b05900b243.tar.gz barebox-e4caa90188430e1d527a40edb0e613b05900b243.tar.xz |
serial: Add EFI stdio driver
This adds a driver which uses the EFI stdin/stdout interfaces to
implement a barebox console. Keyboard input should be fairly complete,
but not all vt100 needed by barebox work properly. The clear-to-eol
escape is missing causing garbled output in the editor.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r-- | commands/edit.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/commands/edit.c b/commands/edit.c index 5a2da7d034..98af583574 100644 --- a/commands/edit.c +++ b/commands/edit.c @@ -379,7 +379,16 @@ static int do_edit(int argc, char *argv[]) return COMMAND_ERROR_USAGE; screenwidth = 80; - screenheight = 25; + + /* + * The EFI simple text output protocol wraps to the next line and scrolls + * down when we write to the right bottom screen position. Reduce the number + * of rows by one to work around this. + */ + if (IS_ENABLED(CONFIG_ARCH_EFI)) + screenheight = 24; + else + screenheight = 25; /* check if we are called as "sedit" instead of "edit" */ if (*argv[0] == 's') { |