Forcibly set console output to the framebuffer on the Lenovo x13s.
authorpatrick <patrick@openbsd.org>
Thu, 8 Dec 2022 00:29:06 +0000 (00:29 +0000)
committerpatrick <patrick@openbsd.org>
Thu, 8 Dec 2022 00:29:06 +0000 (00:29 +0000)
We should actually do something like checking that both stdout-path
and serial0 don't exist to realize we have to switch, but this hack
gets us going for now.

ok kettenis@

sys/arch/arm64/stand/efiboot/conf.c
sys/arch/arm64/stand/efiboot/efiboot.c

index ae2813e..627271a 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: conf.c,v 1.42 2022/12/07 23:04:26 patrick Exp $       */
+/*     $OpenBSD: conf.c,v 1.43 2022/12/08 00:29:06 patrick Exp $       */
 
 /*
  * Copyright (c) 1996 Michael Shalayeff
@@ -46,7 +46,7 @@
 #include "efipxe.h"
 #include "softraid_arm64.h"
 
-const char version[] = "1.14";
+const char version[] = "1.15";
 int    debug = 0;
 
 struct fs_ops file_system[] = {
index 970b8fa..7629136 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: efiboot.c,v 1.45 2022/12/07 23:04:26 patrick Exp $    */
+/*     $OpenBSD: efiboot.c,v 1.46 2022/12/08 00:29:06 patrick Exp $    */
 
 /*
  * Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net>
@@ -1104,9 +1104,12 @@ efi_fdt(void)
                return fdt_sys;
 
        if (strcmp(hw_vendor, "LENOVO") == 0 &&
-           strncmp(hw_prod, "21BX", 4) == 0)
+           strncmp(hw_prod, "21BX", 4) == 0) {
                fdt_load_override(FW_PATH
                    "qcom/sc8280xp-lenovo-thinkpad-x13s.dtb");
+               /* TODO: find a better mechanism */
+               cnset(ttydev("fb0"));
+       }
 
        return fdt_override ? fdt_override : fdt_sys;
 }