Linux of Firmware upgrade

Introduction

In this paper, the following applies only to the android system, if need to upgrade the Linux system, referenceAndroid of Firmware Upgrade

This article describes how to burn the firmware files on the host to the flash memory of the development board via the male to male USB cableWhen upgrading, you need to choose a suitable upgrade method in line with the host operating system and firmware type.

Ready to work

  • AIO-3288C development board

  • Firmware

  • Host

  • Workable male to male USB cable

Typically firmware files comprise two kinds:

  • Separate unified firmware update.img: packs boot loader, parameters, and all partition images together for firmware release.

  • Multiple partition images, such as kernel.img, rootfs.img, recovery.img etc. that are generated during the development phase.

  • Host operating system supports:

  • Windows XP (32/64 bit)

  • Windows 7 (32/64 bit)

  • Windows 8 (32/64 bit)

  • Linux (32/64 bit)

Devices connection

How your devices enter upgrade mode.

  • Disconnect your device with the power adapter.

  • Connect your device and the host with the male to male USB cable.

  • Press and hold the RECOVERY button on your device.

  • Plug in.

  • Release the RECOVERY button after about 2 seconds.

The recovery position of the AIO-3288C is shown in the red box below:

_images/upgrade_firmware6.png

The host would prompt for new hardware and configure drivers. After open the device manager, you’ll see the new device “Rockusb Device” as indicated below. If not, please go back to the previous step to reinstall the driver.

_images/upgrade_firmware2.png

Download Tool

  1. Tool in Windows:AndroidTool

    Tips: AndroidTool_v2.35 for the Ubuntu16.04 MBR
         AndroidTool_v2.58 for the Ubuntu16.04 GPT
  1. Tool in Linux:Upgrade_Tool

    Tips: upgrade_tool_v1.24 for Ubuntu16.04 MBR
         upgrade_tool_v1.34 for Ubuntu16.04 GPT

The following, will with Ubuntu16.04 GPT Upgrade, for example.

Upgrade in Windows

Burn the unified firmware update.img

Hint:it is recommended that read Instruction of Upgrade Unified Firmware, and according to the content to select tools and operation.

Steps to burn the unified firmwar update.img:

  1. Go to the “Firmware Upgrade” page.

  2. Click “Firmware” button the open the firmware file to be upgraded. The upgrade tool will display detailed firmware information.

  3. Click “Upgrade” button to start the upgrade.

  4. If the upgrade fails, you may click “Erase Flash” button to erase the Flash before upgrading.

Note: In case the firmware loader version written by you is different from the original one used by the machine, please execute “Erase Flash” before upgrading the firmware.

_images/en_win_tool_firmware.png

Burn partition image

Steps to burn partition image:

  1. Go to the “Download Image” page.

  2. Check the partitions that need burning. You may choose more than one partitions.

  3. Make sure the path to the image file is correct. If necessary, click cells in the blank sheet on the right of the path to reselect.

  4. Click the “Execute” button to start the upgrade. Your device will auto restart after the upgrade.

_images/en_win_tool_partition.png

Upgrade in Linux

Download Upgrade_Tool, and install it into the system as indicated below, so that it is available for calling:

unzip Linux_Upgrade_Tool_v1.34.zip
cd Linux_Upgrade_Tool
sudo mv upgrade_tool /usr/local/bin
sudo chown root:root /usr/local/bin/upgrade_tool
sudo chmod 0755 /usr/local/bin/upgrade_tool

Then add udev rules by instructions here, in order to have permission for the normal user to flash Rockchip devices. If you skip this, you must prefix the following commands with sudo to have the right permission.

Burn unified firmware

Hint:it is recommended that read Instruction of Upgrade Unified Firmware, and according to the content to select tools and operation.

Run the followimg commands:

sudo upgrade_tool uf /path/firmware

If burn unified firmware fail, try to wipe out the flash, and then upgrade.

sudo upgrade_tool ef /path/firmware
sudo upgrade_tool uf /path/firmware

Burn partition image

When burning partition image, GPT partition and MBR partition are not the same command parameters, so distinguish them:

For Ubuntu16.04 GPT:

sudo upgrade_tool ul $LOADER
sudo upgrade_tool di -p $PARAMETER
sudo upgrade_tool di -uboot $UBOOT
sudo upgrade_tool di -trust $TRUST
sudo upgrade_tool di -b $BOOT
sudo upgrade_tool di -r $RECOVERY
sudo upgrade_tool di -m $MISC
sudo upgrade_tool di -oem $OEM
sudo upgrade_tool di -userdata $USERDATA
sudo upgrade_tool di -rootfs $ROOTFS

For Ubuntu16.04 MBR:

sudo upgrade_tool di -b /path/to/boot.img
sudo upgrade_tool di -k /path/to/kernel.img
sudo upgrade_tool di -s /path/to/system.img
sudo upgrade_tool di -r /path/to/recovery.img
sudo upgrade_tool di -m /path/to/misc.img
sudo upgrade_tool di resource /path/to/resource.img
sudo upgrade_tool di -p paramater   #burn parameter
sudo upgrade_tool ul bootloader.bin # burn bootloader

If flash issue causes error while upgrading, you may try low-level formatting and erasing nand flash:

sudo upgrade_tool lf   # low-level formatting
sudo upgrade_tool ef   # erase

FAQ

How to force into the MaskRom mode

If the board cannot enter the Loader mode, you may force into the MaskRom mode. See How to enter MaskRom Mode for how to do this.