This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3354: Error compiling SGX module with kernel 4.19.y

Part Number: AM3354

Hi, I'm starting a new project and I've upgraded my kernel from 4.19.79 to 4.19.227 cloing the TI git repository (git://git.ti.com/ti-linux-kernel/ti-linux-kernel. git). I've compiled the kernel without errors but when I've tried to compile the sgx530 module I've obtained the following error:

/mnt/work/cortexA8/ti/modulos/omap5-sgx-ddk-linux.v4.19.y/eurasia_km/eurasiacon/binary_omap_linux_xorg_release/target_armhf/kbuild/services4/srvkm/env/linux/module.c:51:10 :
fatal error: linux/platform_data/sgx-omap.h: No such file or directory
  #include <linux/platform_data/sgx-omap.h>
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

The sgx-omap.h file doesn't exist. I need to apply any patch?!

sgx530 module source code is also cloned from git://git.ti.com/graphics/omap5-sgx-ddk-linux.git

Best regards

   Max

  • Hi Max,

    For the SGX repo, what branch did you checkout and I am assuming you are using the branch "ti-img-sgx/1.17.4948957/k4.19" ?

    Regards,
    Krunal

  • Hi Krunal... Nice to see you again!

    Yes, I'm ussing the branch "ti-img-sgx/1.17.4948957/k4.19" from SGX repo and branch "linux-4.19.y" from Kernel...

    The kernel branch doesn't have any reference to SGX...  am33xx.dtsi file haven't the definition of sgx hardware

     sgx: sgx@56000000 {
                           compatible = "ti,am3352-sgx530", "img,sgx530";
                           ti,hwmods = "gfx";
                           reg = <0x56000000 0x10000>;
                           interrupts = <37>;
                           clocks = <&gfx_fck_div_ck>;
                           clock-names = "fclk";
                           status = "disabled";
    };

    ...

    While I write you I've seen that exists ti-linux-4.19.y branch... Is possible that this was my problem?

    Best regards

       Max

  • Problem found... The correct branch for kernel is ti-linux-4.9.y...

    :-D