4.4. i.MX Linux Build

4.4.1. Prerequisite

Linux should be running on e.g. the MCIMX8M-EVK or MCIMX6UL-EVK development board. Refer to Setup i.MX 8MQuad - MCIMX8M-EVK for details on preparing the platform.

4.4.2. Build Instructions

  1. Copy the plug and trust middleware package to the i.MX file system

  2. Execute the below commands to build and install the se05x libraries on the system:

    cd simw-top
    python scripts/create_cmake_projects.py
    cd ../simw-top_build/imx_native_se050_t1oi2c
    cmake --build .
    make install
    ldconfig /usr/local/lib
    

    Default cmake options are shown below:

    Applet                           SE050_C
    Host                             iMXLinux
    HostCrypto                       OPENSSL
    IOT                              GCP
    OpenSSL                          1_1_1
    RTOS                             Default
    SCP                              None
    SE05X_Auth                       None
    SMCOM                            T1oI2C
    WithCodeCoverage                 OFF
    WithNXPNFCRdLib                  OFF
    WithSSS_TestCounterPart          ON
    WithSharedLIB                    OFF
    mbedTLS_ALT                      None
    

    To get the list of enabled cmake options, execute the following command from the build area:

    cmake -L .
    
  3. If required cmake options can be changed and libraries can be rebuilt and installed. Refer to CMake

    cd simw-top_build/imx_native_se050_t1oi2c
    ccmake .
    

    ccmake (i.e. a text-ui to cmake) is not available by default on the Yocto distribution for i.MX.

    An alternative approach to change cmake options is to set them on the command line.

    Explicitly overruling cmake options (in this case changing SE05X_Auth to UserID):

    cd simw-top_build/imx_native_se050_t1oi2c
    cmake -DSE05X_Auth=UserID .
    cmake --build .
    

    An easier approach is to use the script simw-top/scripts/cmake_options to enable command line completion of the available cmake options. First source the convenience script (simw-top/scripts/cmake_options). In the fragment below the SW is built with the same SE05X_Auth option as above:

    cd simw-top
    source scripts/cmake_options.sh
    cd simw-top_build/imx_native_se050_t1oi2c
    echo ${do # type double tab to enable command line completion hints
    
    ${doApplet_A71CH_ON}                       ${doHost_evkbimxrt1050_ON}
    ${doSE05X_Auth_AppletSCP03_ON}             ${doSE05X_Auth_None_ON}
    ${doApplet_A71CL_ON}                       ${doHost_frdmk64f_ON}
    ...
    ...
    ${doHost_Win10IoT_ON}                      ${doSCP_SCP03_SSS_ON}
    
    cmake ${doSE05X_Auth_UserID_ON} .
    cmake --build .
    

4.4.3. SSS Examples

Above build steps will also create a few examples that illustrate the usage of se05x. Location - simw-top_build/imx_native_se050_t1oi2c/bin

Refer to Demo and Examples for details on these examples and for running cloud/tls demo applications