Add mali driver to rockpi
This gives us opencl access to the GPU. Not fast, but it is good
enough to start testing and developing.
Change-Id: I3cc68e28a6db26ecce552b3fadd4662acb9f75f5
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/frc971/rockpi/build_kernel.sh b/frc971/rockpi/build_kernel.sh
index f3cadd4..a230ecf 100755
--- a/frc971/rockpi/build_kernel.sh
+++ b/frc971/rockpi/build_kernel.sh
@@ -8,6 +8,10 @@
ln -s ../.config linux/.config
fi
+if [[ ! -e mali-driver ]]; then
+ git clone --branch master https://github.com/bootlin/mali-driver
+fi
+
(
cd linux
@@ -44,7 +48,13 @@
make rockpi
)
+(
+ cd mali-driver
+ make KDIR=$(realpath ../linux) ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- all
+)
+
cp ../../y2022/localizer/kernel/adis16505.ko "kernel-install/lib/modules/${VERSION}/kernel/"
+cp mali-driver/r8p0/drivers/gpu/arm/midgard/mali_kbase.ko "kernel-install/lib/modules/${VERSION}/kernel/"
/sbin/depmod -b ./kernel-install ${VERSION}