Skip to content

Commit

Permalink
Add support of Orange Pi3 board (lf-edge#293)
Browse files Browse the repository at this point in the history
Signed-off-by: Vitalii Tykhenko <vitaliyt75@gmail.com>

- Add support of new Orange Pi3 board.
- It is interesting to know how easy it is to run a project on various mini SBC
Vitalii55 authored Apr 14, 2021
1 parent b1e731f commit 9e190bf
Showing 3 changed files with 91 additions and 5 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -25,9 +25,9 @@ You can see our project roadmap and details about release notes since our projec

## Platforms supported

| **x86-64 Linux** | **Raspberry Pi3** | **HiKey960** | **Raspberry Pi3 Cluster** |
|------------------|-------------------|--------------|---------------------------|
|[![](docs/platforms/x86_64_linux/x86_64_linux.png)](docs/platforms/x86_64_linux/x86_64_linux.md)|[![](docs/platforms/raspberry_pi3/raspberry_pi3.jpg)](docs/platforms/raspberry_pi3/raspberry_pi3.md)|[![](docs/platforms/hikey960/hikey960.png)](docs/platforms/hikey960/hikey960.md)|[![](docs/platforms/raspberry_pi3_cluster/raspberry_pi3_cluster.jpg)](docs/platforms/raspberry_pi3_cluster/raspberry_pi3_cluster.md)|
| **x86-64 Linux** | **Raspberry Pi3** | **HiKey960** | **Raspberry Pi3 Cluster** | **Orange Pi3** |
|------------------|-------------------|--------------|---------------------------|----------------|
|[![](docs/platforms/x86_64_linux/x86_64_linux.png)](docs/platforms/x86_64_linux/x86_64_linux.md)|[![](docs/platforms/raspberry_pi3/raspberry_pi3.jpg)](docs/platforms/raspberry_pi3/raspberry_pi3.md)|[![](docs/platforms/hikey960/hikey960.png)](docs/platforms/hikey960/hikey960.md)|[![](docs/platforms/raspberry_pi3_cluster/raspberry_pi3_cluster.jpg)](docs/platforms/raspberry_pi3_cluster/raspberry_pi3_cluster.md)|[![](docs/platforms/orange_pi3/orange_pi3.jpg)](docs/platforms/orange_pi3/orange_pi3.md)|

---

@@ -61,6 +61,7 @@ Please select the target platform in the table below and follow the link.
| [Raspberry Pi3] | coconut |
| [HiKey960] | coconut |
| [Raspberry Pi3 Cluster] | coconut |
| [Orange Pi3] | coconut |

---

@@ -73,7 +74,7 @@ You can also familiarize yourself with other materials and plans by visiting the
## License
The Edge Orchestration source code is distributed under the [Apache License, Version 2.0](https://opensource.org/licenses/Apache-2.0) open source license.

---
---

## Contributing
If you want to contribute to the Edge Orchestration project and make it better, your help is
@@ -89,4 +90,4 @@ coding on Github, new technologies and and their ecosystems.
[Raspberry Pi3]: docs/platforms/raspberry_pi3/raspberry_pi3.md
[HiKey960]: docs/platforms/hikey960/hikey960.md
[Raspberry Pi3 Cluster]: docs/platforms/raspberry_pi3_cluster/raspberry_pi3_cluster.md

[Orange Pi3]: docs/platforms/orange_pi3/orange_pi3.md
Binary file added docs/platforms/orange_pi3/orange_pi3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
85 changes: 85 additions & 0 deletions docs/platforms/orange_pi3/orange_pi3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Edge Orchestration on Orange Pi 3

[![Orange Pi 3](orange_pi3.jpg)](http://www.orangepi.org/Orange%20Pi%203/)

## Preparing Orange Pi 3 board

#### 1. Creating an image and writing Orangepi on a SD card
1. Download Ubuntu image for Orange Pi 3 from (http://www.orangepi.org/downloadresources/).
2. To install the Orangepi operating system follow the [instructions](http://www.orangepi.org/Docs/SDcardinstallation.html).

> SD card must be at least 16 Gb
#### 2. Start Orange Pi 3

Insert the SD card into the Orange Pi 3 and turn on the power. Make configuration settings for the Orange the first time you turn it on.

---

## Quick start
This section provides how to download and run pre-built Docker image without building the project.

> TBD
---

## How to build
There are two options for building a edge-orchestration container:
1. On your PC and downloading the edge-orchestration container image from the `edge-orchestration.tar` archive (recommended).
2. Build directly on the Orange Pi 3 board.
### 1. Using your PC

Prerequisites: install the qemu packages
```shell
$ sudo apt-get install qemu binfmt-support qemu-user-static
```

Run the `./build.sh` script and specify the build parameters - `container`, architecture - `arm64` (in the case of building in protected mode, add `secure`), see examples below:
```shell
$ ./build.sh container arm64
```
or for protected mode:
```shell
$ ./build.sh container secure arm64
```
the build result will be `edge-orchestration.tar` archive that can be found `bin/edge-orchestration.tar`

Next, need to copy `edge-orchestration.tar` archive to the Paspberry Pi 3 board, install the docker container (see [here](../x86_64_linux/x86_64_linux.md#Build-Prerequisites) only docker part) and load the image using the command:
```shell
$ docker load -i edge-orchestration.tar
```
The build is finished, how to run see [here](../x86_64_linux/x86_64_linux.md#how-to-work). If you find the issue with Curl Example then please reboot board and run Edge Orchestration container again.

### 2. Build directly on the Orange Pi 3 board
#### Build Prerequisites
- docker

```sh
$ sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
$ sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
$ curl -sSL https://get.docker.com | sh
$ sudo usermod -aG docker $USER
$ newgrp docker
```

> For [execution of docker commands with non-root privileges](https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user) you need to add `$USER` to docker group.
`$ sudo usermod -aG docker $USER`

- go compiler (install a version not lower than 1.12.5)

```sh
$ wget https://dl.google.com/go/go1.16.2.linux-arm64.tar.gz
$ tar -C $HOME -xvf go1.16.2.linux-arm64.tar.gz
$ export GOPATH=$HOME/go
$ export PATH=$PATH:$GOPATH/bin
```

- edge-orchestration source code

```sh
$ git clone https://github.com/lf-edge/edge-home-orchestration-go.git

```
The build is described [here](../x86_64_linux/x86_64_linux.md#how-to-build).

The build is finished, how to run see [here](../x86_64_linux/x86_64_linux.md#how-to-work).

0 comments on commit 9e190bf

Please sign in to comment.