Skip to main content
Visitor II
June 13, 2024
Solved

Kernel source code compilation error

  • June 13, 2024
  • 2 replies
  • 1345 views

drivers/firmware/arm_scmi/optee.c:202:32: error: ‘TEE_OCALL2_OUT_PARAM1_ERROR’ undeclared here (not in a function)
  202 |         PTA_SCMI_OCALL_ERROR = TEE_OCALL2_OUT_PARAM1_ERROR,
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/firmware/arm_scmi/optee.c:228:31: error: field ‘ocall_arg’ has incomplete type
  228 |         struct tee_ocall2_arg ocall_arg;

drivers/firmware/arm_scmi/optee.c: In function ‘setup_ocall_thread’:
drivers/firmware/arm_scmi/optee.c:518:38: error: ‘TEE_OCALL2_ARG_INIT’ undeclared (first use in this function)
  518 |                         .ocall_arg = TEE_OCALL2_ARG_INIT,

 

 

I checked that the corresponding optee.c file does not declare the relevant variable.I'd really like to solve this problem. Thank you.

    This topic has been closed for replies.
    Best answer by Lsc2001

    Thanks again for your reply. I have solved the problem.

    I have reinstalled Ubuntu version 18.04 and it has compiled successfully.

    thank you

    Regards,

    Shicheng Luo

    2 replies

    ST Employee
    June 13, 2024

    Hi @Lsc2001 ,

     

    I'd like to ask you a few questions to better understand your problem :

    1. Could you please describe your setup in a little more detail?
    2. Are you using a distribution package (Yocto) or a developer package (SDK)? 
    3. Which version do you use?
    4. Have you checked that you've followed all the steps involved in building your system?

    Regards,

    Grégory

    Lsc2001Author
    Visitor II
    June 14, 2024

    Thank you very much for your reply.I am learning MP135 development board.Let me explain my problem.

       1.The Ubuntu version is 22.04

       2.I followed the installation instructions to install the latest version of the Developer Package (SDK). Version 23.06.21.The kernel version is 6.1.28.

       3.I follow exactly the steps in README to compile the kernel source.The previously mentioned problem occurred during compilation.

     

    Thank you again for your reply and hope to hear from you again.

     
    ST Employee
    June 14, 2024

    Hi,

     

    You could check if your SDK is properly sourced when you are in the terminal where you start your build.
    You can do a 
    $> echo $CC 
    and if you don't see anything, your SDK is not sourced and that is probably what is causing your error.
    If not, could you share with me the commands you are using and the traces you are getting. 

     

    Regards,

    Grégory

    Lsc2001AuthorAnswer
    Visitor II
    June 14, 2024

    Thanks again for your reply. I have solved the problem.

    I have reinstalled Ubuntu version 18.04 and it has compiled successfully.

    thank you

    Regards,

    Shicheng Luo