Skip to main content

Image Flashing

Lyra series development boards support image flashing from Windows, Linux (x86_64), and macOS. Select the appropriate method for your host operating system.

Host OSSupported Storage MediaFlashing Tool
WindowsSPI Flash, eMMC, TF cardRKDevTool, balenaEtcher
Linux (x86_64)SPI Flash, eMMCUpgrade_Tool
macOSSPI Flash, eMMCupgrade_tool

1. Flash an Image on Windows​

  1. Open the Rockchip flashing tool RKDevTool and make sure that the device is in MASKROM or LOADER mode. Click Firmware, browse to the system image, and open the update.img file.

  2. After the image has loaded, click Upgrade to begin flashing.

  3. When flashing is complete, Download Successful appears in the application.

2. Flash an Image on Linux​

tip

Image flashing has currently been verified only on Ubuntu. Other Linux distributions have not been tested.

2.1 Enter Flashing Mode​

Hold down BOOT while connecting the board to the host to enter flashing mode. Run lsusb and compare the detected device information with the examples below.

  • Board in flashing mode:

    Board detected in flashing mode

  • Board booted into the system:

    Board detected after booting

tip

If a virtual machine cannot detect the board, check the following:

  1. USB cable issue: If reconnecting the board causes no response and neither the operating system nor VMware displays a prompt, the data cable may be damaged or making poor contact. Replace the USB cable and try again.
  2. The VMware device assignment prompt timed out: When the device is connected, VMware asks whether it should connect to the host or the virtual machine. If no selection is made before the prompt disappears and no explicit automatic connection policy is configured, the device may remain unassigned. It will then be available to neither the host nor the virtual machine. Disconnect and reconnect the device so that it can be assigned again.

2.2 Flash a Standalone Image (SDK Not Required)​

  1. Download, extract, and install upgrade_tool:

    sudo unzip upgrade_tool_v2.17.zip
    cd upgrade_tool_v2.17_for_linux/
    sudo cp upgrade_tool /usr/local/bin
    sudo chmod +x /usr/local/bin/upgrade_tool
  2. Verify the installation:

    ubuntu@ubuntu:~$ sudo upgrade_tool -v
    Upgrade Tool v2.17
  3. Flash the firmware:

    luckfox@luckfox:~$ sudo upgrade_tool uf update.img
    Loading firmware...
    Support Type:1106 FW Ver:0.0.00 FW Time:2023-11-16 16:24:18
    Loader ver:1.01 Loader Time:2023-11-16 16:22:58
    Start to upgrade firmware...
    Download Boot Start
    Download Boot Success
    Wait For Maskrom Start
    Wait For Maskrom Success
    Test Device Start
    Test Device Success
    Check Chip Start
    Check Chip Success
    Get FlashInfo Start
    Get FlashInfo Success
    Prepare IDB Start
    Prepare IDB Success
    Download IDB Start
    Download IDB Success
    Download Firmware Start
    Download Image... (100%)
    Download Firmware Success
    Upgrade firmware ok.
  4. Expected result:

    Successful upgrade_tool output

2.3 Flash an Image with the SDK Script​

tip

An update.img image must exist in the output/image directory. This directory is normally generated when the SDK is compiled. To download and extract the SDK, refer to Set Up the SDK Development Environment. If you have not compiled the SDK, create the output/image directory manually, place the downloaded image in it, and rename the file to update.img.

  1. Hold down BOOT while connecting the board to the host to enter flashing mode.

  2. Run the script with administrator privileges.

    $ sudo ./rkflash.sh update
    [sudo] password for ubuntu:
    Using /home/ubuntu/Luckfox/rk3506/luckfox-lyra-sdk/tools/linux/Linux_Upgrade_Tool/Linux_Upgrade_Tool/config.ini
    Loading firmware...
    Support Type:350F FW Ver:8.1.00 FW Time:2024-12-13 19:40:06
    Loader ver:1.01 Loader Time:2024-12-13 18:35:14
    Start to upgrade firmware...
    Test Device Start
    Test Device Success
    Check Chip Start
    Check Chip Success
    Get FlashInfo Start
    Get FlashInfo Success
    Prepare IDB Start
    Prepare IDB Success
    Download IDB Start
    Download IDB Success
    Download Firmware Start
    Download Image... (100%)
    Download Firmware Success
    Upgrade firmware ok.
  3. Expected result:

3. macOS​

The upgrade_tool is available not only for Linux but also supports the macOS platform.

  1. Download and extract the appropriate version of the Upgrade Tool flashing utility according to your Mac’s processor architecture.
OS VersionUpgrade Tool VersionDownload
MacOS 12.7upgrade_tool_v2.25_for_mac.zipDownload
MacOS 26.1upgrade_tool_v2.44_for_mac.zipDownload
  1. Put the board into flashing mode using the method described at the beginning of the current product tutorial. For an enclosed Luckfox Pico 86-Panel that can boot normally, log in and run reboot loader.

  2. Run the tool to flash the firmware:

Note

The following command is only an example. Please modify the image file name and path according to the actual image file you are using.

cd upgrade_tool_v2.44_mac
sudo ./upgrade_tool uf Luckfox-xxx-xxx.img
  1. The result is shown below.

4. Erase an Image​

  • To erase the data in eMMC, select the update.img firmware and click Erase Flash:

5. Flash an Image to a TF Card​

Use balenaEtcher to flash the TF card (MicroSD) image sd_update.img for your Lyra board model to the card.

  1. Download and install the TF card formatting tool SD Card Formatter.

  2. Insert the TF card into a card reader and connect it to the computer. Select the correct drive and click Format. Formatting erases the card's data, so back up any files first and remove other TF cards to avoid selecting the wrong one.

  3. Download and install the balenaEtcher flashing tool.

  4. Open balenaEtcher and click Flash from file.

  5. Select the sd_update.img image file and click Open.

  6. If a Missing partition table warning appears, confirm that you selected the sd_update.img file above, then click Continue.

  7. Click Select target, identify the TF card in the card reader by its capacity and drive letter, and click Select 1 to confirm.

  8. Click Flash to start flashing.

  9. Wait for flashing to finish. Flash Completed indicates that the image has been flashed successfully.