1 # SDKs management scripts
3 To support a new SDK family, you must create a new directory under
4 `scripts/sdk/xxx` where xxx is the new SDK family.
6 Then you must create the following scripts (or executable) :
9 - `db-dump`: returned the list of available SDKs (JSON format)
10 - `db-update`: update SDKs database
11 - `get-family-config`: returned SDK family configuration structure (JSON format)
12 - `get-sdk-info`: extract SDK info (JSON format) from a SDK file/tarball
13 - `remove`: remove an existing SDK
19 This script returns code 0 when sdk is successfully installed, else returns an
22 List of parameters to implement:
24 - `-f|--file <filepath>` : install a SDK using a file
25 - `--force`: force SDK install when a SDK already in the same destination directory
26 - `-u|--url <url>` : download SDK using this URL and then install it
27 - `-no-clean` : don't cleanup temporary files
28 - `-h|--help` : display help
32 Returned the list all SDKs (available and installed) using JSON format.
37 "name": "My SDK name",
38 "description": "A description",
41 "arch": "architecture",
42 "path": "path where sdk installed locally",
43 "url": "https://website.url.to.download.sdk",
44 "status": "Not Installed | Installed",
45 "date": "2017-12-25 00:00",
47 "md5sum": "123456789",
48 "setupFile": "path to file to setup SDK environment"
50 "name": "My SDK name 2",
51 "description": "A description 2",
60 Update sdk database that may be used by `list` command.
62 ## `get-family-config`
64 Returned SDK configuration as JSON format:
69 "description": "bla bla",
70 "rootDir": "/yyy/zzz",
71 "envSetupFilename": "my-envfilename*",
72 "scriptsDir": "scripts_path"
78 - `familyName` : sdk familyName (usually same name used as xxx directory)
79 - `rootDir` : root directory where SDK are/will be installed
80 - `envSetupFilename` : sdk files (present in each sdk) that will be sourced to
85 Extract SDK info, such as name, version, ... from a SDK tarball file (when
86 --file option is set) or from a url (when --url option is set).
88 This script may also be used to check that a SDK tarball file is correct in
89 order to determine for example that the SDK family.
91 List of parameters to implement:
93 - `-f|--file <filepath>` : SDK tarball file used to get SDK info
94 - `-u|--url <url>` : url link used to get SDK info
95 - `--md5` : md5sum value used to validate SDK tarball file
96 - `-h|--help` : display help
98 This script returns an error (value different from 0) and potential print an
99 error message. Else when info are successfully extracted, this script must
100 returned the following JSON structure:
104 "name": "My SDK name",
105 "description": "A description",
106 "profile": "profile",
107 "version": "version",
108 "arch": "architecture",
110 "url": "https://website.url.to.download.sdk",
111 "status": "Not Installed",
112 "date": "2017-12-25 00:00",
114 "md5sum": "123456789",
115 "setupFile": "path to file to setup SDK environment"
121 Remove an existing SDK
123 The first argument is the full path of the directory of the SDK to removed.