作者:付汉杰,hankf@xilinx.com,文章转载自:赛灵思中文社区论坛
PetaLinux以前的版本中,在project-spec/meta-user/conf/petalinuxbsp.conf里添加MALI_BACKEND_DEFAULT = "wayland"”,在编译时选择图形backend。
在PetaLinux 2019.1里,默认集成多个图形backend。运行时,可以根据需要选择图形后端。这样更方便调试。
如果以前添加了MALI_BACKEND_DEFAULT语句,需要删除。
编译后,在单板的/usr/lib目录下,能找到下列文件。
root@zcu106-2019_1:/usr/lib# find -name "libMali*" ./libMali.so.8.0 ./wayland/libMali.so.8.0 ./fbdev/libMali.so.8.0 ./libMali.so.8 ./headless/libMali.so.8.0 ./x11/libMali.so.8.0
运行FBDEV的Pixmap例子:
root@xilinx-zcu106-2019_2:/run/media/mmcblk0p1bin# update-alternatives --install /usr/lib/libMali.so.8.0 libmali /usr/lib/fbdev/libMali.so.8.0 100 update-alternatives: renaming libmali link from /usr/lib/libMali.so.8.0 to /usr/lib/libMali.so.8.0 Warn: update-alternatives: libmali has multiple providers with the same priority, please check /usr/lib/opkg/alternatives/libmali for details update-alternatives: Linking /usr/lib/libMali.so.8.0 to /usr/lib/fbdev/libMali.so.8.0 root@xilinx-zcu106-2019_2:/run/media/mmcblk0p1bin# ls /usr/lib/libMali.so* -l lrwxrwxrwx 1 root root 14 Dec 31 03:35 /usr/lib/libMali.so.8 -> libMali.so.8.0 lrwxrwxrwx 1 root root 29 Jan 2 03:33 /usr/lib/libMali.so.8.0 -> /usr/lib/fbdev/libMali.so.8.0 root@xilinx-zcu106-2019_1:/run/media/mmcblk0p1bin# ./DMA_PixmapSampleOffscreen Warning gator_func(src/streamline_annotate.c:495): Not connected to gatord, the application will run normally but Streamline will not collect annotations. To collect annotations, please verify you are running gatord 5.24 or later and that SELinux is disabled. FPS: = 62.344017 FPS: = 118.418533 FPS: = 118.407051 FPS: = 118.440897 ^C