OpenGL ES2. Cross-compile for Beaglebone Black using OS Debian when built QT5.7.0
-
@small_bird you can give me link about that? i was try Mesa and Mali but it's not success ( or i wrong some step) i really need a tutorial! thanks
-
@Dang-Vu Of course, http://www.360doc.com/content/15/0108/18/5268588_439214065.shtml. It is the web site in China. Can you see that?
-
@small_bird Hi sir! i built Mesa for arm with configure
./configure --prefix /usr/local/Mesa --target=arm-linux --host=arm-linux --enable-gles2 --enable-gles1 --enable-glx --enable-egl --disable-dri3 --enable-shared-glppi --with-egl-platforms=x11 --with-dri-driver=swrast CROSS_COMPILE=arm-linux-gnueabihf-
and install successed!
in linux-beagleboard-g++ qmake.conf i writen# # qmake configuration for the BeagleBoard and BeagleBoard xM boards # http://beagleboard.org/ MAKEFILE_GENERATOR = UNIX CONFIG += incremental QMAKE_INCREMENTAL_STYLE = sublib include(../../common/linux.conf) include(../../common/gcc-base-unix.conf) include(../../common/g++-unix.conf) load(device_config) QT_QPA_DEFAULT_PLATFORM = eglfs # modifications to g++.conf QMAKE_CC = $${CROSS_COMPILE}gcc QMAKE_CXX = $${CROSS_COMPILE}g++ QMAKE_LINK = $${QMAKE_CXX} QMAKE_LINK_SHLIB = $${QMAKE_CXX} # modifications to linux.conf QMAKE_AR = $${CROSS_COMPILE}ar cqs QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy QMAKE_NM = $${CROSS_COMPILE}nm -P QMAKE_STRIP = $${CROSS_COMPILE}strip COMPILER_FLAGS = -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mthumb #modifications to gcc-base.conf QMAKE_CFLAGS += $${COMPILER_FLAGS} QMAKE_CXXFLAGS += $${COMPILER_FLAGS} QMAKE_CXXFLAGS_RELEASE += -O3 QMAKE_LIBS += -lrt -lpthread -ldl # Extra stuff (OpenGL, DirectFB, ...) QMAKE_INCDIR_EGL =/usr/local/Mesa/include/EGL QMAKE_LIBDIR_EGL =/usr/local/Mesa/lib QMAKE_INCDIR_OPENGL_ES2 = $${QMAKE_INCDIR_EGL} QMAKE_LIBDIR_OPENGL_ES2 = $${QMAKE_LIBDIR_EGL} QMAKE_INCDIR_OPENVG = $${QMAKE_INCDIR_EGL} QMAKE_LIBDIR_OPENVG = $${QMAKE_LIBDIR_EGL} QMAKE_LIBS_EGL = -lEGL -lIMGegl -lsrv_um QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 $${QMAKE_LIBS_EGL} QMAKE_LIBS_OPENVG = -lOpenVG $${QMAKE_LIBS_EGL} DISTRO_OPTS += hard-float # No need for any special EGL device integration. # Prioritize the default, compiled-in integration over any plugins. EGLFS_DEVICE_INTEGRATION = none include(../common/linux_arm_device_post.conf) load(qt_config)
but i still have an error
/usr/local/Mesa/lib/libGLESv2.so: file not recognized: File format not recognized collect2: error: ld returned 1 exit status Makefile:90: recipe for target 'opengles2' failed make: *** [opengles2] Error 1 OpenGL ES 2.0 disabled. The OpenGL ES 2.0 functionality test failed!
what can i do to built QT for beaglebone! i really- really need a tutorial! thanks! hix...
-
@jsulm Dir Sir! i make and install Mesa in here! i built Mesa with linaro toolchains(arm- linux-gnueabihf) !
i thinkQMAKE_LIBDIR_EGL =/usr/local/Mesa/lib
i right!? i can see libGLESv2.so in that(/usr/local/Mesa/lib)! but it not work when i configure QT with -opengl es2. you nees a that file? i cant send it for you!
-
@Dang-Vu Can you please execute this command in a shell:
file /usr/local/Mesa/lib/libGLESv2.so
and post its output here?
This message:
/usr/local/Mesa/lib/libGLESv2.so: file not recognized: File format not recognized
means that the library has a wrong format. That's why I want to see the output of that command: it will tell for which CPU architecture it was built.
-
@jsulm sorry Sir! my mistake, file /usr/local/Mesa/lib/libGLESv2.so.2.0.0 it 's tell me i only use for x86-linux but not for arm! well, while i configure Mesa
./configure --prefix /usr/local/Mesa --target=arm-linux --host=arm-linux --enable-gles2 --enable-gles1 --enable-glx --enable-egl --disable-dri3 --enable-shared-glppi --with-egl-platforms=x11 --with-dri-driver=swrast CROSS_COMPILE=arm-linux-gnueabihf-
what is step i wrong sir? i thinks i successed to built Mesa3d for Arm but it's not true! you can fix it's, Sir?
-
@jsulm i download Mesa3d from https://mesa.freedesktop.org/archive/13.0.1/mesa-13.0.1.tar.gz , in linux host( ubuntu16.04) i install linaro toolchains in terminal
$ sudo apt-get install gcc-arm-linux-gnueabi $ sudo apt-get install g++-arm-linux-gnueabi $ sudo apt-get install gcc-arm-linux-gnueabihf $ sudo apt-get install g++-arm-linux-gnueabihf
and i configure Mesa below:
./configure --prefix /usr/local/Mesa --target=arm-linux --host=arm-linux --enable-gles2 --enable-gles1 --enable-glx --enable-egl --disable-dri3 --enable-shared-glppi --with-egl-platforms=x11 --with-dri-driver=swrast CROSS_COMPILE=arm-linux-gnueabihf-
i make and install succsed in /usr/local/Mesa