Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[no-std branch] Rust examples build environment cleanup #116

Merged
merged 8 commits into from
Jan 3, 2024

Commits on Dec 29, 2023

  1. examples: host: Drop redundant Cargo.lock files

    Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
    b49020 committed Dec 29, 2023
    Configuration menu
    Copy the full SHA
    82b6a12 View commit details
    Browse the repository at this point in the history
  2. optee-teec: Use standard OPTEE_CLIENT_EXPORT

    Similar to C counterparts, use OPTEE_CLIENT_EXPORT as a standard path to
    export pre-built optee-client libraries and headers.
    
    Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
    b49020 committed Dec 29, 2023
    Configuration menu
    Copy the full SHA
    f584197 View commit details
    Browse the repository at this point in the history
  3. optee-utee: Use standard TA_DEV_KIT_DIR

    Similar to C counterparts, use TA_DEV_KIT_DIR as a standard path to
    export pre-built TA libraries and headers.
    
    Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
    b49020 committed Dec 29, 2023
    Configuration menu
    Copy the full SHA
    e497b28 View commit details
    Browse the repository at this point in the history

Commits on Jan 2, 2024

  1. examples: Refactor build infrastructure

    Refactor OP-TEE rust examples build infrastructure to rather use
    standard environment variables like:
    - CROSS_COMPILE
    - TA_DEV_KIT_DIR
    
    With that remove any custom OPTEE_* environment variables.
    
    Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
    b49020 committed Jan 2, 2024
    Configuration menu
    Copy the full SHA
    132fa43 View commit details
    Browse the repository at this point in the history
  2. Makefile: Drop automatic OP-TEE modules build

    Rather than automatically building OP-TEE OS and OP-TEE Client, we
    should ask users to build them for their particular platforms using
    whichever OP-TEE release they are targeting.
    
    Users just have to export paths for OP-TEE OS build artifacts via
    TA_DEV_KIT_DIR and for OP-TEE Client via OPTEE_CLIENT_EXPORT. This is
    the common practice followed by C counterparts like optee_test and
    optee_examples. Along with that it make OP-TEE rust examples compatible
    with build systems like Yocto etc.
    
    Regarding toolchains, we don't need to fetch them explicitly but rather
    users can use the distro cross compiler or the one they have installed
    on a particular location via CROSS_COMPILE environment variable.
    
    With that build command simplifies to just following:
    
    $ make CROSS_COMPILE=aarch64-linux-gnu- \
           TA_DEV_KIT_DIR=<optee_os>/out/arm-plat-vexpress/export-ta_arm64/ \
           OPTEE_CLIENT_EXPORT=<optee_client>/out/export/
    
    Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
    b49020 committed Jan 2, 2024
    Configuration menu
    Copy the full SHA
    81efb70 View commit details
    Browse the repository at this point in the history
  3. examples: ta: build.rs: Fix some linker incompatibilities

    Since we don't have a similar linker script pre-processing capability in
    rust build script as we have with C Makefile. So manually fix following
    build error seen with older GCC linker while parsing linker scripts:
    
    aarch64-linux-gnu-ld.bfd:ta.lds:3: ignoring invalid character `#' in expression
    
    Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
    b49020 committed Jan 2, 2024
    Configuration menu
    Copy the full SHA
    28b3089 View commit details
    Browse the repository at this point in the history
  4. examples: Fix rust build for Arm 32-bit mode

    arm-none-linux-gnueabihf-ld.bfd reports EABI version mismatch issue,
    drop that error via adding "--no-warn-mismatch" linker flag.
    
    Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
    b49020 committed Jan 2, 2024
    Configuration menu
    Copy the full SHA
    84589c6 View commit details
    Browse the repository at this point in the history
  5. CI: Updates for refactored build environment

    Extend CI to build OP-TEE rust examples for both Arm 64-bit and Arm
    32-bit mode.
    
    Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
    b49020 committed Jan 2, 2024
    Configuration menu
    Copy the full SHA
    03a21ba View commit details
    Browse the repository at this point in the history