¶ 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. Follow the 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, Windows Subsystem Linux, or try using an x86 Virtual Machine. 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.
- Change to the RoninOS directory.
- Run the build using any of the following options. On first run, you will be asked to reboot to apply changes first.
¶ 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.
- Change to the RoninOS directory.
- Run the build using any of the following options. On first run, you will be asked to reboot to apply changes first.
¶ x86 Virtual Machines
It is useful to build RoninOS using x86 virtual machines rather than use other environments. This method is faster than native builds using ARM computers, and leaves your other x86 work enviorments clean. Here are some tips to setting up virtual machines which can be used to build RoninOS images.
¶ Mac & Windows
Installing Ubuntu Virtual Machine
Go to VirtualBox website and download for macOS or Windows.
Go to the Ubuntu website and download Ubuntu ISO.
Open VirtualBox and create a new virtual machine, set the type to "Linux" and version to Ubuntu 64bit.
Allocate 8GB RAM and 50GB storage.
Start the virtual machine and select the Ubuntu ISO file downloaded earlier.
Install Ubuntu and finish the setup wizard.
After setup update and reboot.
¶ Linux
...
¶ 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.
- Clone, fetch, and checkout the RoninOS develop branch.
- Edit the defaults.sh script if you prefer to modify variables.
- Edit build-roninos.sh to set a different
WORKING_DIR=if preferred.
- Check logs for "plug & play" image.
- 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.
- Start or stop ronin-setup service.
¶ File Structure:
Take note that all repo links are .onion so have Tor Browser ready.
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.
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.