Skip to content

Commit

Permalink
efi console patch
Browse files Browse the repository at this point in the history
Signed-off-by: Artem Lapkin <[email protected]>
  • Loading branch information
Artem Lapkin committed Jul 30, 2021
1 parent c75ce0d commit 5fa50c8
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
From f8f085a13f084e3835aeed5e5d7c1b95a92468a1 Mon Sep 17 00:00:00 2001
From: Artem Lapkin <[email protected]>
Date: Fri, 30 Jul 2021 13:36:32 +0800
Subject: [PATCH] efi: console: force 80x25 and replace all unicode chars to .

Signed-off-by: Artem Lapkin <[email protected]>
---
lib/efi_loader/efi_console.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c
index 3b012e1a..70bc6fd6 100644
--- a/lib/efi_loader/efi_console.c
+++ b/lib/efi_loader/efi_console.c
@@ -163,7 +163,11 @@ static efi_status_t EFIAPI efi_cout_output_string(
}
pos = buf;
utf16_utf8_strcpy(&pos, string);
+ if ( strlen(buf) > 1 ) {
+ fputs(stdout, ".");
+ } else {
fputs(stdout, buf);
+ }
free(buf);

/*
@@ -349,6 +353,9 @@ static void query_console_size(void)
if (ret)
return;

+ rows=25;
+ cols=80;
+
/* Test if we can have Mode 1 */
if (cols >= 80 && rows >= 50) {
efi_cout_modes[1].present = 1;
--
2.25.1

41 changes: 41 additions & 0 deletions scripts/build.upload.images
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/sh

## hyphop ##

#= upload builded images

## USAGE: ./build.sdfs

echo "[i] UPLOAD IMAGES to server">&2

NOOP=

for a in "$@"; do
case $a in
yes)
YES=1
;;
test|-n)
NOOP=-n
YES=1
;;
new)
[email protected]
YES=1
;;
*@*)
SERVER="$a"
;;
esac
done

[ "$SERVER" ] || \
[email protected]

CMD="rsync -av $NOOP --progress \
--inplace \
/tmp/u-boot-mainline/. $SERVER:/storage/Firmware/uboot/mainline/"

echo "# $CMD">&2

[ "$YES" ] && $CMD

0 comments on commit 5fa50c8

Please sign in to comment.