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 # invoke this only once
    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
    
    ${doPTMW_Applet_A71CH_ON}                  ${doPTMW_Host_evkmimxrt1060_ON}
    ${doPTMW_SE05X_Auth_AESKey_ON}             ${doPTMW_SE05X_Auth_None_ON}
    ${doPTMW_Applet_A71CL_ON}                  ${doPTMW_Host_frdmk64f_ON}
    ...
    ...
    ${doPTMW_Host_Win10IoT_ON}                 ${doPTMW_SCP_SCP03_SSS_ON}
    
    cmake ${doPTMW_SE05X_Auth_UserID_ON} .
    cmake --build .
    

Note

The SW package also includes an install script (scripts/imx/se05x_mw_install.sh) that assists in installing the Plug&Trust MW on the iMX:

  • Copy the Plug&Trust MW zip file into directory /home/root/install

  • Copy the install script scripts/imx/se05x_mw_install.sh into directory /home/root/install

  • Execute:

    cd /home/root/install
    chmod 755 se05x_mw_install.sh
    ./se05x_mw_install.sh <Plug&Trust>.zip
    

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 A subset of these examples is installed (upon executing make install) in /usr/local/bin.

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