8b741ec90c098d347ab7f671a7d715f31d983acd
[src/xds/xds-server.git] / scripts / sdks / README.md
1 # SDKs management scripts
2
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.
5
6 Then you must create the following scripts (or executable) :
7
8 - `get-config`: returned SDK configuration structure
9 - `list`: returned the list of installed SDKs
10 - `add`: add a new SDK
11 - `remove`: remove an existing SDK
12
13 ## `get-config`
14
15 Returned SDK configuration as json format:
16
17 ```json
18 {
19     "familyName": "xxx",
20     "description": "bla bla",
21     "rootDir": "/yyy/zzz",
22     "envSetupFilename": "my-envfilename*",
23     "scriptsDir": "scripts_path"
24 }
25 ```
26
27 where:
28
29 - `familyName` : sdk familyName (usually same name used as xxx directory)
30 - `rootDir` : root directory where SDK are/will be  installed
31 - `envSetupFilename` : sdk files (present in each sdk) that will be sourced to
32   setup sdk environment
33
34 ## `list`
35
36 Returned the list all SDKs (available and installed)
37
38 ```json
39 [
40   {
41     "name":         "My SDK name",
42     "description":  "A description",
43     "profile":      "profile",
44     "version":      "version",
45     "arch":         "architecture",
46     "path":         "path where sdk installed locally",
47     "url":          "https://website.url.to.download.sdk",
48     "status":       "Not Installed | Installed",
49     "date":         "2017-12-25 00:00",
50     "size":         "123 MB",
51     "md5sum":       "123456789",
52     "setupFile":    "path to file to setup SDK environment"
53   }, {
54     "name":         "My SDK name 2",
55     "description":  "A description 2",
56     ...
57   }
58   ...
59 ]
60 ```
61
62 ## `add`
63
64 add a new SDK
65
66 List of parameters to implement:
67
68 - `-f|--file <filepath>` :  install a SDK using a file
69 - `--force`:                force SDK install when a SDK already in the same destination directory
70 - `-u|--url <url>` :        download SDK using this URL and then install it
71 - `-no-clean` :             don't cleanup temporary files
72 - `-h|--help` :             display help
73
74 ## `remove`
75
76 Remove an existing SDK
77
78 The first argument is the full path of the directory of the SDK to removed.