Skybian is an Armbian-based Operating System that contains the Skycoin's Skywire software and it's dependencies.
Currently, the following SBCs (Single Board Computer) are supported:
- Orange Pi Prime
- Orange Pi 3
- Raspberry Pi 1, 2, 3 and 4 (32-bit and 64-bit images are available)
This repository has two main components. The first is a script for building a base Skybian image. The second is a tool named skyimager
, that downloads a base Skybian image, and generates a number of final Skybian images (based on the provided options by the user).
At the time of writing, only building on Linux is supported.
Golang 1.13+ is requred.
Additional dependencies for building Skybian base image:
rsync wget 7z cut awk sha256sum gzip tar e2fsck losetup resize2fs truncate sfdisk qemu-aarch64-static go
For Debian-based linux distributions, you can install these via:
$ sudo apt update && sudo apt install -y p7zip-full qemu-user-static build-essential crossbuild-essential-arm64
On Arch-based distributions, to satisfy the qemu-aarch64-static
dependency, one can install the qemu-arm-static
AUR package.
Additional dependencies for building skyimager-gui
:
The GUI uses the Fyne library. The prerequisites for Fyne can be found here: https://fyne.io/develop/index
Both the script to build the Skybian base image, as well as the script to build skyimager-gui
are configured via build.conf
.
To build the Skybian base image, run:
$ make build-skybian-img
To build skyimager-gui
, run:
$ make build-skyimager-gui
The build.sh
script orchestrates the Skybian image build process.
It's supplemented by files in the static
folder where auxiliary scripts and systemd service files reside.
Running the script will create a folder named output
containing:
parts
- Where downloaded or compiled components such as the Armbian, Skywire andskyconf
are stored.image
- Where the temporary image is stored during the build process.mnt
- Used as a mount point for the image. Scripts will be copied and executed for the image being built.final
- Where the final image is stored.
- Make sure your remote is set to a branch on origin.
- Update
CHANGELOG
as required. - Change
VERSION
variable withinbuild.conf
. - Do
git add . && git commit -m "<your-commit-msg>"
. - Run
make tag
. Travis will prepare a release draft at https://github.com/skycoin/skybian/releases - Edit the draft and publish.
Final Skybian images have boot parameters written to the Master Boot Record section of the image. The encoded boot parameters have a maximum size of 216 bytes, and is located at offset +0E0
(The bootstrap code area part 2).
Boot parameters determine what is, and what is not done when booting the OS.
Values of the boot parameters are separated by 0x1F
characters. The values are of the following order:
MD
: The operating mode of the node. Current valid values are:0x00
(Hypervisor),0x01
(Visor).IP
: The local IP address. Only IPv4 compatible addresses are supported.GW
: The gateway IP address. Only IPv4 compatible addresses are supported.SS
: The passcode for theskysocks
app (Only valid ifMD=0x01
- Visor).HVS
: Delegated hypervisor public keys. (Only valid ofMD=0x01
- Visor).
These values can be written by the skyimager-gui
(provided in this repo) with user-provided options.
- respectively located in
/usr/bin
are:skyconf
skybian-firstrun
skywire-cli
skywire-visor
- Skywire visor systemd service file is located in
/etc/systemd/system/skywire-visor.service
- Skywire visor file is located in
/etc/skywire-visor.config
- DMSGPTY
"authorization_file": "/var/skywire-visor/dsmgpty/whitelist.json",
"cli_address": "/run/skywire-visor/dmsgpty/cli.sock"
- Transports
"log_store": {"type": "file", "location": "/var/skywire-visor/transports" },
- Launcher
"bin_path": "/usr/bin/apps",
"local_path": "/var/skywire-visor/apps"
- Binaries are located in
/usr/bin/apps
:skychat
skysocks
skysocks-client
vpn-client
vpn-server
- Logs are stored in
/var/skywire-visor/apps
:
- networking defaults are located in
/etc/NetworkManager/system-connections
:Wired connection 1
(wrt. LAN)Wireless connection 1
(wrt. WIFI)