Skip to main content

OTA and Firmware Releases

Where to Find the Version​

LocationValueDescription
Board configuration RK_OTA_VERSIONV1.0.10Written to /etc/ota_version in the rootfs during packaging
Archive namerecamera-pro-sdk-v1.0.10Distribution package name
Device /etc/ota_versionSame as aboveVersion reported at runtime
Device /bin/sdkinfoBuild Time / SDK Version / BoardConfigGenerated by build.sh during packaging
project/cfg/BoardConfig_Recamera2/RECAMERA2-IPC-RELEASE-NOTES.mdChange logCurrently contains only v0.0.1 - init; keep it up to date

Check the version on the device:

# cat /etc/ota_version
# /bin/sdkinfo

/bin/sdkinfo output looks like this:

#!/bin/sh
echo Build Time: 2026-08-28-09:28:00
echo SDK Version: NONE
echo SDK BoardConfig: BoardConfig-EMMC-RK801-RV1126B_V1-IPC_64BIT.mk

The current source snapshot does not include .repo/, so SDK Version in sdkinfo may show NONE. See Source Review and Known Issues for the source-based explanation. Verify the device version using both /etc/ota_version and the build record.

For each release, update both RK_OTA_VERSION in the board configuration and RECAMERA2-IPC-RELEASE-NOTES.md.

OTA Mechanism​

export RK_ENABLE_RECOVERY=y
export RK_MISC=recovery-misc.img
export RK_OTA_RESOURCE="boot.img rootfs.img"
export RK_ENABLE_OTA=y # Comment: Used for set/get factory reset flag

OTA therefore updates only the boot and rootfs partitions. It does not update U-Boot, idblock, env, or userdata. This is intentional: bootloader and partition-table updates carry more risk, and user data must be preserved.

Create an OTA Package​

./build.sh all        # First create boot.img and rootfs.img under output/image/
./build.sh ota
ls -lh output/image/update_ota.tar

Package Contents and Update Script​

build_ota() generates RK_OTA_update.sh and packs it with the images into update_ota.tar using tar -cvhf (note that -h follows symbolic links). The eMMC branch of the script is:

#!/bin/sh
set -e
COMMON_DIR=`dirname $(realpath $0)`
TOP_DIR=$(realpath $COMMON_DIR/../..)
cd $TOP_DIR
echo "Start to write partitions"
for image in $(ls /dev/block/by-name)
do
if [ -f $COMMON_DIR/${image}.img ]; then
echo "Writing $image..."
dd if=$COMMON_DIR/${image}.img of=/dev/block/by-name/$image || exit 1
fi
done
echo "Erase misc partition"
dd if=/dev/zero of=/dev/block/by-name/misc bs=32 count=1 seek=512 || exit 2

Key points:

  • The script iterates over every partition under /dev/block/by-name/ and writes a partition if the archive contains an image with the same name. Add an image to RK_OTA_RESOURCE to include it in the OTA package; the script itself does not need to change.
  • It clears the flag in the misc partition at the end (offset 512 blocks of 32 bytes), so the next boot does not enter recovery again.
  • With RK_ENABLE_RECOVERY=y, the script is packaged using -C $OTA_SCRIPT_PATH RK_OTA_update.sh.
  • NAND media use a different branch with flash_eraseall + nandwrite -p. This board uses eMMC, so that branch does not apply.

OTA Flow (Conceptual)​

Application downloads update_ota.tar → extracts it to a directory
↓
Write the recovery flag to the misc partition (RK_ENABLE_OTA provides set/get factory-reset flag interfaces)
↓
Reboot → U-Boot reads misc → enters recovery
↓
Recovery runs RK_OTA_update.sh → writes boot/rootfs with dd → clears the misc flag
↓
Reboot into the new system → verify with cat /etc/ota_version

Build the recovery image separately with ./build.sh recovery (RK_KERNEL_RECOVERY_DEFCONFIG=rv1126b_ipc_defconfig plus the rv1126b-recovery.config fragment); the ramdisk content is under output/out/ramdisk/.

The upper-layer application code that triggers recovery and OTA is in recamera_ipc / recamera_services (the Web UI's “Firmware Update” and “Factory Reset” actions). This page covers only SDK-side packaging. The specific API calls still need to be verified on a device.

Factory Reset​

The comment for RK_ENABLE_OTA=y says that it provides set/get factory reset flag functions. In practice, a factory reset writes a flag to misc and clears or recreates userdata. User data resides under /userdata, including /userdata/config/rkipc.ini, /userdata/config/system/login_lock.json, and eth0_dns_mode; a factory reset resets these settings.

Full Firmware Image​

./build.sh updateimg     # Package all partition images as output/image/update.img
./build.sh unpackimg # Extract update.img

Use update.img with:

sudo tools/linux/Linux_Upgrade_Tool/upgrade_tool uf output/image/update.img

./rkflash.sh update does not work because that branch is commented out in the script. Use upgrade_tool uf directly.

Factory Image​

./build.sh factory
ls output/image/factory/

This internally invokes tools/linux/SocToolKit/bin/linux/programmer_image_tool -i output/image/update.img -o output/image/factory/ -t emmc. The image type is determined by RK_BOOT_MEDIUM. NAND media use -b <blockKB> -p <pageKB> [-s <oobB>]; override the defaults (0x20000 / 2048 / 128) with RK_NAND_BLOCK_SIZE, RK_NAND_PAGE_SIZE, and RK_NAND_OOB_SIZE.

Release Archives: save / allsave​

./build.sh save          # Create an archive
./build.sh save xml # Generate only the repo manifest XML, then exit
./build.sh allsave # all + save; default when ./build.sh is run without arguments

build_save() constructs the archive path and converts it to uppercase:

IMAGE/<application-scenario>_<boot-medium>_<power-scheme>_<hardware-version>_<YYYYMMDD.HHMM>_RELEASE_TEST/

For this board configuration, the path looks like:

IMAGE/IPC_64BIT_EMMC_RK801_RV1126B_V1_20260828.0928_RELEASE_TEST/
├── IMAGES/ # All contents of output/image/
├── PATCHES/ # Patches and repo information (__GET_REPO_INFO)
├── DEBUG_FILES/
│ ├── kernel/vmlinux.tar.bz2 # Unstripped kernel for crash analysis
│ ├── media_out.tar.bz2 # Complete media outputs
│ ├── app_out.tar # Complete application outputs
│ └── uboot/uboot.debug.tar.bz2
└── build_info.txt # BUILD-ID: <hostname>:<user> + build_info output

build_save() uppercases the archive path, so the directory is named IMAGE/, as shown in the SDK quick-start guide.

The suffix is always _RELEASE_TEST, even for an actual production release. To distinguish production and test builds, rename the archive or record the status in build_info.txt.

DEBUG_FILES are essential for investigating field issues. Keep the archive for every external release, especially vmlinux, which is required to decode kernel panic call stacks.

Record Build Information and Configuration​

./build.sh info prints:

  • The real path of the current BOARD_CONFIG
  • All non-empty RK_* environment variables, sorted
  • make info output from the sysdrv, media, and app component SDKs
  • Power-domain check results (build_check_power_domain)

Attach this output to the release record to avoid later guesswork about how the firmware was built.

./build.sh info > release_info_$(date +%Y%m%d).txt 2>&1

build_info() also tries to link or copy project/cfg/BoardConfig_Recamera2/RK-RELEASE-NOTES-Recamera2.txt to the SDK root if that file exists. The current file is named RECAMERA2-IPC-RELEASE-NOTES.md, which does not match the RK-RELEASE-NOTES-<board-name>.txt pattern the script searches for, so it will not be promoted automatically. The root-level RECAMERA2-IPC-RELEASE-NOTES.md is a symbolic link to it.

Release Checklist​

Before the Build​

  • Sync git / internal repositories to the target tag and confirm the working tree is clean.
  • Update RK_OTA_VERSION in the board configuration.
  • Update RECAMERA2-IPC-RELEASE-NOTES.md with this release's changes (it currently contains only v0.0.1 - init; keep it maintained).
  • Run ./build.sh lunch and select BoardConfig_Recamera2/BoardConfig-EMMC-RK801-RV1126B_V1-IPC_64BIT.mk.
  • Run ./setup_build_env.sh --check; confirm that no tools are missing.

Build​

  • Run ./build.sh clean when switching versions or board configurations.
  • Run ./build.sh allsave and keep the build log.
  • Verify that boot.img is smaller than 11 M and rootfs.img is smaller than 3 G under output/image/.
  • Confirm that IMAGE/.../build_info.txt was generated.

Verify​

  • Flash a clean board with sudo ./rkflash.sh all and confirm that it boots to the banner.
  • Confirm the BoardConfig name in /bin/sdkinfo and verify that cat /etc/ota_version matches the new version.
  • Video: confirm that the Web UI displays video and go2rtc WebRTC on :8555 can receive a stream.
  • AI inference: confirm that the NPU model loads and recamera_notify receives and forwards events.
  • Audio: verify that ai_debug can record four channels and the speaker outputs audio.
  • OTA: upgrade from the previous release using update_ota.tar and confirm that /userdata configuration is preserved.
  • Factory reset: confirm that the device returns to its default configuration.
  • Stability: run relevant stress tests under media/samples/example/test/ and recamera_utils/stress_test/.
  • Watchdog: confirm that a long-running test does not trigger a reset (S15watchdog, 30-second timeout).

Archive​

  • Upload the entire IMAGE/ directory, including DEBUG_FILES/, to the internal artifact repository.
  • Record update.img, update_ota.tar, the version, and SHA-256 together.
  • Attach the output of ./build.sh info to the release record.

Command Quick Reference​

CommandOutput
./build.sh firmwarePartition images under output/image/
./build.sh updateimgoutput/image/update.img
./build.sh otaoutput/image/update_ota.tar
./build.sh factoryoutput/image/factory/
./build.sh recoveryoutput/image/recovery.img
./build.sh saveIMAGE/<...>_RELEASE_TEST/
./build.sh infoPrint current configuration; does not write a file
./build.sh unpackimgExtract update.img
  • docs/en/Rockchip_User_Guide_SDK_Application_And_Synchronization_EN.pdf: SDK application and synchronization (request SDK updates from Rockchip)
  • docs/en/Rockchip_User_Guide_Bug_System_EN.pdf: file issues with Rockchip
  • docs/zh/ipc/Rockchip_RV1126B_Linux_IPC_SDK_Release_V1.0.0_20250620_CN.pdf: upstream SDK release notes
  • project/cfg/BoardConfig_IPC/RK-RELEASE-NOTES-IPC.txt: release-note format for the Rockchip IPC reference board; use it as a template for maintaining RECAMERA2-IPC-RELEASE-NOTES.md

Tech Support & Product Discussion​

Thank you for choosing our products! We are here to provide you with different support to ensure that your experience with our products is as smooth as possible. We offer several communication channels to cater to different preferences and needs.

Loading Comments...