• Content Count

  • Joined

  • Last visited

Reputation Activity

  1. Like
    windumasta reacted to dimag0g in OpenGL on Mali GPU (BananaPi, OrangePi PC, etc)   
    I wish to share my research on getting OpenGL to work on Mali GPU. I realize Armbian focuses on server images, but I suppose many people would be interested nevertheless. I have a Banana Pi Pro and an Orange Pi PC, which both have a compatible GPU. Perhaps it will work on other boards as well.
    Here are the commands I used to get OpenGL to work.
    1. Install:
    # install GLX Gears, mesa GL and GLU libraries apt-get -y install mesa-utils # install development tools apt-get -y install build-essential automake pkg-config libtool ca-certificates git cmake subversion # install required libraries apt-get install libx11-dev libxext-dev xutils-dev libdrm-dev x11proto-xf86dri-dev libxfixes-dev # get source code git clone git clone git clone git clone git clone # install mali driver cd sunxi-mali                                                                    git submodule init                                                               git submodule update                                                             git pull                                                                         wget -O ./include/GLES2/gl2.h             wget -O ./include/GLES2/gl2ext.h    make config ABI=armhf VERSION=r3p0                                               mkdir /usr/lib/mali                                                              echo "/usr/lib/mali" > /etc/                             make -C include install                                                          make -C lib/mali prefix=/usr libdir='$(prefix)/lib/mali/' install            cd .. 2. Build
    # Step 1: build and install helper libraries cd libdri2 autoreconf -i ./configure --prefix=/usr make make install cd .. cd libump autoreconf -i ./configure --prefix=/usr make make install cd .. # Step 2: build video driver cd xf86-video-fbturbo autoreconf -i ./configure --prefix=/usr make make install cd .. # Step 3: build GL wrapper cd glshim cmake . make cp lib/ /usr/lib/ # replace the software GL library with the wrapper cd .. 3. Configure your system
    - configure your kernel to allocate memory for the GPU
    - make sure mali and mali_drm kernel modules are loaded
    - give your user permissions to access /dev/ump and /dev/mali
    - configure Xorg to use fbturbo driver
    4. Test:
    # run a basic test glxgears # install and run a GL benchmark apt-get -y install globs /usr/lib/globs/benchmarks/GL_pointz/gl_pointz # try to run a real game apt-get -y install billard-gl billard-gl This all worked out for me rather nicely. The only issue I have encountered is a segfault that many GL programs get when they shut down. I'm currently debugging this issue, but it would be helpful to know others experience it as well, and perhaps get some advice from people experienced in GLX or SDL.
    Edit: I know glxgears is not a real benchmark, but let me give you some numbers to make it clear what I'm talking about. Results are from Orange Pi PC clocked at 1296000 Hz (and are CPU-bound):
    user@bananapi:~$ glxgears LIBGL: Initialising glshim libGL: built on Jun 12 2016 06:12:01 LIBGL: Current folder is:/home/user libGL:loaded: libGL:loaded: 2074 frames in 5.0 seconds = 414.688 FPS 2071 frames in 5.0 seconds = 414.085 FPS 2070 frames in 5.0 seconds = 413.915 FPS ^C
  2. Like
    windumasta reacted to guidol in Armbian for Amlogic S805 and S802/S812   
    Yes VCC is 5 or 3.3V but you dont need VCC because the USB-Dongle and the mainboard/pc has its own power
    You can connect the cable as written in the Picture (RX<->TX, TX<->RX, GND<->GND)
    On some other USB-Dongles it could be to connect RX<->RX and TX<->TX - but mostly not