Linux OTA
Introduction and Flow
A Firefly single-system Linux OTA commonly uses updateEngine and Recovery:
- The Normal system downloads or reads update.img.
- updateEngine writes the upgrade flag to misc.
- The device reboots into Recovery.
- Recovery parses update.img and writes the selected partitions.
- The device reboots into the Normal system.
The package is a Rockchip update.img. Its contents are selected by:
tools/linux/Linux_Pack_Firmware/rockdev/package-fileUnneeded partitions can be marked RESERVED or removed to reduce package size.
A single-system Recovery layout must contain misc and recovery. userdata is commonly used to hold the downloaded package. If update.img is stored on userdata, do not move or overwrite userdata in the same update.
Build the Package
Fully flash and verify the target firmware first. Then edit package-file and run the SDK packaging command, commonly:
./build.sh updateimgInstall updateEngine
On Firefly Ubuntu 20.04 or 22.04:
sudo apt update
sudo apt install updateengineBuild from source on another distribution:
sudo apt install libdrm-dev libssl-dev libbz2-dev libcurl4-openssl-dev git
git clone https://gitlab.com/firefly-linux/external/recovery.git
cd recovery
make -j8Remote and Local Upgrade
Start an HTTP server in the directory containing update.img:
python3 -m http.server 8000Run on the device:
updateEngine --misc=update --image_url=http://192.168.1.100:8000/update.img --savepath=/userdata/update.img --partition=0xFFFC00 --rebootFor a local package:
updateEngine --misc=update --image_url=/userdata/update.img --partition=0xFFFC00 --rebootThe documented example uses 0xFFFC00, while some SDKs use 0x3FFC00 by default. Partition mask definitions can change, so check the updateEngine help or source in the current SDK.
After installation, verify the system version, kernel, U-Boot, rootfs, hardware functions, preserved userdata, and Recovery logs.

