./dev.sh script for containerized buildsThe dev.sh script automatically sets up a Debian Trixie ARM64 environment with all required dependencies.
makewgetsquashfs-toolsgcc-aarch64-linux-gnucmakepkg-configgit-corebclibssl-devdos2unixbuild-essentialBuild tools and download firmware:
./dev.sh make tools
./dev.sh make firmware
Build basic firmware:
./dev.sh make build PROFILE=basic OUTPUT_FILE=firmware/U1_basic.bin
Build extended firmware:
./dev.sh make build PROFILE=extended OUTPUT_FILE=firmware/U1_extended.bin
Open a shell in the development environment:
./dev.sh bash
Build tools and download firmware:
make tools
make firmware
Build basic firmware:
sudo make build PROFILE=basic OUTPUT_FILE=firmware/U1_basic.bin
Build extended firmware:
sudo make build PROFILE=extended OUTPUT_FILE=firmware/U1_extended_fluidd.bin
Note: The build process requires root privileges due to squashfs root filesystem operations.
The build system supports two profiles:
basic - simple modifications not changing key components of the firmwareextended - extensive modifications changing key components of the firmwareOverlays are organized into categories based on their scope and build profile. Each overlay is numbered to indicate its application order within its category.
basic-devel or extended-devel - Add development overlays from overlays/devel/ to the selected profile
./dev.sh make build PROFILE=extended DEVEL=1When running firmware built with the -devel profile, additional development tools are available:
Entware Package Manager
The Entware is considered highly untrusted component, and might be removed at any point in the future without notice.
The devel profile includes Entware support for installing additional packages. After booting the devel firmware, initialize Entware:
entware-ctrl init
This sets up the Entware environment in /userdata/extended/entware and installs the bootstrap packages.
Other entware-ctrl commands:
entware-ctrl start - Activate Entware (mount /opt)entware-ctrl stop - Deactivate Entware (unmount /opt)entware-ctrl nuke - Remove Entware installation completelyOnce initialized, use opkg to install packages from the Entware repository.
├── common/ Core overlays applied to all profiles
├── devel/ Devel overlays applied to all profiles when `-devel`
└── firmware-${profile}/ Profile-specific firmware overlays
Each overlay directory can contain:
patches/ - Patch files applied to extracted firmwareroot/ - Files copied to firmware root filesystemscripts/ - Build-time scripts executed during firmware buildpre-scripts/ - Scripts executed before main build processOverlays are applied in the following order:
common/ (in numeric order)firmware-${profile}/ (in numeric order).
├── .github/ Automated release builds
├── overlays/ Profile overlay directories
│ ├── common/ Core overlays for all profiles
│ ├── devel/ Devel overlays for all profiles
│ └── firmware-${profile}/ Profile-specific firmware overlays
├── firmware/ Downloaded and generated firmware files
├── scripts/ Build and modification scripts
├── tmp/ Temporary build artifacts
├── tools/ Firmware manipulation tools
│ ├── rk2918_tools/ Rockchip image tools
│ └── upfile/ Firmware unpacking tool
├── Makefile Build configuration
└── vars.mk Firmware version and kernel configuration
Edit vars.mk to configure base firmware and kernel.
To extract and examine the base firmware:
make extract
Output: tmp/extracted/
The project uses GitHub Actions for automated releases:
main trigger a pre-release buildscripts/next_version.shafptool - Android firmware package toolimg_maker - Create Rockchip imagesimg_unpack - Unpack Rockchip imagesmkkrnlimg - Create kernel imagesFirmware unpacking utility for Snapmaker update files.