Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

This repository contains the fula dockers that runs on Linux and is responsible for managing the over the air update, blockchain and protocol services

NotificationsYou must be signed in to change notification settings

functionland/fula-ota

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Linux Prequestics

Install Docker Engine

curl -fsSL https://get.docker.com -o get-docker.shsudo sh get-docker.sh

Optionally, manage Docker as a non-root user by following the instructions atManage Docker as a non-root user.

sudo groupadd dockersudo usermod -aG docker$USERnewgrp docker

Install Docker Compose 1.29.2

sudo curl -L"https://github.com/docker/compose/releases/download/v2.16.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-composesudo chmod +x /usr/local/bin/docker-composesudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

Clone the repository to your system:

git clone https://github.com/functionland/fula-ota

Install NetworkManager and set it to start automatically on boot

sudo systemctl start NetworkManagersudo systemctlenable NetworkManager

Automount

If your OS does not support auto-mounting you need to do this step. On raspberry pi, it is not needed as raspbian supports auto-mount, but on Armbian it is needed.

1. Install dependencies

sudo apt install net-tools dnsmasq-base rfkill git

2. create automount script

sudo nano /usr/local/bin/automount.sh

And then fill it with:

#!/bin/bashMOUNTPOINT="/media/pi"DEVICE="/dev/$1"MOUNTNAME=$(echo$1| sed's/[^a-zA-Z0-9]//g')mkdir -p${MOUNTPOINT}/${MOUNTNAME}# Determine filesystem typeFSTYPE=$(blkid -o value -s TYPE${DEVICE})if [${FSTYPE}="ntfs" ];then# If filesystem is NTFS# uid and gid specify the owner and the group of files.# dmask and fmask control the permissions for directories and files. 0000 gives everyone read and write access.    mount -t ntfs -o uid=pi,gid=pi,dmask=0000,fmask=0000${DEVICE}${MOUNTPOINT}/${MOUNTNAME}elif [${FSTYPE}="vfat" ];then# If filesystem is FAT32    mount -t vfat -o uid=pi,gid=pi,dmask=0000,fmask=0000${DEVICE}${MOUNTPOINT}/${MOUNTNAME}else# For other filesystem types    mount${DEVICE}${MOUNTPOINT}/${MOUNTNAME}# Changing owner for non-NTFS and non-FAT32 filesystems    chown pi:pi${MOUNTPOINT}/${MOUNTNAME}fi

And make it executable:

sudo chmod +x /usr/local/bin/automount.sh

3. create a service

3.1. rules
sudo nano /etc/udev/rules.d/99-automount.rules

and fill it with:

ACTION=="add", KERNEL=="sd[a-z][0-9]", TAG+="systemd", ENV{SYSTEMD_WANTS}="automount@%k.service"ACTION=="add", KERNEL=="nvme[0-9]n[0-9]p[0-9]", TAG+="systemd", ENV{SYSTEMD_WANTS}="automount@%k.service"    ACTION=="remove", KERNEL=="sd[a-z][0-9]", RUN+="/bin/systemctl stop automount@%k.service"ACTION=="remove", KERNEL=="nvme[0-9]n[0-9]p[0-9]", RUN+="/bin/systemctl stop automount@%k.service"
3.2 service

Create file:

sudo nano /etc/systemd/system/automount@.service

and add content:

[Unit]Description=Automount disksBindsTo=dev-%i.deviceAfter=dev-%i.device    [Service]Type=oneshotRemainAfterExit=yesExecStart=/usr/local/bin/automount.sh %IExecStop=/usr/bin/sh -c'/bin/umount /media/pi/$(echo %I | sed's/[^a-zA-Z0-9]//g'); /bin/rmdir /media/pi/$(echo %I | sed's/[^a-zA-Z0-9]//g')'

And now restart the service with

sudo udevadm control --reload-rulessudo systemctl daemon-reload

And you can check the status of each service (that is created per attached device):

    systemctl status automount@sda1.service

Install Fula OTA

First install dependencies:

sudo apt-get install gcc python3-dev python-is-python3 python3-pipsudo apt-get install python3-gi python3-gi-cairo gir1.2-gtk-3.0sudo apt install net-tools dnsmasq-base rfkill lshw

For board installation Navigate to thefula directory and give it permission to execute:

cd docker/fxsupport/linuxsudo bash ./fula.sh rebuildsudo bash ./fula.sh start

THIS IS THE END OF INSTALLATION ON THE BOARD

Building Docker Images

If you want to build images and push to docker (not on the client) you can follow the below steps.

Run following commands

cd docker#for testing#source env_test.sh#for releasingsource env_release.shbash ./build_and_push_images.sh

this command will push docker images into docker.io

📖 Script Commands Reference on rpi board

CommandDescription
installStart the installer.
startStart all containers.
restartRestart all containers (same as start).
stopStop all containers.
rebuildRebuild generated installation assets.
updatePull latest docker images.
helpList all commands.

About

This repository contains the fula dockers that runs on Linux and is responsible for managing the over the air update, blockchain and protocol services

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp