aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/sdks/README.md
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2018-01-04 23:40:25 +0100
committerSebastien Douheret <sebastien.douheret@iot.bzh>2018-01-04 23:40:25 +0100
commit1a8b7603899f30f052ad123b7607b45a6d4c8772 (patch)
tree70323c3a7eee98289cc48c596e2a855c6045453b /scripts/sdks/README.md
parentf2eecfb601acc6c67fb52bf2edda93505bc44da5 (diff)
Improved and fixed local SDK tarball installation.
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'scripts/sdks/README.md')
-rw-r--r--scripts/sdks/README.md97
1 files changed, 71 insertions, 26 deletions
diff --git a/scripts/sdks/README.md b/scripts/sdks/README.md
index 8b741ec..97bae21 100644
--- a/scripts/sdks/README.md
+++ b/scripts/sdks/README.md
@@ -5,35 +5,31 @@ To support a new SDK family, you must create a new directory under
Then you must create the following scripts (or executable) :
-- `get-config`: returned SDK configuration structure
-- `list`: returned the list of installed SDKs
- `add`: add a new SDK
+- `db-dump`: returned the list of available SDKs (JSON format)
+- `db-update`: update SDKs database
+- `get-family-config`: returned SDK family configuration structure (JSON format)
+- `get-sdk-info`: extract SDK info (JSON format) from a SDK file/tarball
- `remove`: remove an existing SDK
-## `get-config`
+## `add`
-Returned SDK configuration as json format:
+add a new SDK
-```json
-{
- "familyName": "xxx",
- "description": "bla bla",
- "rootDir": "/yyy/zzz",
- "envSetupFilename": "my-envfilename*",
- "scriptsDir": "scripts_path"
-}
-```
+This script returns code 0 when sdk is successfully installed, else returns an
+error code.
-where:
+List of parameters to implement:
-- `familyName` : sdk familyName (usually same name used as xxx directory)
-- `rootDir` : root directory where SDK are/will be installed
-- `envSetupFilename` : sdk files (present in each sdk) that will be sourced to
- setup sdk environment
+- `-f|--file <filepath>` : install a SDK using a file
+- `--force`: force SDK install when a SDK already in the same destination directory
+- `-u|--url <url>` : download SDK using this URL and then install it
+- `-no-clean` : don't cleanup temporary files
+- `-h|--help` : display help
-## `list`
+## `db-dump`
-Returned the list all SDKs (available and installed)
+Returned the list all SDKs (available and installed) using JSON format.
```json
[
@@ -59,18 +55,67 @@ Returned the list all SDKs (available and installed)
]
```
-## `add`
+## `db-update`
-add a new SDK
+Update sdk database that may be used by `list` command.
+
+## `get-family-config`
+
+Returned SDK configuration as JSON format:
+
+```json
+{
+ "familyName": "xxx",
+ "description": "bla bla",
+ "rootDir": "/yyy/zzz",
+ "envSetupFilename": "my-envfilename*",
+ "scriptsDir": "scripts_path"
+}
+```
+
+where:
+
+- `familyName` : sdk familyName (usually same name used as xxx directory)
+- `rootDir` : root directory where SDK are/will be installed
+- `envSetupFilename` : sdk files (present in each sdk) that will be sourced to
+ setup sdk environment
+
+## `get-sdk-info`
+
+Extract SDK info, such as name, version, ... from a SDK tarball file (when
+--file option is set) or from a url (when --url option is set).
+
+This script may also be used to check that a SDK tarball file is correct in
+order to determine for example that the SDK family.
List of parameters to implement:
-- `-f|--file <filepath>` : install a SDK using a file
-- `--force`: force SDK install when a SDK already in the same destination directory
-- `-u|--url <url>` : download SDK using this URL and then install it
-- `-no-clean` : don't cleanup temporary files
+- `-f|--file <filepath>` : SDK tarball file used to get SDK info
+- `-u|--url <url>` : url link used to get SDK info
+- `--md5` : md5sum value used to validate SDK tarball file
- `-h|--help` : display help
+This script returns an error (value different from 0) and potential print an
+error message. Else when info are successfully extracted, this script must
+returned the following JSON structure:
+
+```json
+{
+ "name": "My SDK name",
+ "description": "A description",
+ "profile": "profile",
+ "version": "version",
+ "arch": "architecture",
+ "path": "",
+ "url": "https://website.url.to.download.sdk",
+ "status": "Not Installed",
+ "date": "2017-12-25 00:00",
+ "size": "123 MB",
+ "md5sum": "123456789",
+ "setupFile": "path to file to setup SDK environment"
+}
+```
+
## `remove`
Remove an existing SDK