0

I am not able to compile the following kernel module https://github.com/Freescale/kernel-module-imx-gpu-viv/tree/upstream/6.2.4.p1.2/kernel-module-imx-gpu-viv-src for my IMX6Q board.

What i have done so far is :

  1. Downloaded the sources from the git repo above in a separate directory
  2. Modified the Makefile to set the correct path to the kernel sources KERNEL_SRC i am building (3.14.52) with :

Makefile :

obj-m := galcore.o
SRC := $(shell pwd)
KERNEL_SRC := /path/to/kernel_imx/

all:
        $(MAKE) -C $(KERNEL_SRC) M=$(SRC)/kernel-module-imx-gpu-viv-src AQROOT=${PWD}/kernel-module-imx-gpu-viv-src
        cp $(SRC)/kernel-module-imx-gpu-viv-src/Module.symvers $(PWD)
        cp $(SRC)/kernel-module-imx-gpu-viv-src/modules.order $(PWD)

modules_install:
        $(MAKE) -C $(KERNEL_SRC) M=$(SRC)/kernel-module-imx-gpu-viv-src modules_install

clean:
         rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
         rm -f Module.markers Module.symvers modules.order
         rm -rf .tmp_versions Modules.symvers
  1. compiled with : make ARCH=arm CROSS_COMPILE=/path/to/buildroot/buildroot/output/host/usr/bin/arm-linux-gnueabihf-

As a result of the compilation, i have no galcore.ko at all, only those 3 files generated :

built-in.o
modules.order ( empty )
Module.symvers ( empty )

I have tried also using buildroot but in the end, i have the same files in the directory output/build/kernel-module-imx-gpu-viv-9bbacfe7753626956a449c6a4f7dffcf6285b4d7

Thanks.

Fryz
  • 2,119
  • 2
  • 25
  • 45

2 Answers2

2

There is already a Buildroot package for this kernel driver: https://git.buildroot.org/buildroot/tree/package/freescale-imx/kernel-module-imx-gpu-viv

Thomas Petazzoni
  • 5,636
  • 17
  • 25
  • Yes indeed, but the Buildroot package version is too recent for the 3.14.52 kernel so i had to fall back to an older 5.0.11 release ( along with a 5.0.11 version of the imx-gpu-viv package). This driver is also available in the kernel sources. – Fryz Jul 06 '18 at 17:17
0

Finally i forgot to set MXC_GPU_VIV=m in the kernel configuration, that means to compile this driver as a module.

Now i have the expected galcore.ko correctly built.

Fryz
  • 2,119
  • 2
  • 25
  • 45