linux-sunxi / sunxi-mali Goto Github PK
View Code? Open in Web Editor NEWSunxi Mali-400 support libraries.
Sunxi Mali-400 support libraries.
Mali userspace driver installation. ----------------------------------- This repository contains a complete set of Mali userspace drivers, including proprietary OpenGLESv2/EGL binaries. Prerequisite: ------------- You will need to have a matching version of libUMP installed. You can get this from the linux sunxi package server, which is documented at http://linux-sunxi.org/Packages Or you can manually build libump from the sunxi libump git repository at https://github.com/linux-sunxi/libump Cloning this repository: ------------------------ > git clone https://github.com/linux-sunxi/sunxi-mali.git > git submodule init > git submodule update This should make sure that you fully set up this repository and the sunxi-mali-proprietary submodule. Installing the binaries: ------------------------ First off, while there are some android binaries present, there is currently no support for installing the android binaries, you will have to do so manually. When everything goes well, all you need to do is run: > make install This should autodetect things, and install the correct mali GLES and EGL libraries in your system. Verifying the EGL/GLES installation: ------------------------------------ After installation, run the following to build the hello triangle utility: > make test When this succeeds, you can attempt to run it: > test/test If this shows a colourful triangle in a grey background measuring 480x480 then all is fine! This test application will also print EGL and GL information to the command line. Do make sure that you are either on the console for the framebuffer binaries to work correctly. For X11 binaries, do make sure that X has started. More control: ------------- The build system tries to detect a few things on its own. It creates a config.mk which can be remade by running > make config The build systen will try to determine which version of the userspace binaries need to be installed. It will use the utility in version/ to query the kernel driver for its version. So please make sure to run this on the target system with the mali kernel driver loaded. The mali driver version can be overridden when configuring with the VERSION= argument. Possible values are currently 'r2p4', 'r3p0', 'r3p1', and 'r3p2-01rel1' (which also supports rel2). The build system will try to determine which of the 'armel' of 'armhf' toolchains your system uses, so that the correct binaries can be installed. This can be overridden at configure time with ABI= argument. Possible values are 'armel' and 'armhf'. The build system will try to detect whether libX11 is installed, and if so will default to installing the x11 binaries. This can be overridden with the EGL_TYPE= configure argument. Possible values are 'framebuffer' or 'x11'. Running: > make config VERSION=r3p1 ABI=armel EGL_TYPE=framebuffer will remake config.mk with the respective values. Subsequently running: > make install will then install the lot into your system. To remove all built files, and even the configuration, run: > make clean
I would like to add support so that the new Xilinx Zynq processor can use the sunxi-mali repos to build it's userspace Mali support. Any concerns? If not, I'll submit some pulls against each once I finish testing.
Running make config
it can't detect the version properly and outputs UNKNOWN
, even though the mali
module is loaded:
sunxi-mali$ sudo make config
rm -f config.mk
make config.mk
make[1]: Entering directory '/home/me/sunxi-mali'
make -f Makefile.config
make[2]: Entering directory '/home/me/sunxi-mali'
ABI="armhf" (Detected)
VERSION="UNKNOWN" (Detected)
Makefile.config:57: Unknown/unhandled Mali Version "UNKNOWN"
Makefile.config:58: Use VERSION=(r2p4,r3p0,r3p1,r3p2-01rel1) instead
Makefile.config:59: *** Unknown/unhandled Mali Version "UNKNOWN". Stop.
make[2]: Leaving directory '/home/me/sunxi-mali'
Makefile:12: recipe for target 'config.mk' failed
make[1]: *** [config.mk] Error 2
make[1]: Leaving directory '/home/me/sunxi-mali'
Makefile:8: recipe for target 'config' failed
make: *** [config] Error 2
$ lsmod
Module Size Used by
cpufreq_userspace 3548 0
spidev 6398 0
sunxi_ss 17659 0
hidp 17562 0
rfcomm 58698 0
hci_uart 25018 0
bluetooth 265706 5 hidp,hci_uart,rfcomm
mali 342892 0
Can we update gles egl header files as mali drivers support some new futures for example dma-buf as EGLImage
https://codereview.chromium.org/12316111
Also nice future will be to detect if this future is enabled in drivers
Hello,
I just came across this little annoyance when trying to build the "test" utility on Debian Jessie.
I needed to add the linker option "-lX11" to the Makefile, or otherwise the test would not build. When added, it built without a problem.
Regards
Ingmar
On Banana Pro board with Arch Linux the library and test compiles cleanly but test fails:
$ DISPLAY=":0" ./test
Error: eglInitialise failed!
Library was built with following configuration:
$ make config ABI="armhf"
rm -f config.mk
make config.mk
make[1]: Entering directory '/home/bananapi/src/sunxi-mali'
make -f Makefile.config
make[2]: Entering directory '/home/bananapi/src/sunxi-mali'
ABI="armhf" (Provided)
VERSION="r3p0" (Detected)
EGL_TYPE="x11" (Detected)
echo "MALI_VERSION ?= r3p0" > config.mk
echo "MALI_LIBS_ABI ?= armhf" >> config.mk
echo "MALI_EGL_TYPE ?= x11" >> config.mk
make[2]: Leaving directory '/home/bananapi/src/sunxi-mali'
make[1]: Leaving directory '/home/bananapi/src/sunxi-mali'
I add to my sources.list your repo, and...
https://b.radikal.ru/b14/1903/c5/0f6d795b6374.jpg, here is picture.
I run apt-get update
Hi, Whom may concern.
I am new learner and try to build my Banana Pi M1 in an up-to-date operation system.
It is using Armbian 20.08.3 with kernel 5.8.11-sunxi in my system now.
I have followed the instruction slowly building up, but it might be a stupid question as following.
How can I know the Mali driver is really made and boot up with the loaded in kernel module?
I have many failures to recompile kernel core to mali driver and made many time of os reinstallation.
I only know the first default in system, and lsmod cannot find out any description about mali driver.
Kernel headers is empty about mali.ko file, Icannot use modprobe or insmod to call it.
It can go steps until point 5 : https://linux-sunxi.org/Mali_binary_driver#Verifying_the_EGL.2FGLES_driver_stack
And it can go # install mali driver (http://wiki.lemaker.org/BananaPro/Pi:GPU)
Should I do any thing to make it up?
This is because I have used another helper project of personal image in SD card (https://github.com/bernhard263/Bananapi-Retropie/wiki).
I can look at mali driver and fbturbo driver in lsmod list, but my new installed os cannot have same list.
My:
Module Size Used by
hid_logitech_hidpp 36864 0
mousedev 20480 0
joydev 24576 0
input_leds 16384 0
btusb 40960 0
btintel 20480 1 btusb
btrtl 20480 1 btusb
btbcm 16384 1 btusb
bluetooth 401408 5 btrtl,btintel,btbcm,btusb
ecdh_generic 16384 1 bluetooth
rfkill 20480 2 bluetooth
hid_logitech_dj 20480 0
ecc 28672 1 ecdh_generic
lima 45056 0
axp20x_adc 16384 0
evdev 20480 2
sun4i_gpadc_iio 16384 0
gpu_sched 28672 1 lima
sun4i_ts 16384 0
sunxi_cir 20480 0
sun4i_drm_hdmi 24576 2
sun4i_ss 28672 0
sunxi_cedrus 32768 0
display_connector 20480 0
uio_pdrv_genirq 16384 0
uio 16384 1 uio_pdrv_genirq
cpufreq_dt 20480 0
zram 24576 3
ip_tables 24576 0
x_tables 24576 1 ip_tables
autofs4 36864 2
axp20x_usb_power 16384 0
pinctrl_axp209 16384 0
industrialio 53248 3 axp20x_usb_power,sun4i_gpadc_iio,axp20x_adc
sun4i_gpadc 16384 0
sunxi 20480 0
phy_generic 20480 2 sunxi
realtek 20480 1
It is afraid something wrong or missing processes.
Would someone please advise me how to run correct steps in next?
It will help a lot for newer experiences and knowledges.
Thanks a lit.
I try to build an image for bananaPro withot x11 and wayland support.But I get following error during mali test binary compilation
make: Leaving directory '/home/yusuf/yocto/poky/bananaProHf/tmp/work/cortexa7hf-vfp-vfpv4-neon-poky-linux-gnueabi/sunxi-mali/git-r0/git/include'
make -C test test
make[1]: Entering directory '/home/yusuf/yocto/poky/bananaProHf/tmp/work/cortexa7hf-vfp-vfpv4-neon-poky-linux-gnueabi/sunxi-mali/git-r0/git/test'
arm-poky-linux-gnueabi-gcc -march=armv7-a -mfloat-abi=hard -mfpu=neon-vfpv4 -mtune=cortex-a7 --sysroot=/home/yusuf/yocto/poky/bananaProHf/tmp/sysroots/bananapro -O2 -pipe -g -feliminate-unused-debug-types -I../include -L../../image/usr/lib -o test test.c -lEGL -lGLESv2 -lX11
In file included from ../include/EGL/egl.h:36:0,
from test.c:32:
../include/EGL/eglplatform.h:89:22: fatal error: X11/Xlib.h: No such file or directory
compilation terminated.
Makefile:8: recipe for target 'test' failed
How can I fix this problem?
I've successfully built and run the triangle test on the PCDuino (version =r3p0, armhf, EGL_type=framebuffer): (Here is the output):
EGL Version: "1.4 Linux-r3p0-04rel0"
EGL Vendor: "ARM"
EGL Extensions: "EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_KHR_lock_surface EGL_KHR_lock_surface2 "
Surface size: 480x480
GL Vendor: "ARM"
GL Renderer: "Mali-400 MP"
GL Version: "OpenGL ES 2.0"
GL Extensions: "GL_OES_texture_npot GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_depth24 GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 GL_EXT_blend_minmax GL_OES_EGL_image_external GL_OES_EGL_sync GL_EXT_multisampled_render_to_texture GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_EXT_shader_texture_lod "
But I'd like to use OpenVG. I noticed that the OpenVG headers/libraries are missing from this repo.
The packages mail400 and mali400-dev contain the OpenVG headers/libraries, and I was able to build my OpenVG app, but it failed on initiation. (I removed them before re-building this repo as there seems to be some duplication)
When I use the OpenVG headers from mali400, I can build my OpenVG app, but it fails on link
What is the best course of action to support for OpenVG?
I have compiled the sunxi-mali as follow:
make config VERSION=r3p0 EGL_TYPE=framebuffer
I am not running any X11 or Xorg or any X server, only framebuffer console.
When I make test
and execute test/test
I got error Error: eglInitialise failed!
I'am using an orangePi PC as a board.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.