:: commit 72a6d921c836f0a64934be636638a0f0f2fc191f

mintsuki <mintsuki@protonmail.com> — 2023-04-13 17:21

parents: cbc7e5a860

multiboot1: Support TEXTMODE config as with Linux/mb2 protocols

diff --git a/common/protos/multiboot1.c b/common/protos/multiboot1.c
index 808cd657..d370c084 100644
--- a/common/protos/multiboot1.c
+++ b/common/protos/multiboot1.c
@@ -307,6 +307,16 @@ noreturn void multiboot1_load(char *config, char *cmdline) {
     size_t req_width = 0;
     size_t req_height = 0;
     size_t req_bpp = 0;
+#if defined (BIOS)
+    {
+        char *textmode_str = config_get_value(config, 0, "TEXTMODE");
+        bool textmode = textmode_str != NULL && strcmp(textmode_str, "yes") == 0;
+        if (textmode) {
+            goto textmode;
+        }
+    }
+#endif
+
 
     if (header.flags & (1 << 2)) {
         req_width = header.fb_width;
tab: 248 wrap: offon