9.3. Steps needed before running ssscli tool

9.3.1. Once per installation

The following steps are needed once per installation.

9.3.1.1. Windows

  1. Ensure 32 bit PYTHON 3 is installed.

    You can download it from https://www.python.org/downloads/.

  2. Environment to build host library is setup (GCC/MinGW/Visual Studio)

    Note

    This is required so that DLL/.SO can be prepared to be used by the CLI Tool.

  3. Follow Section 4.1 Windows Build and build the sssapisw.

  4. It is recommended to install the cli tool via virtualenv.

    See https://virtualenv.pypa.io/en/latest/ and https://docs.python-guide.org/dev/virtualenvs/#lower-level-virtualenv to understand more about virtualenv

    Run:

    pip3 install virtualenv
    
  5. Once virtualenv is installed, create a new virtual environemnt:

    python -m virtualenv venv
    
  6. To activate the new created virtual ENV Run:

    call venv\Scripts\activate.bat
    
  7. In the new installed virtualenv, install required packages. This includes click, cryptography and func-timeout.
    • click: To parse command line parameter.

    • cryptography: Load keys, certificates and generate reference keys.

    • func-timeout: ssscli recovery mechanism in case of no response from hardware.

    Change directory to <SE05X_root_folder>/simw-top/pycli and run:

    pip install -r requirements.txt
    
  8. To install ssscli tool, run the following commands:

    cd src
    pip install --editable .
    
  9. Alternately can install ssscli tool, by running following commands:

    cd src
    python setup.py develop
    

9.3.1.2. i.MX

  1. Ensure PYTHON 3 is installed.

    refer to Section 11.5.1 platform-imx-linux

  2. Ensure func-timeout module is installed:

    pip3 install func-timeout
    
  3. Follow Section 4.4 i.MX Linux Build and build the sssapisw.

  4. To install ssscli tool, change directory to <SE05X_root_folder>/simw-top/pycli/src and run the following command:

    python3 setup.py develop
    

9.3.1.3. Raspberry Pi

  1. Ensure PYTHON 3 is installed.

  2. Ensure python3-pip, python3-dev and libffi-dev are installed:

    sudo apt-get install python3-pip python3-dev libffi-dev
    
  3. Follow Section 4.5 Raspberry Pi Build and build the sssapisw.

  4. Ensure click, cryptography and func-timeout modules are installed. To install these modules, change directory to <SE05X_root_folder>/simw-top/pycli and run the following command:

    pip3 install -r requirements.txt
    
  5. To install ssscli tool, run the following commands:

    cd src
    sudo python3 setup.py develop
    

9.3.2. Communication interface (cmake SMCOM setting)

The communication interface to the secure element used by the ssscli tool is determined by the native shared library used. The communication interface supported by the shared library is controlled by the cmake SMCOM value.

To change the communication interface only the native ssscli DLL / .so needs to be rebuilt.

The shared library can be compiled with MSVC/MinGW/XCode/GCC based on the selected platform.