This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

BX301A01B-SW-99002-r29p0-01eac0.tar mali driver compilation. Error "undefined reference to `platform_funcs'"

Hi all.

I'm trying to build BX301A01B-SW-99002-r29p0-01eac0.tar driver with linux kernel and i have some doubts.

First of all, i'm trying to build this driver for a GPU Mali-G31 MP2. Is this driver compatible for this GPU? I have seen that this GPU uses Bifrost driver but in the package i only see code for Midgard driver. Is Midgard now compatible with Mali-G31? I got this driver from Bifrost driver download page.

My second question is about compilation proccess. I have copied the content of the tarball to its corresponding directories and i have enabled CONFIG_MALI_MIDGARD in menuconfig y i have left the default configuration. 

The proccess compilation fails with the next output

  CC      init/version.o
  LD      init/built-in.o
drivers/built-in.o: In function `kbasep_platform_device_init':
/home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/mali_kbase_config.c:33: undefined reference to `platform_funcs'
/home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/mali_kbase_config.c:33:(.text+0xf73e4): relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against undefined symbol `platform_funcs'
/home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/mali_kbase_config.c:33: undefined reference to `platform_funcs'
/home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/mali_kbase_config.c:33: undefined reference to `platform_funcs'
drivers/built-in.o: In function `kbasep_platform_device_term':
/home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/mali_kbase_config.c:44: undefined reference to `platform_funcs'
/home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/mali_kbase_config.c:44:(.text+0xf742c): relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against undefined symbol `platform_funcs'
/home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/mali_kbase_config.c:44: undefined reference to `platform_funcs'
drivers/built-in.o: In function `kbase_pm_runtime_init':
/home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_pm_backend.c:53: undefined reference to `pm_callbacks'
/home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_pm_backend.c:53:(.text+0x1248c8): relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against undefined symbol `pm_callbacks'
/home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_pm_backend.c:53: undefined reference to `pm_callbacks'
/home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_pm_backend.c:56: undefined reference to `pm_callbacks'
drivers/built-in.o: In function `kbase_pm_register_access_enable':
/home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_pm_backend.c:108: undefined reference to `pm_callbacks'
/home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_pm_backend.c:108:(.text+0x1249a8): relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against undefined symbol `pm_callbacks'
/home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_pm_backend.c:108: undefined reference to `pm_callbacks'
drivers/built-in.o:/home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_pm_backend.c:125: more undefined references to `pm_callbacks' follow
drivers/built-in.o: In function `kbase_pm_register_access_disable':
/home/goonie/odroidgo/kernel/linux/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_pm_backend.c:125:(.text+0x1249ec): relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against undefined symbol `pm_callbacks'
make: *** [Makefile:1022: vmlinux] Error 1

It looks like midgard/platform/rk is has not been compiled but it is defined in the config page

There is something that i'm doing wrong?

Regards.
José Antonio

Parents
  • Hi José Antonio,

    I'm not an expert on our Linux drivers, but I've got an initial reply from the team that for Linux the driver covers Midgard, Bifrost & now Valhall too, they've just not updated the name.

    Given that's not the problem, hopefully someone else can pick up with what the issue actually is.

    Just to be sure you're aware, this is for the kernel driver obviously, you'll need to make sure that the updated kernel driver will work with userspace driver.

    Cheers,

    Ben

Reply
  • Hi José Antonio,

    I'm not an expert on our Linux drivers, but I've got an initial reply from the team that for Linux the driver covers Midgard, Bifrost & now Valhall too, they've just not updated the name.

    Given that's not the problem, hopefully someone else can pick up with what the issue actually is.

    Just to be sure you're aware, this is for the kernel driver obviously, you'll need to make sure that the updated kernel driver will work with userspace driver.

    Cheers,

    Ben

Children