Mali
???? wget https://www.kernel.org/pub/linux/kernel/v4.x/testing/linux-4.0-rc2.tar.xz
???? extract linux-4.0-rc2.tar.xz
????? cd linux-4.0-rc2
????? zcat /proc/config.gz > .config
????? make oldconfig && make prepare
ump.ko
KDIR=/lib/modules/4.0.0-rc2-1-ARCH/build/ CONFIG=default BUILD=release make
mali.ko
nano linux/mali_sync.c
s32 mali_sync_fence_fd_alloc(struct sync_fence *sync_fence) { s32 fd = -1; - fd = get_unused_fd(); + fd = get_unused_fd_flags(0); if (fd < 0) { sync_fence_put(sync_fence); return -1; } sync_fence_install(sync_fence, fd); return fd; }
nano core/linux-armv7-rc/PKGBUILD
# android's sync implementation mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include/uapi" cp drivers/staging/android/sync.h "${pkgdir}/usr/lib/modules/${_kernver}/build/include/" cp drivers/staging/android/uapi/sync.h "${pkgdir}/usr/lib/modules/${_kernver}/build/include/uapi"
KDIR=/lib/modules/4.0.0-rc2-1-ARCH/build/ USING_UMP=1 BUILD=release make
insmod ump.ko insmod mali.ko
[12035.953246] UMP: UMP device driver loaded [12039.051604] Mali: Mali device driver loaded
https://github.com/mripard/sunxi-mali
https://github.com/NextThingCo
https://bbs.nextthing.co/t/building-mali-kernel-modules-for-the-c-h-i-p-part-3/8982
https://github.com/NextThingCo/CHIP-linux/commit/ffa28044ba5428d04609060a5ea2e73d7ab492d1