re-add deleted grub border patch

accidentally deleted it during rebase

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-01-19 16:33:13 +00:00
parent d22f7f9633
commit 4e33b40655
10 changed files with 109 additions and 18 deletions
@@ -0,0 +1,90 @@
From 5a2c887181e7cdbd6b38d544e460d02623c902e6 Mon Sep 17 00:00:00 2001
From: Leah Rowe <leah@libreboot.org>
Date: Sun, 31 Oct 2021 03:47:05 +0000
Subject: [PATCH 01/10] mitigate grub's missing characters for borders/arrow
characters
This cleans up the display on the main screen in GRUB.
Just don't draw a border, at all.
---
grub-core/normal/menu_text.c | 49 ++----------------------------------
1 file changed, 2 insertions(+), 47 deletions(-)
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
index 9c383e64a..8ec1dd1e8 100644
--- a/grub-core/normal/menu_text.c
+++ b/grub-core/normal/menu_text.c
@@ -108,47 +108,6 @@ grub_print_message_indented (const char *msg, int margin_left, int margin_right,
grub_print_message_indented_real (msg, margin_left, margin_right, term, 0);
}
-static void
-draw_border (struct grub_term_output *term, const struct grub_term_screen_geometry *geo)
-{
- int i;
-
- grub_term_setcolorstate (term, GRUB_TERM_COLOR_NORMAL);
-
- grub_term_gotoxy (term, (struct grub_term_coordinate) { geo->first_entry_x - 1,
- geo->first_entry_y - 1 });
- grub_putcode (GRUB_UNICODE_CORNER_UL, term);
- for (i = 0; i < geo->entry_width + 1; i++)
- grub_putcode (GRUB_UNICODE_HLINE, term);
- grub_putcode (GRUB_UNICODE_CORNER_UR, term);
-
- for (i = 0; i < geo->num_entries; i++)
- {
- grub_term_gotoxy (term, (struct grub_term_coordinate) { geo->first_entry_x - 1,
- geo->first_entry_y + i });
- grub_putcode (GRUB_UNICODE_VLINE, term);
- grub_term_gotoxy (term,
- (struct grub_term_coordinate) { geo->first_entry_x + geo->entry_width + 1,
- geo->first_entry_y + i });
- grub_putcode (GRUB_UNICODE_VLINE, term);
- }
-
- grub_term_gotoxy (term,
- (struct grub_term_coordinate) { geo->first_entry_x - 1,
- geo->first_entry_y - 1 + geo->num_entries + 1 });
- grub_putcode (GRUB_UNICODE_CORNER_LL, term);
- for (i = 0; i < geo->entry_width + 1; i++)
- grub_putcode (GRUB_UNICODE_HLINE, term);
- grub_putcode (GRUB_UNICODE_CORNER_LR, term);
-
- grub_term_setcolorstate (term, GRUB_TERM_COLOR_NORMAL);
-
- grub_term_gotoxy (term,
- (struct grub_term_coordinate) { geo->first_entry_x - 1,
- (geo->first_entry_y - 1 + geo->num_entries
- + GRUB_TERM_MARGIN + 1) });
-}
-
static int
print_message (int nested, int edit, struct grub_term_output *term, int dry_run)
{
@@ -167,10 +126,8 @@ command-line or ESC to discard edits and return to the GRUB menu."),
{
char *msg_translated;
- msg_translated = grub_xasprintf (_("Use the %C and %C keys to select which "
- "entry is highlighted."),
- GRUB_UNICODE_UPARROW,
- GRUB_UNICODE_DOWNARROW);
+ msg_translated = grub_xasprintf (_("Use the arrow keys to select which "
+ "entry is highlighted."));
if (!msg_translated)
return 0;
ret += grub_print_message_indented_real (msg_translated, STANDARD_MARGIN,
@@ -413,8 +370,6 @@ grub_menu_init_page (int nested, int edit,
grub_term_normal_color = grub_color_menu_normal;
grub_term_highlight_color = grub_color_menu_highlight;
- if (geo->border)
- draw_border (term, geo);
grub_term_normal_color = old_color_normal;
grub_term_highlight_color = old_color_highlight;
geo->timeout_y = geo->first_entry_y + geo->num_entries
--
2.47.3
@@ -1,7 +1,7 @@
From c6738750164712e2e1f42563bb54d3d14b82cf71 Mon Sep 17 00:00:00 2001 From 25d7d35e0af74361a5510c3e6313b8ce5e00cd6a Mon Sep 17 00:00:00 2001
From: Leah Rowe <leah@libreboot.org> From: Leah Rowe <leah@libreboot.org>
Date: Sat, 19 Nov 2022 16:30:24 +0000 Date: Sat, 19 Nov 2022 16:30:24 +0000
Subject: [PATCH 1/8] say the name libreboot, in the grub menu Subject: [PATCH 02/10] say the name libreboot, in the grub menu
--- ---
grub-core/normal/main.c | 2 +- grub-core/normal/main.c | 2 +-
@@ -1,7 +1,7 @@
From fd3e7f0b0f27b22591c12d371e10e1399865c057 Mon Sep 17 00:00:00 2001 From acff2df937bb4172f9bdb46d12e82edbbcad7996 Mon Sep 17 00:00:00 2001
From: Leah Rowe <leah@libreboot.org> From: Leah Rowe <leah@libreboot.org>
Date: Mon, 30 Oct 2023 22:19:21 +0000 Date: Mon, 30 Oct 2023 22:19:21 +0000
Subject: [PATCH 2/8] at_keyboard coreboot: force scancodes2+translate Subject: [PATCH 03/10] at_keyboard coreboot: force scancodes2+translate
Scan code set 2 with translation should be assumed in Scan code set 2 with translation should be assumed in
every case, as the default starting position. every case, as the default starting position.
@@ -1,7 +1,7 @@
From 3d3af1a80dc612ef19b9133552945356b221aa66 Mon Sep 17 00:00:00 2001 From 247133e1f9820bcb81f7d27fc1395d64dc7b0a89 Mon Sep 17 00:00:00 2001
From: Leah Rowe <leah@libreboot.org> From: Leah Rowe <leah@libreboot.org>
Date: Tue, 31 Oct 2023 10:33:28 +0000 Date: Tue, 31 Oct 2023 10:33:28 +0000
Subject: [PATCH 3/8] keylayouts: don't print "Unknown key" message Subject: [PATCH 04/10] keylayouts: don't print "Unknown key" message
on keyboards with stuck keys, this results in GRUB just on keyboards with stuck keys, this results in GRUB just
spewing it repeatedly, preventing use of GRUB. spewing it repeatedly, preventing use of GRUB.
@@ -1,7 +1,7 @@
From 98c460f2d63cf8d838ab1293e3845f22660cd055 Mon Sep 17 00:00:00 2001 From c5ad46b7ba93136764fd1eae1bd0c0c32ce1c5b2 Mon Sep 17 00:00:00 2001
From: Leah Rowe <leah@libreboot.org> From: Leah Rowe <leah@libreboot.org>
Date: Sun, 5 Nov 2023 16:14:58 +0000 Date: Sun, 5 Nov 2023 16:14:58 +0000
Subject: [PATCH 4/8] don't print missing prefix errors on the screen Subject: [PATCH 05/10] don't print missing prefix errors on the screen
we do actually set the prefix. this patch modifies we do actually set the prefix. this patch modifies
grub to still set grub_errno and return accordingly, grub to still set grub_errno and return accordingly,
@@ -1,7 +1,7 @@
From 9a98532ffd75505a561ea4c6b4c17d6a468ace48 Mon Sep 17 00:00:00 2001 From 6522ceca8949105b2e1575ada2f05b3061bfe8f3 Mon Sep 17 00:00:00 2001
From: Leah Rowe <leah@libreboot.org> From: Leah Rowe <leah@libreboot.org>
Date: Sun, 5 Nov 2023 16:36:22 +0000 Date: Sun, 5 Nov 2023 16:36:22 +0000
Subject: [PATCH 5/8] don't print error if module not found Subject: [PATCH 06/10] don't print error if module not found
still set grub_errno accordingly, and otherwise still set grub_errno accordingly, and otherwise
behave the same. in libreboot, we remove a lot of behave the same. in libreboot, we remove a lot of
@@ -1,7 +1,7 @@
From 1732706e61633b0ee4db18f1af2a5b93888a8af3 Mon Sep 17 00:00:00 2001 From 557d3e583e6aaa887d7b3876c6980ba0e0e671a3 Mon Sep 17 00:00:00 2001
From: Leah Rowe <leah@libreboot.org> From: Leah Rowe <leah@libreboot.org>
Date: Sun, 5 Nov 2023 17:25:20 +0000 Date: Sun, 5 Nov 2023 17:25:20 +0000
Subject: [PATCH 6/8] don't print empty error messages Subject: [PATCH 07/10] don't print empty error messages
this is part two of the quest to kill the prefix this is part two of the quest to kill the prefix
error message. after i disabled prefix-related error message. after i disabled prefix-related
@@ -1,7 +1,7 @@
From 72420d66c5c5c933b6e249b7e1a0118670335ae1 Mon Sep 17 00:00:00 2001 From 101ea5afcfbe459e624df27c422f59b4ded07000 Mon Sep 17 00:00:00 2001
From: Paul Menzel <pmenzel@molgen.mpg.de> From: Paul Menzel <pmenzel@molgen.mpg.de>
Date: Mon, 17 May 2021 10:24:36 +0200 Date: Mon, 17 May 2021 10:24:36 +0200
Subject: [PATCH 7/8] kern/coreboot/mmap: Map to reserved Subject: [PATCH 08/10] kern/coreboot/mmap: Map to reserved
https://git.savannah.gnu.org/cgit/grub.git/commit/?id=6de9ee86bf9ae50967413e6a73b5dfd13e5ffb50 https://git.savannah.gnu.org/cgit/grub.git/commit/?id=6de9ee86bf9ae50967413e6a73b5dfd13e5ffb50
@@ -1,7 +1,8 @@
From 52de4ac46b4d384a271d18c33238313334def5bc Mon Sep 17 00:00:00 2001 From a56ceedd60bd6515ad3c84ec6aa4c3d66a8bac87 Mon Sep 17 00:00:00 2001
From: Leah Rowe <leah@libreboot.org> From: Leah Rowe <leah@libreboot.org>
Date: Wed, 24 Dec 2025 01:42:17 +0100 Date: Wed, 24 Dec 2025 01:42:17 +0100
Subject: [PATCH 8/8] Revert "configure: Check linker for --image-base support" Subject: [PATCH 09/10] Revert "configure: Check linker for --image-base
support"
This reverts commit 1a5417f39a0ccefcdd5440f2a67f84d2d2e26960. This reverts commit 1a5417f39a0ccefcdd5440f2a67f84d2d2e26960.
--- ---
@@ -1,7 +1,7 @@
From abf2bf6e2973ccaa994f63ff851ba11cbd45f1eb Mon Sep 17 00:00:00 2001 From 66028b6bc149a25894fe5ca395b22804f389a18e Mon Sep 17 00:00:00 2001
From: Leah Rowe <leah@libreboot.org> From: Leah Rowe <leah@libreboot.org>
Date: Mon, 19 Jan 2026 15:27:23 +0000 Date: Mon, 19 Jan 2026 15:27:23 +0000
Subject: [PATCH 1/1] Revert "configure: Print a more helpful error if Subject: [PATCH 10/10] Revert "configure: Print a more helpful error if
autoconf-archive is not installed" autoconf-archive is not installed"
This reverts commit ac042f3f58d33ce9cd5ff61750f06da1a1d7b0eb. This reverts commit ac042f3f58d33ce9cd5ff61750f06da1a1d7b0eb.