- Shell 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| overlays/RoninOS | ||
| scripts | ||
| build-roninos.sh | ||
| CHANGELOG | ||
| LICENSE.txt | ||
| README.md | ||
Introduction
RoninOS is customized to provide a "plug & play" experience for RoninDojo bitcoin nodes. This repository contains scripts for building RoninOS, which is possible thanks to the Armbian Build project. This README contains detailed instructions for regular users and developers.
RoninOS - Build Using x86
The following docker image build process has been tested using Debian 12 (bookworm) and Ubuntu 24.04 (noble). Testing includes standard x86 based deployments and virtual machines. Thanks to qemu-user-static, which is used for the execution of binaries compiled for different architectures, it is possible to build Armbian images for ARM architecture while using an x86 machine.
Docker Build Instructions:
-
Boot up Debian, Ubuntu, or Windows Subsystem Linux. Suggested resources for your machine (or virtual machine) is 8gb RAM and 50GB storage or greater.
-
Open terminal then run all commands below to install git, tor, and clone RoninOS repository over tor.
sudo apt-get update && sudo apt-get install git tor
git config --global --unset http.proxy
git config --global http.proxy socks5h://127.0.0.1:9050
git clone http://2l2o5umijiwxjioxwpsvwxe6pr75tj7r5rggnl5ze256guwvtee3kpqd.onion/Ronin/RoninOS.git
- Change to the RoninOS directory.
cd /$HOME/RoninOS/
- Run the build using any of the following options. On first run, you will be asked to reboot to apply changes first.
./build-roninos.sh rockpro64
./build-roninos.sh rock-5b-plus
./build-roninos.sh rpi4b
RoninOS - Build Using ARM
The following native image build process has been tested using Armbian. Testing includes a standard deployment on Rockpro64 and Rock5B. Docker is diabled for native builds by scripts which set the variable BUILD_DOCKER=no.
Native Build Instructions:
-
Boot up Armbian on a Rockpro64 or Rock5B. Suggested resources is 50GB storage or greater.
-
Open terminal then run all commands below to install git, tor, and clone RoninOS repository over tor.
sudo apt-get update && sudo apt-get install git tor
git config --global --unset http.proxy
git config --global http.proxy socks5h://127.0.0.1:9050
git clone http://2l2o5umijiwxjioxwpsvwxe6pr75tj7r5rggnl5ze256guwvtee3kpqd.onion/Ronin/RoninOS.git
- Change to the RoninOS directory.
cd /$HOME/RoninOS/
- Run the build using any of the following options. On first run, you will be asked to reboot to apply changes first.
./build-roninos.sh rockpro64
./build-roninos.sh rock-5b-plus
./build-roninos.sh rpi4b
Development
The following section is for developers and advanced users only.
RoninOS - Developer Build
The developer build information covers building an image using the develop branch, helpful commands, file structure, and other notes relevant to development deployments of RoninOS.
Developer Build Instructions
- Run the build using any of the following options. On first run, you will be asked to reboot to apply changes first.
Usage:
./build-roninos.sh <board> [develop]
Examples:
./build-roninos.sh rockpro64
./build-roninos.sh rock-5b-plus
./build-roninos.sh rpi4b
./build-roninos.sh rockpro64 develop
./build-roninos.sh rock-5b-plus develop
./build-roninos.sh rpi4b develop
- Clone, fetch, and checkout the RoninOS develop branch.
sudo apt-get update && sudo apt-get install git tor
git config --global --unset http.proxy
git config --global http.proxy socks5h://127.0.0.1:9050
git clone http://2l2o5umijiwxjioxwpsvwxe6pr75tj7r5rggnl5ze256guwvtee3kpqd.onion/Ronin/RoninOS.git
cd /$HOME/RoninOS/ && git fetch && git checkout develop
- Edit the defaults.sh script if you prefer to modify variables.
nano /$HOME/RoninOS/defaults.sh
- Edit build-roninos.sh to set a different
WORKING_DIR=if preferred.
nano /$HOME/RoninOS/build-roninos.sh
- Check logs for "plug & play" image.
tail -f /home/ronindojo/.logs/setup.logs
- The following error can be safely ignored in setup.logs file. It occurs during RoninUI setup because the dev created the tar package on MacOS, which adds custom flags that Linux tar doesn't recognize.
tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance'
- Start or stop ronin-setup service.
sudo systemctl start ronin-setup
sudo systemctl stop ronin-setup
File Structure:
-
build-roninos.sh - Begin the RoninOS image compiling process. The
WORKING_DIR=variable in this script is where all work will be done. -
customize-image.sh - Script used as a hook to customize the image at the end of the building process. Including setting username, password (random password), cloning repositories, modifying tor, and preparing the user interface.
-
defaults.sh - Contains the set defaults for build options, branches, repositories, etc. Modify variables if preferred.
-
functions.sh - Contains all functions for build script.
-
sign_roninos.sh - Script used to sign images with PGP key.
Developer Format:
Ready to contribute to the RoninDojo project? Please read these reminders before submitting a PR.
-
Try to stay POSIX compliant! POSIX compliance indicates that an operating system follows a set of standards making it compatible with other systems and supporting a consistent programming interface.
-
Use spaces not tabs.
-
All variables that are meant to be global or constant should upper case, and all local variables within scripts should be lowercase. This will improve readability and eliminate confusion between local and global variables.
VARIABLE=test #global
variable=test #local
-
All function names should have leading underscores
_. If additional spacers are needed always use underscores_rather than dashes-or any other spacer. For example a function with the purpose of printing an informational message in the terminal would be named_print_message(). This will help with telling the difference between commands and functions. -
All script names should have dashes
-if needed, rather than underscores_, or any other spacer. For example a script with the purpose of setting defaults via variables would be nameddefaults-dojo.sh. -
All scripts should be stored in their respective directory and named appropriately. For example a script related to data backup functions named
functions-backup.shshould be stored in the directory/$HOME/ronindojo/scripts/functions/. -
All file paths should be in lower case unless impossible because of something like upstream. For example the file path for the Dojo install script is
/$HOME/ronindojo/scripts/install/install-dojo.sh. -
Use the print message function named
_print_message()rather than echo commands if printing informational messages in the terminal. -
All URLs should be lower case.
https://repo.onion/ronin/dojo.git
https://repo.onion/ronin/ronindojo.git
https://repo.onion/ronin/roninui.git
https://repo.onion/ronin/roninos.git