This repository was archived by the owner on Dec 26, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +83
-29
lines changed Expand file tree Collapse file tree 7 files changed +83
-29
lines changed Original file line number Diff line number Diff line change @@ -101,3 +101,5 @@ resolv.conf
101
101
output_base /
102
102
_build_endpoint /
103
103
endpoint. * .update
104
+ .repo
105
+ legato /
Original file line number Diff line number Diff line change @@ -106,37 +106,9 @@ $ sudo apt-get install -y \
106
106
zlib1g-dev
107
107
```
108
108
109
- Create a workspace
110
-
111
- ``` shell
112
- $ mkdir -p workspace
113
- $ cd workspace
114
- ```
115
-
116
- Clone a specific version of ` legato ` . The ` 19.07.0 ` is the preferred stable version.
117
-
118
- ``` shell
119
- $ repo init -u git://github.com/legatoproject/manifest -m legato/releases/19.07.0.xml # specific legato 19.07.0 version
120
- $ repo sync
121
- ```
122
-
123
- Build legato as native target
124
-
125
- ``` shell
126
- $ cd legato
127
- $ make localhost
128
- ```
129
-
130
- Checkout the shell to legato shell
109
+ Use GNU Make to build endpoint application at the root directory of tangle-accelerator.
131
110
132
111
``` shell
133
- $ source framework/tools/scripts/configlegatoenv
134
- ```
135
-
136
- Finally, use GNU Make to build endpoint application at the root directory of tangle-accelerator.
137
-
138
- ``` shell
139
- $ cd tangle-accelerator
140
112
$ make legato # build endpoint as native target
141
113
```
142
114
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -uo pipefail
4
+
5
+ COMMON_FILE=" tests/endpoint/common.sh"
6
+
7
+ if [ ! -f " $COMMON_FILE " ]
8
+ then
9
+ echo " $COMMON_FILE is not exists."
10
+ echo " Always execute this script in top-level directory."
11
+ exit 1
12
+ fi
13
+ source $COMMON_FILE
14
+
15
+ download_legato_repo
16
+ build_legato_repo
Original file line number Diff line number Diff line change 4
4
# terms of the MIT license. A copy of the license can be found in the file
5
5
# "LICENSE" at the root of this distribution.
6
6
7
+ export LEGATO_ROOT := $(PWD ) /legato
8
+ export PATH := $(LEGATO_ROOT ) /bin:$(LEGATO_ROOT ) build/localhost/framework/bin:$(PATH )
9
+ export LEGATO_TARGET := localhost
10
+
7
11
platform-build-command = \
12
+ sh -c "endpoint/build-legato.sh"; \
8
13
cd endpoint && mkapp -v -t localhost -C -DENABLE_ENDPOINT_TEST $(LEGATO_FLAGS ) endpoint.adef;
Original file line number Diff line number Diff line change
1
+ LEGATO_VERSION=" 20.04.0"
2
+
3
+ function download_legato_repo(){
4
+ echo " Downloading Legato AF"
5
+ repo init -u git://github.com/legatoproject/manifest -m legato/releases/${LEGATO_VERSION} .xml
6
+ repo sync
7
+ }
8
+
9
+ function build_legato_repo(){
10
+ if [ ! -d " legato" ]; then
11
+ echo " Please download the Legato AF first"
12
+ exit 1
13
+ fi
14
+
15
+ if [ ! -f " legato/Makefile" ]; then
16
+ echo " The Makefile inside legato project is missing"
17
+ echo " Please remove the legato directory and download Legato AF again."
18
+ exit 1
19
+ fi
20
+
21
+ echo " Building Legato AF"
22
+ make -C legato localhost
23
+ }
24
+
25
+ function setup_leaf(){
26
+ if ! which " leaf"
27
+ then
28
+ echo " Please install Legato leaf first"
29
+ exit 1
30
+ fi
31
+ leaf --non-interactive setup legato-latest -p " $1 "
32
+ }
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -uo pipefail
4
+
5
+ COMMON_FILE=" tests/endpoint/common.sh"
6
+
7
+ if [ ! -f " $COMMON_FILE " ]
8
+ then
9
+ echo " $COMMON_FILE is not exists."
10
+ exit 1
11
+ fi
12
+ source $COMMON_FILE
13
+
14
+ # setup WP77 leaf shell
15
+ setup_leaf " swi-wp77_3.4.0"
16
+
17
+ make TESTS=true TARGET=wp77xx EP_TA_HOST=node.deviceproof.org EP_TA_PORT=5566 legato && \
18
+ tar zcf endpoint.tgz endpoint/_build_endpoint/wp77xx/app/endpoint/staging/read-only/
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -uo pipefail
4
+
5
+ # Create endpoint app
6
+ make EP_TA_HOST=node.deviceproof.org EP_TA_PORT=5566 legato
7
+
8
+ # Run endpoint app test here
9
+ endpoint/_build_endpoint/localhost/app/endpoint/staging/read-only/bin/endpoint
You can’t perform that action at this time.
0 commit comments