summaryrefslogtreecommitdiffstats
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.tar.gz
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 37d14e03..e960165d 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"
183# explicitly depends upon them. 183# explicitly depends upon them.
184EXCLUDE_FROM_WORLD = "1" 184EXCLUDE_FROM_WORLD = "1"
185FILES_${PN} += "${libdir}/*" 185FILES_${PN} += "${libdir}/*"
186
187do_package_append() {
188
189 shlibswork_dir = d.getVar('SHLIBSWORKDIR')
190 pkg_filename = d.getVar('PN') + ".list"
191 shlibs_file = os.path.join(shlibswork_dir, pkg_filename)
192 lines = ""
193 with open(shlibs_file, "r") as f:
194 lines = f.readlines()
195 with open(shlibs_file, "w") as f:
196 for line in lines:
197 if d.getVar('MALI_BACKEND_DEFAULT') in line.strip("\n"):
198 f.write(line)
199}