Skip to content

Mali support

Jerome Brunet edited this page Mar 26, 2018 · 1 revision

This page describes the required steps to add Mali support which are common to the fbdev and gbm interfaces

Mali kernel driver :

The mali support is split in 2 parts, a kernel module and a userspace library. The patches added to this repository provides the mali platform driver for the meson gxl family. The patches also fix a few problems when compiling the Mali driver with recent kernels:

git clone https://github.com/superna9999/meson_gx_mali_450 -b DX910-SW-99002-r7p0-00rel1_meson_gx
pushd meson_gx_mali_450
KDIR=<libretech-kernel-build-dir> ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- ./build.sh
popd
VER=$(ls <path-to-your-rootfs>/lib/modules/)
cp meson_gx_mali_450/mali.ko <path-to-your-rootfs>/lib/modules/$VER/kernel/
depmod -b <path-to-your-rootfs> -a $VER

Mali library install :

The Mali library is a binary provided by amlogic's buildroot package. They have been repackaged here for our convenience

Here is how to install the library:

wget https://github.com/superna9999/meson_gx_mali_450/releases/download/for-4.12/buildroot_openlinux_kernel_3.14_wayland_20170630_mali.tar.gz
tar xzvf buildroot_openlinux_kernel_3.14_wayland_20170630_mali.tar.gz
mkdir -p <path-to-your-rootfs>/rootfs/usr/lib/mali
cp buildroot_openlinux/buildroot/package/meson-mali/lib/arm64/r7p0/m450/libMali.so <path-to-your-rootfs>/usr/lib/mali/
pushd <path-to-your-rootfs>/usr/lib/mali
ln -s libMali.so libGLESv2.so.2.0
ln -s libMali.so libGLESv1_CM.so.1.1
ln -s libMali.so libEGL.so.1.4
ln -s libGLESv2.so.2.0 libGLESv2.so.2
ln -s libGLESv1_CM.so.1.1 libGLESv1_CM.so.1
ln -s libEGL.so.1.4 libEGL.so.1
ln -s libGLESv2.so.2 libGLESv2.so
ln -s libGLESv1_CM.so.1 libGLESv1_CM.so
ln -s libEGL.so.1 libEGL.so
popd