HW image transitions in Python
#6
(11-21-2018, 07:05 PM)gaggleoxfoggy Wrote: I'm not getting anywhere with this...
Step by step:
  1. use supported image - https://github.com/ayufan-rock64/linux-build/releases/ bionic-lxde-rock64-0.7.9-1067-arm64.img.xz
  2. login to lxde as rock64/rock64 and check installed packages
    Code:
    $ sudo bash
    # apt list --installed | egrep 'utgard|rockchip'
    ...
    libdrm-rockchip1/bionic,now 2.4.89-1ayufan1 arm64 [installed]
    libmali-rk-utgard-450-r7p0/bionic,now 1.6-1ayufan10 arm64 [installed]
    librockchip-mpp1/bionic,now 1.4.0-1ayufan3-2 arm64 [installed,automatic]
    linux-headers-4.4.132-1075-rockchip-ayufan-ga83beded8524/unknown,now 4.4.132-1075-rockchip-ayufan arm64 [installed,automatic]
    linux-image-4.4.132-1075-rockchip-ayufan-ga83beded8524/unknown,now 4.4.132-1075-rockchip-ayufan arm64 [installed,automatic]
    ...
    # dmesg | egrep -i 'drm|mali|utgard'
    ...
    [    1.377772] [drm] Rockchip DRM driver version: v1.0.1
    [    2.874168] I : [File] : drivers/gpu/arm/mali400/mali/linux/mali_kernel_linux.c; [Line] : 417; [Func] : mali_module_init(); svn_rev_string_from_arm of this mali_ko is '-a83beded8524', rk_ko_ver is '5', built at '08:21:11', on 'Jul 26 2018'.
    ...
  3. install required development packages
    Code:
    # apt install python pkg-config libjpeg-dev libpng-dev xserver-xorg-dev/bionic libmali-rk-dev
    # ls -l /usr/lib/aarch64-linux-gnu/ | egrep 'libEGL|libGLESv2'
    lrwxrwxrwx  1 root root       10 Mar  4  2018 libEGL.so -> libMali.so
    lrwxrwxrwx  1 root root       10 Mar  4  2018 libEGL.so.1 -> libMali.so
    lrwxrwxrwx  1 root root       10 Mar  4  2018 libEGL.so.1.0.0 -> libMali.so
    lrwxrwxrwx  1 root root       10 Mar  4  2018 libEGL.so.1.4 -> libMali.so
    lrwxrwxrwx  1 root root       10 Mar  4  2018 libGLESv2.so -> libMali.so
    lrwxrwxrwx  1 root root       10 Mar  4  2018 libGLESv2.so.2 -> libMali.so
    lrwxrwxrwx  1 root root       10 Mar  4  2018 libGLESv2.so.2.0 -> libMali.so
    lrwxrwxrwx  1 root root       10 Mar  4  2018 libGLESv2.so.2.0.0 -> libMali.so
    # ls -l /usr/include/EGL/ /usr/include/GLES2
    /usr/include/EGL/:
    total 80
    -rw-r--r-- 1 root root 15361 Nov 19  2017 egl.h
    -rw-r--r-- 1 root root 59487 Nov 19  2017 eglext.h
    -rw-r--r-- 1 root root  3839 Nov 19  2017 eglplatform.h
    /usr/include/GLES2:
    total 256
    -rw-r--r-- 1 root root  43972 Nov 19  2017 gl2.h
    -rw-r--r-- 1 root root 210702 Nov 19  2017 gl2ext.h
    -rw-r--r-- 1 root root   1160 Nov 19  2017 gl2platform.h
  4. download, configure, compile, install glmark2 from sources
    Code:
    # git clone --depth 1 https://github.com/glmark2/glmark2.git
    # cd glmark2
    # ./waf configure --with-flavors=x11-glesv2
    Setting top to                           : /home/rock64/glmark2
    Setting out to                           : /home/rock64/glmark2/build
    Checking for 'gcc' (C compiler)          : /usr/bin/gcc
    Checking for 'g++' (C++ compiler)        : /usr/bin/g++
    Checking for header stdlib.h             : yes
    Checking for header string.h             : yes
    Checking for header unistd.h             : yes
    Checking for header stdint.h             : yes
    Checking for header stdio.h              : yes
    Checking for header jpeglib.h            : yes
    Checking for library m                   : yes
    Checking for library jpeg                : yes
    Checking for function memset             : yes
    Checking for function sqrt               : yes
    Checking for program 'pkg-config'        : /usr/bin/pkg-config
    Checking for 'libpng12'                  : not found
    Checking for 'libpng15'                  : not found
    Checking for 'libpng16'                  : yes
    Checking for 'x11'                       : yes
    Checking for 'gl'                        : not found
    Checking for 'egl'                       : yes
    Checking for 'glesv2'                    : yes
    Checking for 'libdrm'                    : yes
    Checking for 'gbm'                       : yes
    Checking for 'libudev'                   : not found
    Checking for 'mirclient'                 : yes
    Checking for 'wayland-client'            : not found
    Checking for 'wayland-egl'               : yes
    Prefix                                   : /usr/local
    Data path                                : /usr/local/share/glmark2
    Including extras                         : No
    Building flavors                         : ['x11-glesv2']
    'configure' finished successfully (5.990s)
    # ./waf
    Waf: Entering directory `/home/rock64/glmark2/build'
    [ 1/67] Compiling src/main.cpp
    [ 2/67] Compiling src/canvas-generic.cpp
    [ 3/67] Compiling src/native-state-x11.cpp
    ...
    # ./waf install
  5. run "glmark2-es2" (performance results are dependend onscreen/offcreen, gpu/memory/cpu clock ...)
    Code:
    $ /usr/local/bin/glmark2-es2
    =======================================================
        glmark2 2017.07
    =======================================================
        OpenGL Information
        GL_VENDOR:     ARM
        GL_RENDERER:   Mali-450 MP
        GL_VERSION:    OpenGL ES 2.0
    =======================================================
    [build] use-vbo=false: FPS: 50 FrameTime: 20.000 ms
    [build] use-vbo=true: FPS: 50 FrameTime: 20.000 ms
    ...
    [loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 40 FrameTime: 25.000 ms
    =======================================================
                                      glmark2 Score: 40
    =======================================================
    $ /usr/local/bin/glmark2-es2
    =======================================================
        glmark2 2017.07
    =======================================================
        OpenGL Information
        GL_VENDOR:     ARM
        GL_RENDERER:   Mali-450 MP
        GL_VERSION:    OpenGL ES 2.0
    =======================================================
    [build] use-vbo=false: FPS: 196 FrameTime: 5.102 ms
    [build] use-vbo=true: FPS: 224 FrameTime: 4.464 ms
    ...
    [loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 175 FrameTime: 5.714 ms
    =======================================================
                                      glmark2 Score: 165
    =======================================================

Now OpenGLESv2 development platform is verified to be working.
And remember OpenGLES is not OpenGL !

Buy me a Beer.
I left this community in Aug 2019 due to PINE64 refusal to produce/deliver ROCK64-1G version 3 after more than one year of changing statuses to "planning", "evaluating", "releasing", "availability", "estimated availability" and finally "no schedule" Angry. ROCK64 is dead platform without any advantage. Buy Raspberry PI 4 !
Away


Messages In This Thread
HW image transitions in Python - by gaggleoxfoggy - 11-14-2018, 12:36 AM
RE: HW image transitions in Python - by mcerveny - 11-16-2018, 03:10 AM
RE: HW image transitions in Python - by mcerveny - 11-22-2018, 02:07 PM
RE: HW image transitions in Python - by mcerveny - 11-22-2018, 03:49 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python GPIO Library for the Rock64 (R64.GPIO) Leapo 37 77,376 07-02-2021, 03:20 PM
Last Post: klausfelix
  Download IDB fail when trying to flash Android image cherkasoff 0 5,271 04-05-2020, 07:41 AM
Last Post: cherkasoff
Brick How to Write an Image to the eMMC Module Tutorial MarkHaysHarris777 55 120,114 02-06-2019, 04:02 PM
Last Post: tllim
  Rock64 scipy, numpy, scikit-image, matplotlib issue with pip3 ictele 0 2,240 02-05-2019, 05:41 PM
Last Post: ictele
  flash image to sd/emmc through ethernet LMM 0 2,512 02-04-2019, 07:36 AM
Last Post: LMM
  New User - No image file in LibreELEC download Frogmella 9 10,312 06-11-2018, 01:01 PM
Last Post: Frogmella
  SDL2 and LXDE image Max11 0 1,856 05-24-2018, 01:51 AM
Last Post: Max11
  flash image directly to eMMC? gmruiz 4 7,574 01-09-2018, 05:43 AM
Last Post: Luke
  ioBroker IoT image Luke 0 2,216 11-02-2017, 03:46 AM
Last Post: Luke
Brick Rock64 Linux Image Writing Scripts Codes and Tutorial MarkHaysHarris777 4 11,416 09-09-2017, 04:03 PM
Last Post: freebsd

Forum Jump:


Users browsing this thread: 2 Guest(s)