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 "uuid": "a-unique-id",
39 "description": "A description",
42 "arch": "architecture",
43 "path": "path where sdk installed locally",
44 "url": "https://website.url.to.download.sdk",
45 "status": "Not Installed | Installed",
46 "date": "2017-12-25 00:00",
48 "md5sum": "123456789",
49 "setupFile": "path to file to setup SDK environment"
51 "name": "My SDK name 2",
52 "description": "A description 2",
61 Update sdk database that may be used by `list` command.
63 ## `get-family-config`
65 Returned SDK configuration as JSON format:
70 "description": "bla bla",
71 "rootDir": "/yyy/zzz",
72 "envSetupFilename": "my-envfilename*",
73 "scriptsDir": "scripts_path"
79 - `familyName` : sdk familyName (usually same name used as xxx directory)
80 - `rootDir` : root directory where SDK are/will be installed
81 - `envSetupFilename` : sdk files (present in each sdk) that will be sourced to
86 Extract SDK info, such as name, version, ... from a SDK tarball file (when
87 --file option is set) or from a url (when --url option is set).
89 This script may also be used to check that a SDK tarball file is correct in
90 order to determine for example that the SDK family.
92 List of parameters to implement:
94 - `-f|--file <filepath>` : SDK tarball file used to get SDK info
95 - `-u|--url <url>` : url link used to get SDK info
96 - `--md5` : md5sum value used to validate SDK tarball file
97 - `-h|--help` : display help
99 This script returns an error (value different from 0) and potential print an
100 error message. Else when info are successfully extracted, this script must
101 returned the following JSON structure:
105 "name": "My SDK name",
106 "uuid": "a-unique-id",
107 "description": "A description",
108 "profile": "profile",
109 "version": "version",
110 "arch": "architecture",
112 "url": "https://website.url.to.download.sdk",
113 "status": "Not Installed",
114 "date": "2017-12-25 00:00",
116 "md5sum": "123456789",
117 "setupFile": "path to file to setup SDK environment"
123 Remove an existing SDK
125 The first argument is the full path of the directory of the SDK to removed.