Update Firmware

This document is intended to help you set up the software development environment and update firmware/system for your development.

Two different update method will be shown step by step. Follow the steps to update your Edge 2 system with the new firmware.

Introduction

Edge 2 is pre-installed with Android 11, and it’s open to update the system for any custom developed firmware. There are two system update methods, via USB cable or MicroSD card. Edge 2 uses A/B (Seamless) system update. Unless the hardware is damaged, Edge 2 will not brick.

What you need

  1. A downloaded firmware
  2. Firmware update tool
  3. Edge 2
  4. RK-USB driver (only for update via USB cable with Windows)
  5. MicroSD card with more than 2GBytes capacity (only for update via MicroSD card)

Download firmware files

Click here download firmware

Two update methods

USB cable update

Connect Edge 2 to a PC with USB cable (Type-C), it takes about 1 minute to burn the firmware with firmware update tool.

MicroSD card update

Use the upgrade card making tool to make the MicroSD card into an upgrade card. Then insert the upgrade card into the motherboard, turn it on, and then the machine will automatically upgrade, it takes about 5 minutes.

Update with USB cable

Boot modes

Edge 2 has three start modes: Normal, Loader, and Maskrom modes. Loader mode and Maskrom mode are for firmware update.

  1. Normal mode
    Normal mode is the normal startup process. Each component is loaded in turn and enters the system normally.

  2. Loader mode
    There are two ways to enter the Loader mode:

    • Press and hold the RECOVERY button, then power on. Continue holding the RECOVERY button until the RKDevTool displays Loader mode, then release the RECOVERY button.
    • After the system is running, input adb reboot loader through the serial terminal or ADB terminal.
  3. Maskrom mode
    Maskrom mode can be used for updates when the bootloader or uboot is broken. To enter Maskrom mode:

    • Press and hold the MASKROM button, then power on. Continue holding the MASKROM button until the RKDevTool displays Maskrom mode, then release the MASKROM button.

Windows

Step 1: Download update tool on PC

Step 2: Install RK-USB driver

Note: To use the latest driver version, uninstall the current driver before installing the latest driver.

Step 3: Connect devices

  • Connect Edge 2 USB type-C port to PC with USB cable.

    device-manager

Note: Edge 2 would be recognized as Rockusb Device by Windows in Loader & Maskrom mode.

Step 4: Enter Loader/Maskrom mode

  • Refer to [Boot mode](###Boot mode), select and boot Edge 2 in Loader/Maskrom mode.

Step 5: Update firmware

  • Open RKDevTool with administrator access

  • Click Firmware to select firmware location

  • Click Upgrade to update firmware to Edge 2

    loarder-mode

    maskrom-mode

Ubuntu

Two upgrade tools can be used in Ubuntu, and both tools require a USB cable.

Step 1: Download upgrade tool

Download Linux_Upgrade_Tool

Download Linux_adb_fastboot

Step 2.1: Install upgrade tool

Edge 2 boots into Loader/Maskrom mode

Install Upgrade_Tool:

unzip Linux_Upgrade_Tool_xxxx.zip
cd Linux_UpgradeTool_xxxx
sudo mv upgrade_tool /usr/local/bin
sudo chown root:root /usr/local/bin/upgrade_tool
sudo chmod a+x /usr/local/bin/upgrade_tool

Upgrade firmware:

Unified firmware upgrade:
sudo upgrade_tool uf update.img
 
 
Mirrored partition upgrade:
sudo upgrade_tool di -b /path/to/boot.img
sudo upgrade_tool di -r /path/to/recovery.img
sudo upgrade_tool di -m /path/to/misc.img
sudo upgrade_tool di -u /path/to/uboot.img
sudo upgrade_tool di -dtbo /path/to/dtbo.img
sudo upgrade_tool di -p paramater
sudo upgrade_tool ul bootloader.bin
 
 
If the upgrade is abnormal or fails, you can low-level format, then upgrade.
sudo upgrade_tool lf update.img # low-level format
sudo upgrade_tool ef update.img # Erase

Step 2.2: Install Fastboot

Install Fastboot:

sudo mv adb /usr/local/bin
sudo chown root:root /usr/local/bin/adb
sudo chmod a+x /usr/local/bin/adb
sudo mv fastboot /usr/local/bin
sudo chown root:root /usr/local/bin/fastboot
sudo chmod a+x /usr/local/bin/fastboot

Upgrade firmware with Fastboot:

adb reboot fastboot
sudo fastboot flash vendor vendor.img
sudo fastboot flash system system.img
sudo fastboot reboot

Updating with MicroSD card

To upgrade using a MicroSD card, you need to use the card building tool on the PC to write to the MicroSD card uniformly. The operation can only be completed on the Windows system.

Step 1: Preparation

  • Prepare a firmware to burn.
  • Prepare a MicroSD card with more than 2GB capacity.

Step 2: Download MicroSD card building tool

Download SD_Firmware_Tool

Note: As Edge 2 uses A/B (Seamless) system update, SD_Firmware_Tool requires additional configuration.

  • open config.ini under SD_Firmware_Tool file folder
  • Modify UPGRADE_PROGRAM_PARTITION= boot_b

Step 3: Build update MicroSD card

  • Open SD_Firmware_Tool.

  • Follow the instruction in the below figure

    Upgrade_tool.png

Step 4: Update system

  • Insert the Upgrade card into Edge 2.
  • Reboot Edge 2 and wait for the upgrade to complete.