Jump to content

dimag0g

Members
  • Posts

    18
  • Joined

  • Last visited

Reputation Activity

  1. Like
    dimag0g got a reaction from windumasta in OpenGL on Mali GPU (BananaPi, OrangePi PC, etc)   
    Hello,
     
    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 https://github.com/robclark/libdri2 git clone https://github.com/linux-sunxi/libump git clone https://github.com/linux-sunxi/sunxi-mali git clone https://github.com/ssvb/xf86-video-fbturbo git clone https://github.com/ptitSeb/glshim # install mali driver cd sunxi-mali                                                                    git submodule init                                                               git submodule update                                                             git pull                                                                         wget http://pastebin.com/raw.php?i=hHKVQfrh -O ./include/GLES2/gl2.h             wget http://pastebin.com/raw.php?i=ShQXc6jy -O ./include/GLES2/gl2ext.h    make config ABI=armhf VERSION=r3p0                                               mkdir /usr/lib/mali                                                              echo "/usr/lib/mali" > /etc/ld.so.conf.d/1-mali.conf                             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/libGL.so.1 /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: libGLESv1_CM.so libGL:loaded: libEGL.so 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
    dimag0g got a reaction from gregvp in OpenGL on Mali GPU (BananaPi, OrangePi PC, etc)   
    Hello,
     
    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 https://github.com/robclark/libdri2 git clone https://github.com/linux-sunxi/libump git clone https://github.com/linux-sunxi/sunxi-mali git clone https://github.com/ssvb/xf86-video-fbturbo git clone https://github.com/ptitSeb/glshim # install mali driver cd sunxi-mali                                                                    git submodule init                                                               git submodule update                                                             git pull                                                                         wget http://pastebin.com/raw.php?i=hHKVQfrh -O ./include/GLES2/gl2.h             wget http://pastebin.com/raw.php?i=ShQXc6jy -O ./include/GLES2/gl2ext.h    make config ABI=armhf VERSION=r3p0                                               mkdir /usr/lib/mali                                                              echo "/usr/lib/mali" > /etc/ld.so.conf.d/1-mali.conf                             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/libGL.so.1 /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: libGLESv1_CM.so libGL:loaded: libEGL.so 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
  3. Like
    dimag0g got a reaction from Naguissa in OpenGL on Mali GPU (BananaPi, OrangePi PC, etc)   
    Hello,
     
    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 https://github.com/robclark/libdri2 git clone https://github.com/linux-sunxi/libump git clone https://github.com/linux-sunxi/sunxi-mali git clone https://github.com/ssvb/xf86-video-fbturbo git clone https://github.com/ptitSeb/glshim # install mali driver cd sunxi-mali                                                                    git submodule init                                                               git submodule update                                                             git pull                                                                         wget http://pastebin.com/raw.php?i=hHKVQfrh -O ./include/GLES2/gl2.h             wget http://pastebin.com/raw.php?i=ShQXc6jy -O ./include/GLES2/gl2ext.h    make config ABI=armhf VERSION=r3p0                                               mkdir /usr/lib/mali                                                              echo "/usr/lib/mali" > /etc/ld.so.conf.d/1-mali.conf                             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/libGL.so.1 /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: libGLESv1_CM.so libGL:loaded: libEGL.so 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
  4. Like
    dimag0g reacted to Igor in Problems with hostapd   
    Cubietruck has one exception and only with kernel 3.4.x - wifi module must be loaded (/etc/modules) this way to enable AP mode:
    bcmdhd op_mode=2 I suggest you to use this predefined configuration - which you probably already set.
    /etc/network/interfaces.hostapd   You need to have some DHCP server running on the network - which usually is.
  5. Like
    dimag0g reacted to Igor in Orange Pi Zero wireless AP   
    Latest hostapd, normal and patched for Realtek are built from sources and available within Armbian package base (apt.armbian.com) by default since early days of the project:
    apt-get install hostapd or
    apt-get install hostapd-realtek
  6. Like
    dimag0g reacted to zador.blood.stained in Boot multiple boards from a single SD card   
    https://github.com/igorpecovnik/lib/blob/master/distributions.sh#L22-L29
    https://github.com/igorpecovnik/lib/blob/master/config/boards/orangepizero.conf#L5
  7. Like
    dimag0g reacted to zador.blood.stained in The Ultimate Orange Pi USB Booter   
    https://linux-sunxi.org/Bootable_SPI_flash
     
    I don't think this needs any schematics, it's just an SPI flash with a bypass capacitor and a Write Protect jumper (optional) wired to the 2x4 2.54mm header. Wiki gives enough details on hardware implementation, and as for software - mainline u-boot can be loaded from the SPI flash, and if it fails to boot the system from SD it will try USB next (though if you have more than 1 USB storage devices attached it will need extra modifications). Armbian boot script in recent images can handle USB boot scenario well, so it works out of the box.
  8. Like
    dimag0g reacted to copytco in OpenGL on Mali GPU (BananaPi, OrangePi PC, etc)   
    I have found a potential solution here: http://linux-sunxi.org/Xorg#fbturbo_driver- it says that autoreconf is breaking configure and it should be copied from git after running autoreconf. I will try that and check if it solves the issue.
  9. Like
    dimag0g reacted to svkatielee in OpenGL on Mali GPU (BananaPi, OrangePi PC, etc)   
    I am a sailor and use OpenCPN for the navigation chart plotter. The charts load and zoom much faster with hardware openGL/ or ES.
    It has a way to display rendering technique and frames/sec and is barely useful without acceleration. It is very nice with it, even on the Orange Pi One. But I will use the Opi PC Plus for my final installation.
     
    I compiled opencpn(4.2 and 4.4) on the default Jessie desktop of both 5.05 and 5.10. I will be recompiling on 5.17 soon.
     
    So it is not only games and display managers that use openGL and hardware acceleration.
    Thank you all for armbian and the rest.
  10. Like
    dimag0g got a reaction from brunorro in OpenGL on Mali GPU (BananaPi, OrangePi PC, etc)   
    Hello,
     
    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 https://github.com/robclark/libdri2 git clone https://github.com/linux-sunxi/libump git clone https://github.com/linux-sunxi/sunxi-mali git clone https://github.com/ssvb/xf86-video-fbturbo git clone https://github.com/ptitSeb/glshim # install mali driver cd sunxi-mali                                                                    git submodule init                                                               git submodule update                                                             git pull                                                                         wget http://pastebin.com/raw.php?i=hHKVQfrh -O ./include/GLES2/gl2.h             wget http://pastebin.com/raw.php?i=ShQXc6jy -O ./include/GLES2/gl2ext.h    make config ABI=armhf VERSION=r3p0                                               mkdir /usr/lib/mali                                                              echo "/usr/lib/mali" > /etc/ld.so.conf.d/1-mali.conf                             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/libGL.so.1 /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: libGLESv1_CM.so libGL:loaded: libEGL.so 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
  11. Like
    dimag0g got a reaction from lanefu in [423] - glshim (GLES to OpenGL wrapper) packaging   
    Discussion thread for github issue 423 - glshim packaging. Related discussion is here. Glshim development happens here.
     
    Current status: build script is mostly working, I'm fixing minor issues before making a github commit:
    - avoid hardcoded dependencies
    - make sure OpenGL apps can be built on target system
     
    Once these are resolved, I'll post a link to my commit for an eventual review and will be ready to create a pull request.
     
    ----------
    Unrelated topic: armbian build script fixes for Debian Jessie
    Although only Ubuntu distribution is supported by armbian build scripts, Debian sid and above have all the necessary packages and should work fine. For Debian Jessie, emdebian repository should be added to apt sources, as described in cross toolchains wiki. Some of the cross toolchain packages have different names on Jessie as well. I have modified lib/general.sh file to account for those differences and be able to run armbian build scripts on my Debian Jessie machine. If there is interest, I could create an additional issue / pull request for this.
  12. Like
    dimag0g reacted to Igor in Claim a task, set DUE date and start doing it!   
    [Ended]   Be active, creative, helpful and you can get a powerful board in return. First give away batch is starting 11.6.2016  
    It's not often that you can work on a software project that actually brings joy and helps people. Armbian is one of those project. It is a system that helps one build a kernel or boot images for several ARM development boards. 
     
    It's in common interest that we improve level of support and to relieve most active people. Our crew needs an upgrade:
    we need more coders, kernel hackers, UX designers to find and solve problems. If you are one of them, join our forum, join project at Github. we need properly built, packed and supported desktop with major functions: video acceleration/fbturbo, libump, mali, etc. we need to put together much better documentation. We need to fine tune MkDocs documentation tools For those who are willing to claim a task or help others to understand "how do I do this in Armbian" we prepared a dozen of boards as a small reward. It's a Xunlong Orange PI+ 2E, which design was improved based on requests from our community. It's H3 based quad core with 2G RAM, 16G eMMC, Gigabit LAN, WIFI and 3x USB.     There might be just enough boards for everyone who are willing to do some public service work. Claim your projects at this topic and each weekend we will discuss and select up to 15 people who will get the board, starting with 11.6., ... until we run out of boards. One will be notified by email and expect an answer within 48 hours, if not, board goes to somebody else.   Boards were donated and will be sent directly from Xunlong Co., Shenzhen, China.     1st batch is going to: Kriston, lanefu, vlad59, martinayotte, jeanrhum, Gravelrash, xcasex, naibmra, Xer0, madilabs, wha, @lex, WereCatf   naibmra - Bulgaria - kernel testing, try hooking to kernelci.org, docs - mid July wha - USA - 50unattended-upgrades, issue #337 - June Kriston - USA - documentation rework - July, August Xer0 - Germany - media build - July, August lanefu - USA - issue tracking improvements between forum and github - 22 June, July madilabs - Martinique - Packaging for desktop video acceleration - June xcasex - Sweden - desktop packaging - July, August jeanrhum - France - documentation and debian packaging - July martinayotte - Canada - maintain/fix DTS entries for some devices such I2C/SPI/W1 - ASAP vlad59 - France - Nanopi M1 testing and documentation Gravelrash - UK - Prepare HOWTO's & package "armbian-gc2035-fswebcam package" - June   2nd batch is going to: dimag0g, R2D2_C3PO, miked, 0x0, sysitos, jmcneill    dimag0g - France -  Packaging of OpenGL wrapper library - end of July R2D2_C3PO - Germany - Improved SD-Card partitioning - end of August miked - Canada - build system recension - end of August 0x0 - Russian Federation - Redesign site and documentation WIP + add some changes to graphics in distro. - end of July sysitos - Germany - replace/rework ramlog for systemd - end of August jmcneill - Canada - (Armbian is helping porting Freebsd)    Users were notified and were requested to provide: project name, due date and their shipping address
  13. Like
    dimag0g reacted to zador.blood.stained in Claim a task, set DUE date and start doing it!   
    @Gravelrash
     
    Please take a look at updated hostapd compilation script for example.
     
    Directory structure is easy to fix afterwards, but if you want to do it right from the start, here is recommended setup:
    If package can be cross-compiled, it's better to put in into "$SOURCES/<package_name>" directory and compile & pack it in-place.
    If package needs to be compiled in chroot, put in into "$CACHEDIR/sdcard/root/<package_name>", so you can access it in chroot in "/root/<package_name>". Don't forget to remove this directory after you successfully built the package.
    After building a package copy it to "$DEST/debs"
     
    If there are no dependencies between packages, create new script in "extras" for each package. If some packages needs to be built in specific order, you can build several packages in one script.
  14. Like
    dimag0g reacted to rellla in OpenGL on Mali GPU (BananaPi, OrangePi PC, etc)   
    https://github.com/ptitSeb/glshim is a wrapper to execute OpenGL1.x (<-desktop!) code embedded systems which only provide OpenGL/ES 1.1
    The only thing that differs from the desktop image should be the last point. Installation of glshim. If that would be necessary in a desktop distribution? I would prefer to get that optionally if ever. Though it's a nice gimmick imho.
    Trying to get GL working on GL/ES platform is hacky anyway. At least when dealing with the minor version numbers glshim supports.
     
    Regards
    rellla
  15. Like
    dimag0g reacted to jernej in OpenGL on Mali GPU (BananaPi, OrangePi PC, etc)   
    You will still have problems with decoding then. GL doesn't do any video decoding, just rendering. VDPAU rendering much more efficient BTW.
  16. Like
    dimag0g got a reaction from RagnerBG in OpenGL on Mali GPU (BananaPi, OrangePi PC, etc)   
    Hello,
     
    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 https://github.com/robclark/libdri2 git clone https://github.com/linux-sunxi/libump git clone https://github.com/linux-sunxi/sunxi-mali git clone https://github.com/ssvb/xf86-video-fbturbo git clone https://github.com/ptitSeb/glshim # install mali driver cd sunxi-mali                                                                    git submodule init                                                               git submodule update                                                             git pull                                                                         wget http://pastebin.com/raw.php?i=hHKVQfrh -O ./include/GLES2/gl2.h             wget http://pastebin.com/raw.php?i=ShQXc6jy -O ./include/GLES2/gl2ext.h    make config ABI=armhf VERSION=r3p0                                               mkdir /usr/lib/mali                                                              echo "/usr/lib/mali" > /etc/ld.so.conf.d/1-mali.conf                             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/libGL.so.1 /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: libGLESv1_CM.so libGL:loaded: libEGL.so 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
  17. Like
    dimag0g got a reaction from manuti in OpenGL on Mali GPU (BananaPi, OrangePi PC, etc)   
    Hello,
     
    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 https://github.com/robclark/libdri2 git clone https://github.com/linux-sunxi/libump git clone https://github.com/linux-sunxi/sunxi-mali git clone https://github.com/ssvb/xf86-video-fbturbo git clone https://github.com/ptitSeb/glshim # install mali driver cd sunxi-mali                                                                    git submodule init                                                               git submodule update                                                             git pull                                                                         wget http://pastebin.com/raw.php?i=hHKVQfrh -O ./include/GLES2/gl2.h             wget http://pastebin.com/raw.php?i=ShQXc6jy -O ./include/GLES2/gl2ext.h    make config ABI=armhf VERSION=r3p0                                               mkdir /usr/lib/mali                                                              echo "/usr/lib/mali" > /etc/ld.so.conf.d/1-mali.conf                             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/libGL.so.1 /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: libGLESv1_CM.so libGL:loaded: libEGL.so 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
  18. Like
    dimag0g reacted to Gravelrash in OpenGL on Mali GPU (BananaPi, OrangePi PC, etc)   
    Thankyou for posting this. there are many people who visit this forum that are looking for support and solutions as you have posted above.
     
    The devs are looking for help to create more Desktop style images and solutions. You seem like just the sort of person they are looking for to assist. Your contribution could well be rewarded!!
     
    please take a look here http://forum.armbian.com/index.php/topic/1325-claim-a-task-set-due-date-and-start-doing-it/
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines