Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/7] runqemu: direct mesa to use its own drivers, rather than ones provided by host distro
@ 2023-03-12 14:50 Alexander Kanavin
  2023-03-12 14:50 ` [PATCH 2/7] bitbake.conf: do not set native opengl distro feature from target Alexander Kanavin
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Alexander Kanavin @ 2023-03-12 14:50 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

With mesa 23.0, it is not longer possible to use the host drivers, as
mesa upstream has added strict checks for matching builds between
drivers and libraries that load them.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 scripts/runqemu | 25 +------------------------
 1 file changed, 1 insertion(+), 24 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 58b0c191e1..8e915f3d4c 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -447,30 +447,7 @@ class BaseConfig(object):
             self.set("MACHINE", arg)
 
     def set_dri_path(self):
-        # As runqemu can be run within bitbake (when using testimage, for example),
-        # we need to ensure that we run host pkg-config, and that it does not
-        # get mis-directed to native build paths set by bitbake.
-        env = os.environ.copy()
-        try:
-            del env['PKG_CONFIG_PATH']
-            del env['PKG_CONFIG_DIR']
-            del env['PKG_CONFIG_LIBDIR']
-            del env['PKG_CONFIG_SYSROOT_DIR']
-        except KeyError:
-            pass
-        try:
-            dripath = subprocess.check_output("PATH=/bin:/usr/bin:$PATH pkg-config --variable=dridriverdir dri", shell=True, env=env)
-        except subprocess.CalledProcessError as e:
-            raise RunQemuError("Could not determine the path to dri drivers on the host via pkg-config.\nPlease install Mesa development files (particularly, dri.pc) on the host machine.")
-        self.qemu_environ['LIBGL_DRIVERS_PATH'] = dripath.decode('utf-8').strip()
-
-        # This preloads uninative libc pieces and therefore ensures that RPATH/RUNPATH
-        # in host mesa drivers doesn't trick uninative into loading host libc.
-        preload_items = ['libdl.so.2', 'librt.so.1', 'libpthread.so.0']
-        uninative_path = os.path.dirname(self.get("UNINATIVE_LOADER"))
-        if os.path.exists(uninative_path):
-            preload_paths = [os.path.join(uninative_path, i) for i in preload_items]
-            self.qemu_environ['LD_PRELOAD'] = " ".join(preload_paths)
+        self.qemu_environ['LIBGL_DRIVERS_PATH'] = os.path.join(self.bindir_native, '../lib/dri')
 
     def check_args(self):
         for debug in ("-d", "--debug"):
-- 
2.30.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-03-16  9:42 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-12 14:50 [PATCH 1/7] runqemu: direct mesa to use its own drivers, rather than ones provided by host distro Alexander Kanavin
2023-03-12 14:50 ` [PATCH 2/7] bitbake.conf: do not set native opengl distro feature from target Alexander Kanavin
2023-03-13 22:45   ` [OE-core] " Khem Raj
2023-03-13 23:10     ` Khem Raj
2023-03-14  8:37       ` Alexander Kanavin
     [not found]       ` <174C3C4C8B75F870.18998@lists.openembedded.org>
2023-03-14  9:30         ` Alexander Kanavin
2023-03-15 13:38           ` Alexandre Belloni
2023-03-16  9:42             ` Alexander Kanavin
2023-03-12 14:50 ` [PATCH 3/7] mesa: allow mesa-native/nativesdk only subject to opengl/vulkan DISTRO_FEATURE Alexander Kanavin
2023-03-12 14:50 ` [PATCH 4/7] mesa: enable a rich set of drivers for native builds Alexander Kanavin
2023-03-12 14:50 ` [PATCH 5/7] llvm: allow building libllvm in native builds, subject to PACKAGECONFIG Alexander Kanavin
2023-03-12 14:50 ` [PATCH 6/7] mesa: do not strip rpaths from dri drivers Alexander Kanavin
2023-03-12 14:50 ` [PATCH 7/7] mesa: update 22.3.5 -> 23.0.0 Alexander Kanavin
2023-03-13  6:15   ` [OE-core] " Böszörményi Zoltán
2023-03-13  7:52     ` Alexander Kanavin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox