--- /dev/null
+#
+# Copyright (C) 2014-2018 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=mali
+PKG_RELEASE=1
+
+PKG_LICENSE:=GPL-2.0
+
+PKG_SOURCE_URL:=https://github.com/mripard/sunxi-mali
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_DATE:=2019-02-16
+PKG_SOURCE_VERSION:=51fd0969b595d6d9e5b2af8d87f115dc11bbf8c3
+PKG_MIRROR_HASH:=43009fcd031589833183f2915dfb0c85347de6eb6f510ce4de18e6969769dd0d
+
+PKG_MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/kernel.mk
+include $(INCLUDE_DIR)/package.mk
+
+define KernelPackage/mali
+ SUBMENU:=Video Support
+ TITLE:=Mali support for sunXi platform for mainline Linux
+ DEPENDS:=@TARGET_sunxi
+ FILES:=$(PKG_BUILD_DIR)/mali.ko
+ AUTOLOAD:=$(call AutoLoad,50,mali)
+endef
+
+define Build/Compile
+ (cd $(PKG_BUILD_DIR); \
+ $(KERNEL_MAKE_FLAGS) \
+ KDIR=$(LINUX_DIR) \
+ ./build.sh -r r6p2 -b )
+endef
+
+$(eval $(call KernelPackage,mali))