[oe-commits] [openembedded-core] 10/64: xf86-video-vesa: Refuse to run on UEFI machines

git at git.openembedded.org git at git.openembedded.org
Sun Apr 7 22:34:52 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit b7f1829d6fc45894199c44f44e263b648939b827
Author: Ovidiu Panait <ovidiu.panait at windriver.com>
AuthorDate: Fri Apr 5 14:19:42 2019 +0300

    xf86-video-vesa: Refuse to run on UEFI machines
    
    Fix the following Xorg start failure on UEFI machines when using xf86-video-vesa
    driver (e.g. in qemu, when anaconda tries to start X):
    Xorg -br -logfile /tmp/X.log :1 vt7 -s 1440 -ac -nolisten tcp -dpi 96 -noreset
    ...
    (EE) Cannot run in framebuffer mode. Please specify busIDs for all framebuffer devices
    ...
    
    Upstream patch:
    https://cgit.freedesktop.org/xorg/driver/xf86-video-vesa/commit/?id=2645e0aa9c17c2c966a0533e52ad00510311483e
    
    Signed-off-by: Ovidiu Panait <ovidiu.panait at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 .../0001-Refuse-to-run-on-UEFI-machines.patch      | 52 ++++++++++++++++++++++
 .../xorg-driver/xf86-video-vesa_2.4.0.bb           |  4 ++
 2 files changed, 56 insertions(+)

diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-vesa/0001-Refuse-to-run-on-UEFI-machines.patch b/meta/recipes-graphics/xorg-driver/xf86-video-vesa/0001-Refuse-to-run-on-UEFI-machines.patch
new file mode 100644
index 0000000..9e01770
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-vesa/0001-Refuse-to-run-on-UEFI-machines.patch
@@ -0,0 +1,52 @@
+From 2645e0aa9c17c2c966a0533e52ad00510311483e Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax at redhat.com>
+Date: Wed, 29 Aug 2018 11:04:23 -0400
+Subject: [PATCH] Refuse to run on UEFI machines
+
+No possible good can come of this.
+
+v2: Check for .../efi-framebuffer.0 ("is there an EFI framebuffer")
+instead of /sys/firmware/efi ("is this an EFI machine"). Suggested by
+Peter Jones.
+
+Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/driver/xf86-video-vesa]
+
+Reviewed-by: Peter Jones <pjones at redhat.com>
+Signed-off-by: Adam Jackson <ajax at redhat.com>
+Signed-off-by: Ovidiu Panait <ovidiu.panait at windriver.com>
+---
+ src/vesa.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/src/vesa.c b/src/vesa.c
+index 9b65b9b..af750e2 100644
+--- a/src/vesa.c
++++ b/src/vesa.c
+@@ -43,7 +43,7 @@
+ #endif
+ 
+ #include <string.h>
+-
++#include <unistd.h>
+ #include "vesa.h"
+ 
+ /* All drivers initialising the SW cursor need this */
+@@ -450,7 +450,14 @@ VESAPciProbe(DriverPtr drv, int entity_num, struct pci_device *dev,
+ 	     intptr_t match_data)
+ {
+     ScrnInfoPtr pScrn;
+-    
++
++#ifdef __linux__
++    if (access("/sys/devices/platform/efi-framebuffer.0", F_OK) == 0) {
++        ErrorF("vesa: Refusing to run on UEFI\n");
++        return FALSE;
++    }
++#endif
++
+     pScrn = xf86ConfigPciEntity(NULL, 0, entity_num, NULL, 
+ 				NULL, NULL, NULL, NULL, NULL);
+     if (pScrn != NULL) {
+-- 
+2.20.1
+
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-vesa_2.4.0.bb b/meta/recipes-graphics/xorg-driver/xf86-video-vesa_2.4.0.bb
index 9a11014..f6aa544 100644
--- a/meta/recipes-graphics/xorg-driver/xf86-video-vesa_2.4.0.bb
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-vesa_2.4.0.bb
@@ -17,3 +17,7 @@ RRECOMMENDS_${PN} += "xserver-xorg-module-libint10"
 
 SRC_URI[md5sum] = "8134201beaf6f77150c7809c3cc802e6"
 SRC_URI[sha256sum] = "bf443c94d7bf6cd4e248f8a3147f4647be04dc4c80250d9405006263bbdee38c"
+
+SRC_URI += " \
+    file://0001-Refuse-to-run-on-UEFI-machines.patch \
+    "

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list