summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2018-11-07 10:54:01 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2018-11-28 17:34:38 +0100
commit99914a58a2d5b2638e2c1fdac5ca74a2d247e6fa (patch)
tree18661bc142ff60e6d1e596ae6d4fc5193774f07c /README.md
parentb0899d3e0d83457403fa6195a3448d9d6610adb6 (diff)
First simple platform-info API implementationguppy_6.99.2guppy/6.99.26.99.2
Bug-AGL: SPEC-1917 Change-Id: I300155302c9d69c6549ddabc6af53e2ad55eb18d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'README.md')
-rw-r--r--README.md47
1 files changed, 47 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..1222e31
--- /dev/null
+++ b/README.md
@@ -0,0 +1,47 @@
+# agl-service-platform-info
+
+AF binding that reads system and platform information and expose them through
+its API. The binding reads all files within /etc/platform-info directory and try
+to serialize them as JSON. Then you could access to a JSON object using a
+doted path.
+
+i.e: **build.machine.model** or **build.id**
+
+## Setup
+
+```bash
+git clone --recursive https://github.com/iotbzh/agl-service-platform-info
+cd agl-service-platform-info
+#setup your build environement
+. /xdt/sdk/environment-setup-aarch64-agl-linux
+#build your application
+./conf.d/autobuild/agl/autobuild package
+```
+
+## Build for 'native' Linux distros (Fedora, openSUSE, Debian, Ubuntu, ...)
+
+```bash
+./conf.d/autobuild/linux/autobuild package
+```
+
+## Deploy
+
+### AGL
+
+```bash
+export YOUR_BOARD_IP=192.168.1.X
+export APP_NAME=agl-service-platform-info
+scp build/${APP_NAME}.wgt root@${YOUR_BOARD_IP}:/tmp
+ssh root@${YOUR_BOARD_IP} afm-util install /tmp/${APP_NAME}.wgt
+APP_VERSION=$(ssh root@${YOUR_BOARD_IP} afm-util list | grep ${APP_NAME}@ | cut -d"\"" -f4| cut -d"@" -f2)
+ssh root@${YOUR_BOARD_IP} afm-util start ${APP_NAME}@${APP_VERSION}
+```
+
+## Usage
+
+### Get verb
+
+```bash
+afb-client-demo ws://localhost:1234/api?token= platform-info get ".build.layers.agl-manifest.revision"
+{"response":"7383840-dirty","jtype":"afb-reply","request":{"status":"success","uuid":"3ab64378-44ac-45d1-ad1a-9db7c6c33545"}}
+```