Error when i build open source mali bifrost GPU kernel driver

Hi, when i try to build mali bifrost GPU driver (BX301A01B-SW-99002-r24p0-01rel0) , i will recive eror:

root@orangepizero2:/home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard# CONFIG_MALI_MIDGARD=m make
make -C /lib/modules/5.10.0-sunxi64/build M=/home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard EXTRA_CFLAGS="-I/home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/../../../../include -I/home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/../../../../tests/include " KBUILD_EXTRA_SYMBOLS="" modules
make[1]: Entering directory '/usr/src/linux-headers-5.10.0-sunxi64'
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/context/mali_kbase_context.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/device/mali_kbase_device.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_cache_policy.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_mem.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_mem_pool_group.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_native_mgm.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_ctx_sched.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_jm.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_gpuprops.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_js.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_pm.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_config.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_vinstr.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_hwcnt.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_hwcnt_backend_gpu.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_hwcnt_gpu.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_hwcnt_legacy.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_hwcnt_types.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_hwcnt_virtualizer.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_softjobs.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_hw.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_debug.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_gpu_memory_debugfs.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_mem_linux.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_core_linux.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_mem_profile_debugfs.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mmu/mali_kbase_mmu.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mmu/mali_kbase_mmu_hw_direct.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mmu/mali_kbase_mmu_mode_lpae.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mmu/mali_kbase_mmu_mode_aarch64.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_disjoint_events.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_debug_mem_view.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_smc.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_mem_pool.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_mem_pool_debugfs.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_debugfs_helper.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_strings.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_as_fault_debugfs.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_regs_history_debugfs.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/thirdparty/mali_kbase_mmap.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/tl/mali_kbase_timeline.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/tl/mali_kbase_timeline_io.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/tl/mali_kbase_tlstream.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/tl/mali_kbase_tracepoints.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/gpu/mali_kbase_gpu.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_dummy_job_wa.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_debug_job_fault.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_event.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_jd.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_jd_debugfs.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_js_ctx_attr.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/device/backend/mali_kbase_device_jm.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/gpu/backend/mali_kbase_gpu_fault_jm.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/tl/backend/mali_kbase_timeline_jm.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mmu/backend/mali_kbase_mmu_jm.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/context/backend/mali_kbase_context_jm.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/platform/devicetree/mali_kbase_config_devicetree.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/platform/devicetree/mali_kbase_runtime_pm.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_sync_file.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_sync_common.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_fence.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_cache_policy_backend.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_device_hw.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_gpuprops_backend.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_irq_linux.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_instr_backend.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_js_backend.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_pm_backend.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_pm_driver.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_pm_metrics.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_pm_ca.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_pm_always_on.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_pm_coarse_demand.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_pm_policy.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_time.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_l2_mmu_config.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_jm_as.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_debug_job_fault_backend.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_jm_hw.o
CC [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_jm_rb.o
LD [M] /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase.o
MODPOST /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/Module.symvers
ERROR: modpost: "kbase_ipa_protection_mode_switch_event" [/home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase.ko] undefined!
ERROR: modpost: "kbase_devfreq_enqueue_work" [/home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase.ko] undefined!
ERROR: modpost: "kbase_ipa_debugfs_init" [/home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase.ko] undefined!
ERROR: modpost: "kbase_devfreq_term" [/home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase.ko] undefined!
ERROR: modpost: "kbase_devfreq_init" [/home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:111: /home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/Module.symvers] Error 1
make[2]: *** Deleting file '/home/vladislav/mali-bifrost/driver/product/kernel/drivers/gpu/arm/midgard/Module.symvers'
make[1]: *** [Makefile:1711: modules] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.10.0-sunxi64'
make: *** [Makefile:35: all] Error 2

Please help me if you can.

Board - OrangePi Zero2

OS - Armbian_21.02.0-trunk.34_Orangepizero2_focal_dev_5.10.0 

Linux orangepizero2 5.10.0-sunxi64 #trunk.34 SMP Wed Dec 23 01:21:37 CET 2020 aarch64 aarch64 aarch64 GNU/Linux

Thank you!

More questions in this forum