AnsweredAssumed Answered

glxgears and tiger run exceptions under Ubuntu

Question asked by li yigang on Jul 2, 2019
Latest reply on Jul 11, 2019 by li yigang

hi;

I refer to the following documents to add GPU functionality to Ubuntu

https://community.nxp.com/docs/DOC-330147

HW GPU Acceleration for X11 

 

the steps are as follows:

wget http://www.nxp.com/lgfiles/NMG/MAD/YOCTO//imx-gpu-viv-5.0.11.p8.4-hfp.bin
./imx-gpu-viv-5.0.11.p8.6-hfp.bin --auto-accept --force
cp g2d/usr/include/* /usr/include/
cp -d g2d/usr/lib/* /usr/lib/
cp -Pr gpu-core/usr/* /usr
cp -r gpu-demos/opt /
cp -axr gpu-tools/gmem-info/usr/bin/* /usr/bin/

chmod 644 /usr/lib/dri/vivante_dri.so

cp -r apitrace/x11/usr/lib/* /usr/lib

cp -r apitrace/x11/usr/bin/* /usr/bin

install -m 0644 gpu-core/usr/lib/pkgconfig/egl_x11.pc /usr/lib/pkgconfig/egl.pc

install -m 0644 gpu-core/usr/lib/pkgconfig/glesv1_cm_x11.pc /usr/lib/pkgconfig/glesv1_cm.pc

install -m 0644 gpu-core/usr/lib/pkgconfig/glesv2_x11.pc /usr/lib/pkgconfig/glesv2.pc

install -m 0644 gpu-core/usr/lib/pkgconfig/vg_x11.pc /usr/lib/pkgconfig/vg.pc

cd /usr/lib/

mv libGL.so.1.2 libGL.so.1.2.0

ln -sf libGL.so.1.2.0 /usr/lib/libGL.so.1.2

ln -sf libGL.so.1.2.0 /usr/lib/libGL.so.1

ln -sf libGL.so.1.2.0 /usr/lib/libGL.so

ln -sf libEGL-x11.so /usr/lib/libEGL.so
ln -sf libEGL-x11.so /usr/lib/libEGL.so.1
ln -sf libEGL-x11.so /usr/lib/libEGL.so.1.0
ln -sf libGAL-x11.so /usr/lib/libGAL.so
ln -sf libGLESv2-x11.so /usr/lib/libGLESv2.so
ln -sf libGLESv2-x11.so /usr/lib/libGLESv2.so.2
ln -sf libGLESv2-x11.so /usr/lib/libGLESv2.so.2.0.0
ln -sf libVIVANTE-x11.so /usr/lib/libVIVANTE.so
rm *-fb.so *-wl.so

 

rm /etc/ld.so.conf.d/arm-linux-gnueabihf_*.conf

 

wget http://www.nxp.com/lgfiles/NMG/MAD/YOCTO//xserver-xorg-video-imx-viv-5.0.11.p8.4.tar.gz

tar -xvzpf xserver-xorg-video-imx-viv-5.0.11.p8.4.tar.gz
cd xserver-xorg-video-imx-viv-5.0.11.p8.4

cd EXA/src/
sed -i 's/COMMITNR/#COMMITNR/g' makefile.tc
sed -i 's/DIRTY/#DIRTY/g' makefile.tc
sed -i 's/LOCAL_CFLAGS/#LOCAL_CFLAGS/g' makefile.tc
#sed -i 's/drm/libdrm/g' makefile.linux
cd ../../

cd FslExt/src/
sed -i 's/COMMITNR/#COMMITNR/g' makefile.tc
sed -i 's/DIRTY/#DIRTY/g' makefile.tc
sed -i 's/LOCAL_CFLAGS/#LOCAL_CFLAGS/g' makefile.tc
cd ../../

cd util/autohdmi/
sed -i 's/COMMITNR/#COMMITNR/g' makefile.tc
sed -i 's/DIRTY/#DIRTY/g' makefile.tc
sed -i 's/LOCAL_CFLAGS/#LOCAL_CFLAGS/g' makefile.tc
cd ../../

cd util/pandisplay/
sed -i 's/COMMITNR/#COMMITNR/g' makefile.tc
sed -i 's/DIRTY/#DIRTY/g' makefile.tc
sed -i 's/LOCAL_CFLAGS/#LOCAL_CFLAGS/g' makefile.tc
cd ../../

export XSERVER_GREATER_THAN_13=1
export BUILD_HARD_VFP=1
export BUSID_HAS_NUMBER=1
./fastbuild.sh

 

./fastbuild.sh  install

 

Annex xf86drm.h is in the /usr/include directory, 10-imx.rules is in the /etc/udev/rules.d directory , xorg.conf is in the /etc/X11/ directory.

 

As a result, there is no problem with X11 GPU hardware acceleration,but when running glxgears, the desktop is frozen, and when running / opt / viv_sample / tiger / tiger, the program is abnormal.Attachment. Log file is the relevant log。

Outcomes