How to build a Linux image
This page describes how to build an OS image locally on your computer. This is useful for testing your changes in the OS components on Flipper One or any of the supported boardssupported boards before submitting pull request to the repository.
When building an image locally, the same workflow is used as on the Build Server. This workflow is described in the Build systemBuild system page.
Step 1: Install required tools
The operating system image is built inside a Docker container, ensuring cross-platform compatibility of the build process.
Before starting the image build, install the required components to ensure that the container runs properly.
๏ปฟ macOS
Install Docker Desktop.
Install git.
โ
๏ปฟ Linux (Debian)
Install the required packages:
sudo apt install -y docker.io docker-cli git qemu-user-binfmt
Add the current user to the docker group and apply it in the current session:
sudo usermod -aG docker $USER && newgrp docker
โ
๏ปฟ Windows 10/11
Open a terminal and start the installation of WSL 2 (Windows Subsystem for Linux v2) with Debian distribution:
wsl --install -d Debian
Restart your computer. After rebooting, the installation of the Debian distribution will continue automatically.
Youโll be prompted to create a Unix username and password during installation.
Install the required packages: sudo apt install -y docker.io docker-cli git qemu-user-binfmt
Add the current user to the docker group and apply it in the current session:
sudo usermod -aG docker $USER && newgrp docker
Close the terminal.
Step 2: Build an OS Image
Building an OS image is a long-running process that takes from several tens of minutes to over an hour.
To build an OS image:
Open the terminal in the folder where you plan to save image build system.
On Linux/macOS: Skip this step.
On Windows: Enter the Debian terminal:
wsl -d Debian
Go to the Debian userโs home directory:
cd ห
Clone the OS image build scripts repository:
git clone https://github.com/flipperdevices/flipperone-linux-build-scripts && cd flipperone-linux-build-scripts
Build the Docker image:
docker build -t flipperone-linux-build-scripts .
Run the container
docker run --privileged --rm -v $(pwd)/out:/artifacts flipperone-linux-build-scripts
Wait for the build to complete.
The full-disk OS images are stored in:
- Linux and macOS: flipperone-linux-build-scripts/out/images.
- Windows 10/11: Linux/Debian/home/[wsl user]/flipperone-linux-build-scripts/out/images.
You can now install the image to your boardinstall the image to your board.