SDK extensions#

The SimpleSwitch™ SDK now supports extensions. That means you can extent the SDK with support for e.g. language frameworks without the need to install a different SimpleSwitch™ SDK.

It even supports to use custom created extensions for your custom made SDK.

To manage these extensions a tool called simpleswitch-sdk-tool is used.

We are making use of GHCR to provide our extensions, so most of the commands will require you to provide credentials for Github, including username and a personal access token.

Github personal access token

To create a Github personal access token see Github container registry (GHCR)

To automatically provide this information to the tool you can export the following in the shell session on your local computer

$ export GITHUB_USERNAME="<your github username>"
$ export GITHUB_TOKEN="<your personal access token>"

Additional license agreements

For some of the downloaded SDK extensions you will need to agree on additional license terms and conditions. Otherwise the installed extension won’t be listed and can’t be used.

To check for not yet agreed conditions run

$ simpleswitch-sdk-tool eula-accept

to interactively look at additional terms and conditions and accept or reject them.

List extensions#

To list all extensions run from the sourced SimpleSwitch™ SDK

$ simpleswitch-sdk-tool list templates
c
python
browser

This will return all available extensions online and locally

You can also see what particular version of the extension is installed, by running

$ simpleswitch-sdk-tool list --detailed templates
c:2024.1
python:2024.3
browser:latest

List available extensions#

To list only the online available extensions run

$ simpleswitch-sdk-tool list online
c
python
browser

List locally installed extensions#

To list only the locally installed extensions run

$ simpleswitch-sdk-tool list local
c
python

Install extensions#

From GHCR#

To install a new extension run

$ simpleswitch-sdk-tool install "<name of the extension>"
$ simpleswitch-sdk-tool eula-accept

e.g.

$ simpleswitch-sdk-tool install python
$ simpleswitch-sdk-tool eula-accept

to install the Python SDK extension.

To install a specific version of the extension run

$ simpleswitch-sdk-tool install --version=<version> "<name of the extension>"
$ simpleswitch-sdk-tool eula-accept

To overwrite an existing installation run

$ simpleswitch-sdk-tool install --force "<name of the extension>"
$ simpleswitch-sdk-tool eula-accept

If that fails

If the installation fails with error messages like

tar: ... : Cannot open: Operation not permitted

or

No space left on device

likely your temporary storage is too small or inaccessible.

You can define a different location with the help of

  • From command line
  • From Vscode
    $ mkdir -p $HOME/.tmp
    $ TMPDIR=$HOME/.tmp simpleswitch-sdk-tool install "<name of the extension>"
    $ mkdir -p $HOME/.tmp
    $ export TMPDIR=$HOME/.tmp
    $ code

This step needs to be done only for the installation.

Source your SDK again

You will need to source the SDK again when working from CLI.

When working from vscode this is done automatically for you.

From a local installer#

To install an extension from a locally stored *.sh installer, run

$ simpleswitch-sdk-tool install --local-path="<path to the folder of the *.sh installer>" "<name of the extension>"

Source your SDK again

You will need to source the SDK again when working from CLI.

When working from vscode this is done automatically for you.

Update an extension#

To check for updates of an installed SDK extension run

$ simpleswitch-sdk-tool update "<name of the extension>"

e.g.

$ simpleswitch-sdk-tool update "python"
For the template python:sm2s-imx8plus an update to 2024.6 is available

then you can install the update by running

$ simpleswitch-sdk-tool install --force --version="2024.6" "python"
$ simpleswitch-sdk-tool eula-accept

Source your SDK again

You will need to source the SDK again when working from CLI.

When working from vscode this is done automatically for you.

Remove an extension#

To remove a locally installed extension run

$ simpleswitch-sdk-tool remove "<name of the extension>"

Source your SDK again

You will need to source the SDK again when working from CLI.

When working from vscode this is done automatically for you.

Get a command for a specific extension#

If you want to get a command line for a specific extension run

$ simpleswitch-sdk-tool get "<name of the extension>" '<command or command line>'

e.g.

$ simpleswitch-sdk-tool get "<name of the extension>" '${TARGET_PREFIX}-strip'
aarch64-simplecoredistro-linux-strip

Caution

The command always needs to be encapsulated by ' characters to avoid expansion in the current shell.

Additional license agreements#

To view and accept/reject additional license agreements run

$ simpleswitch-sdk-tool eula-accept

Source your SDK again

You will need to source the SDK again when working from CLI.

When working from vscode this is done automatically for you.

to just list not yet accepted agreements run

$ simpleswitch-sdk-tool eula-open