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¶
Ensure 32 bit PYTHON 3 is installed.
You can download it from https://www.python.org/downloads/.
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.
Follow Section 4.1 Windows Build and build the
sssapisw
.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
Once virtualenv is installed, create a new virtual environemnt:
python -m virtualenv venv
To activate the new created virtual ENV Run:
call venv\Scripts\activate.bat
- 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
To install
ssscli
tool, run the following commands:cd src pip install --editable .
Alternately can install
ssscli
tool, by running following commands:cd src python setup.py develop
9.3.1.2. i.MX¶
Ensure PYTHON 3 is installed.
refer to Section 11.5.1 platform-imx-linux
Ensure func-timeout module is installed:
pip3 install func-timeout
Follow Section 4.4 i.MX Linux Build and build the
sssapisw
.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¶
Ensure PYTHON 3 is installed.
Ensure python3-pip, python3-dev and libffi-dev are installed:
sudo apt-get install python3-pip python3-dev libffi-dev
Follow Section 4.5 Raspberry Pi Build and build the
sssapisw
.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
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.