summaryrefslogtreecommitdiffstats
path: root/docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.4_xds-cli
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.4_xds-cli')
-rw-r--r--docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.4_xds-cli/3.4.4.4.0_Abstract.md17
-rw-r--r--docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.4_xds-cli/3.4.4.4.1_Build.md41
-rw-r--r--docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.4_xds-cli/3.4.4.4.2_Config.md59
-rw-r--r--docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.4_xds-cli/3.4.4.4.3_Commands.md123
-rw-r--r--docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.4_xds-cli/3.4.4.4.4_Debug.md42
5 files changed, 282 insertions, 0 deletions
diff --git a/docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.4_xds-cli/3.4.4.4.0_Abstract.md b/docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.4_xds-cli/3.4.4.4.0_Abstract.md
new file mode 100644
index 0000000..dad78f8
--- /dev/null
+++ b/docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.4_xds-cli/3.4.4.4.0_Abstract.md
@@ -0,0 +1,17 @@
+<!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/devguides/master/xds-docs-guides-devguides-book.yml -->
+
+# xds-cli: command-line tool for XDS
+
+`xds-cli` is a command-line tool for X(cross) Development System.
+
+This tool can be used in addition to `XDS Dashboard` to control XDS from command
+line.
+
+---
+
+Links to subchapters :
+
+- [Build from scratch](./1_build.html)
+- [Configuration](./2_config.html)
+- [Start-up](./3_commands.html)
+- [Debugging](./4_debug.html)
diff --git a/docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.4_xds-cli/3.4.4.4.1_Build.md b/docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.4_xds-cli/3.4.4.4.1_Build.md
new file mode 100644
index 0000000..3935054
--- /dev/null
+++ b/docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.4_xds-cli/3.4.4.4.1_Build.md
@@ -0,0 +1,41 @@
+<!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/devguides/master/xds-docs-guides-devguides-book.yml -->
+
+# How to build
+
+## Dependencies
+
+Install [Go](https://golang.org/doc/install) and some other tools.
+
+Refer to [Prerequisites chapter](../1_Prerequisites.html) for more details.
+
+## Building
+
+Clone sources under `$ROOTDIR/src/gerrit.automotivelinux.org/gerrit/src/xds/xds-cli`
+in order respect directory hierarchy that match Go package import logic (see
+[How to Write Go Code](https://golang.org/doc/code.html) for more details).
+
+Then use delivered Makefile :
+
+```bash
+# Declare ROOTDIR, can be any location (for example xds-build)
+ROOTDIR=$HOME/xds-build
+
+# Create directory hierarchy that match Go package import logic
+mkdir -p $ROOTDIR/src/gerrit.automotivelinux.org/gerrit/src/xds
+cd $ROOTDIR/src/gerrit.automotivelinux.org/gerrit/src/xds
+
+# Clone sources
+git clone https://gerrit.automotivelinux.org/gerrit/src/xds/xds-cli
+# or git clone ssh://YOUR_USERNAME@gerrit.automotivelinux.org:29418/src/xds/xds-cli
+
+# Build xds-cli
+# (note that GOPATH will correctly be set by Makefile)
+cd xds-cli
+make all
+```
+
+Generate xds-cli package / tarball
+
+```bash
+make package-all
+```
diff --git a/docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.4_xds-cli/3.4.4.4.2_Config.md b/docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.4_xds-cli/3.4.4.4.2_Config.md
new file mode 100644
index 0000000..4696d24
--- /dev/null
+++ b/docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.4_xds-cli/3.4.4.4.2_Config.md
@@ -0,0 +1,59 @@
+<!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/devguides/master/xds-docs-guides-devguides-book.yml -->
+
+# Configuration
+
+`xds-cli` configuration is defined either by environment variables or by
+setting command line options.
+
+Configuration through environment variables may also be defined in a file that
+will be sourced by `xds-cli` on start-up.
+
+Use `--config|-c` option or set `XDS_CONFIG` environment variable to specify the config file to use.
+
+So configuration is driven either by environment variables or by command line
+options or using a config file knowing that the following priority order is used:
+
+1. use option value (for example use project ID set by `--id` option),
+1. else use variable `XDS_xxx` (for example `XDS_PROJECT_ID` variable) when a
+ config file is specified with `--config|-c` option,
+1. else use `XDS_xxx` (for example `XDS_PROJECT_ID`) environment variable
+
+<!-- section-note -->
+**Note:**
+
+All parameters after a double dash (--) are considered as the command
+to execute on xds-server.
+<!-- end-section-note -->
+
+## Global Options / Configuration variables
+
+Following is the list of global options across all sub-commands.
+
+__`--config|-c` option or `XDS_CONFIG` env variable__
+
+Env config file to source on startup
+
+__`--log|-l` option or `XDS_LOGLEVEL` env variable__
+
+Logging level, supported levels are:
+
+- panic
+- fatal
+- error
+- warn
+- info
+- debug
+
+Default level is "error".
+
+**`--rpath` option or `XDS_PATH` env variable**
+
+Relative path into project
+
+**`timestamp|-ts` option or `XDS_TIMESTAMP` env variable**
+
+Prefix output with timestamp
+
+**`url` option or `XDS_AGENT_URL` env variable**
+
+Local XDS agent url (default: "localhost:8800")
diff --git a/docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.4_xds-cli/3.4.4.4.3_Commands.md b/docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.4_xds-cli/3.4.4.4.3_Commands.md
new file mode 100644
index 0000000..4feb8a2
--- /dev/null
+++ b/docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.4_xds-cli/3.4.4.4.3_Commands.md
@@ -0,0 +1,123 @@
+<!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/devguides/master/xds-docs-guides-devguides-book.yml -->
+
+# Commands
+
+## projects
+
+`projects` (short `prj`) command should be used to managed XDS projects.
+
+This command supports following sub-commands:
+
+```bash
+add, a Add a new project
+get Get a property of a project
+list, ls List existing projects
+remove, rm Remove an existing project
+sync Force synchronization of project sources
+```
+
+Here are some usage examples:
+
+```bash
+# Create/declare a new project
+xds-cli prj add --label "myProjectName" --type pm -p /home/seb/xds-workspace/myProject -sp /home/devel/xds-workspace/myProject
+
+# List projects
+xds-cli prj ls
+
+# Delete an existing project
+xds-cli prj rm 8e49
+```
+
+## sdks
+
+`sdks` (alias `sdk`) command should be used to managed cross SDKs.
+
+This command supports following sub-commands:
+
+```bash
+get Get a property of a SDK
+list, ls List installed SDKs
+install, i Install a SDK
+uninstall, rm UnInstall an existing SDK
+abort, a Abort an install action
+```
+
+Here are some usage examples:
+
+```bash
+# List existing SDKs
+xds-cli sdks ls
+
+# Get SDK info
+xds-cli sdks get c64d
+```
+
+<!-- section-note -->
+**Note:**
+
+Refer to the
+"[AGL SDKs](../../part-1/install-sdk.html)"
+topic for details about SDK installation.
+
+<!-- end-section-note -->
+
+## exec
+
+`exec` command should be used to exec command through XDS system.
+
+For example you can use this command to build your project in XDS system.
+
+This command supports following sub-commands:
+
+`exec` command options are:
+
+**`--id` option or `XDS_PROJECT_ID` env variable (**mandatory option**)**
+
+project ID you want to build
+
+**`--rpath` (short `-p`) or `XDS_RPATH` env variable**
+
+relative path into project
+
+**`--sdkid` (alias `--sdk`) or `XDS_SDK_ID` env variable (**mandatory option**)**
+
+Cross Sdk ID to use to build project.
+
+Here are some usage examples:
+
+```bash
+cd $MY_PROJECT_DIR
+mkdir build
+
+# Generate build system using cmake
+xds-cli exec --id=4021 --sdkid=c226 -- "cd build && cmake .."
+
+# Build the project
+xds-cli exec --id=4021 --sdkid=c226 -- "cd build && make all"
+```
+
+In case of `xds-agent` is not running on default url:port (that is `localhost:8800`)
+
+You can specify the url using `--url` option :
+
+```bash
+xds-cli --url=http://localhost:8800 exec --id=4021 --sdkid=c226 -- "cd build && make all"
+```
+
+## misc
+
+`misc` command allows to execute miscellaneous sub-commands such as:
+
+```bash
+version, v Get version of XDS agent and XDS server
+status, sts Get XDS configuration status (including XDS server connection)
+```
+
+Here are some usage examples:
+
+```bash
+xds-cli misc version --verbose
+
+xds-cli misc sts
+```
diff --git a/docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.4_xds-cli/3.4.4.4.4_Debug.md b/docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.4_xds-cli/3.4.4.4.4_Debug.md
new file mode 100644
index 0000000..311efaf
--- /dev/null
+++ b/docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.4_xds-cli/3.4.4.4.4_Debug.md
@@ -0,0 +1,42 @@
+<!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/devguides/master/xds-docs-guides-devguides-book.yml -->
+
+# Debugging
+
+## XDS cli architecture
+
+This tool is written in *Go*.
+
+```bash
+|
++-- bin/ # where xds-cli binary will be built
+|
++-- cmd-XXX.go # GO sources of each sub-commands
+|
++-- conf.d/ # Linux configuration and startup files (systemd user service)
+|
++-- glide.yaml # Go package dependency file
+|
++-- LICENSE # XDS cli license
+|
++-- main.go # main entry point (Go)
+|
++-- Makefile # makefile including
+|
++-- README.md # readme
+|
++-- scripts/ # hold various scripts used for installation
+|
++-- vendor/ # temporary directory to hold Go dependencies packages
+```
+
+## Debug
+
+Install first [Visual Studio Code](https://code.visualstudio.com/) and
+[Go plugin](https://marketplace.visualstudio.com/items?itemName=lukehoban.Go)
+(`ext install lukehoban.Go`)
+
+Visual Studio Code launcher settings can be found into `.vscode/launch.json`.
+
+Please follow instructions of xds-agent [debugging chapter](../2_xds-agent/4_debug.html#debug-xds-agent-go-code),
+knowing that you execute these same instructions in `xds-cli` repo, in other words
+by replacing *xds-agent* references by *xds-cli*.