aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSai Hari Chandana Kalluri <chandana.kalluri@xilinx.com>2019-12-10 17:42:29 -0800
committerSai Hari Chandana Kalluri <chandana.kalluri@xilinx.com>2020-01-08 10:19:36 -0800
commitb82343ac5f013926839627cee9dae7106c008ae9 (patch)
treec99eb02c9a8d90b32d28b31e7ea1c6578dcc6656
parentc74be368d2a39418c267b9c5a7bdf6453ac4e08b (diff)
downloadmeta-xilinx-zeus.zip
meta-xilinx-zeus.tar.gz
meta-xilinx-zeus.tar.bz2
libmali-xlnx: Provide single shlib provider for libMali.so.9zeus
libmali-xlnx provides multiple shared libraries to support the update alternatives mechanism. For this, shared libraries with different backends are installed to the target and softlinked to libmali-xlnx.so. When do_package task runs, 1. It creates a pkgdata/libmali-xlnx file that generates a list of packages. In this case: PACKAGES: libmali-xlnx-src libmali-xlnx-dbg libmali-xlnx-staticdev libmali-xlnx-dev libmali-xlnx-doc libmali-xlnx-locale libmali-xlnx libmali-xlnx-x11 libmali-xlnx-fbdev libmali-xlnx-wayland libmali-xlnx-headless 2. It also tries to identify what are the shlibs files and creates a pkgdata/shlibs2/libmali-xlnx.list file. - The .list file contains a list of all shared object files being provided by a package. - This list is created by looking at list of packages from above one by one. - It creates a list of available .so files for target os and then uses objdump -p to get more info(NEEDED and SONAME) about the object files - Writes to .list file with list of .so files and the paths installed. - This is generated by only looking at the .so files in each package and not the defaiult backend being used in the recipe. In Zeus, with this commit f7d46843e93f1acb4872bd5bcc12ed734de5168b on package.bbclass, multiple shlib_providers for the same file error. Hence when packages like cairo, qtbase build they error out with the following error: Multiple shlib providers for libMali.so.9: libmali-xlnx, libmali-xlnx,libmali-xlnx, libmali-xlnx Why this error generates for packages using libmali-xlnx: When cairo/qtbase packages run do_package task, bitbake generates a shlibs_provider_map list containing information (soname,ldir,ver) for the given package using shlibs2/*.list files copied to pkgdata-sysroots. libmali-xlnx.list contains list of all .so files installed inspite default MALI_BACKEND_DEFAULT provider. Since the shlibs_provider_map contains more than one provider, bitbake generates the above error and fails. To fix the above issue, append to the do_package task to update the libmali-xlnx.list to specify only the MALI_BACKEND_DEFAULT provider shlib and discard the remaining unused shlibs. Signed-off-by: Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com> Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
-rw-r--r--meta-xilinx-bsp/recipes-graphics/libgles/libmali-xlnx.bb14
1 files changed, 14 insertions, 0 deletions
diff --git a/meta-xilinx-bsp/recipes-graphics/libgles/libmali-xlnx.bb b/meta-xilinx-bsp/recipes-graphics/libgles/libmali-xlnx.bb
index 37d14e0..e960165 100644
--- a/meta-xilinx-bsp/recipes-graphics/libgles/libmali-xlnx.bb
+++ b/meta-xilinx-bsp/recipes-graphics/libgles/libmali-xlnx.bb
@@ -183,3 +183,17 @@ RCONFLICTS_${PN} = "libegl libgles1 libglesv1-cm1 libgles2 libglesv2-2 libgbm"
# explicitly depends upon them.
EXCLUDE_FROM_WORLD = "1"
FILES_${PN} += "${libdir}/*"
+
+do_package_append() {
+
+ shlibswork_dir = d.getVar('SHLIBSWORKDIR')
+ pkg_filename = d.getVar('PN') + ".list"
+ shlibs_file = os.path.join(shlibswork_dir, pkg_filename)
+ lines = ""
+ with open(shlibs_file, "r") as f:
+ lines = f.readlines()
+ with open(shlibs_file, "w") as f:
+ for line in lines:
+ if d.getVar('MALI_BACKEND_DEFAULT') in line.strip("\n"):
+ f.write(line)
+}