Flash Image¶
Introduction¶
This paper introduces how to flash the firmware file on the host to the flash memory of the development board through the type-c data line. When upgrading, you need to choose the appropriate upgrade method according to the host operating system and firmware type.
Please choose the right way according to the host OS and the type of image file .
Preparatory Work¶
Board and Host OS¶
AIO-RK3328-JD4 development board
Image file
Host PC
Type-C Cable / Dual male usb data cable
There are two types of image file:
Packed image, often known as update.img, which contains the bootloader, parameter and all the partition image files. It is used for firmware release.
Partition image, like kernel.img, boot.img, recovery.img, etc, which are created during development.
Supported host OS:
Windows XP (32/64bit
Windows 7 (32/64bit)
Windows 8 (32/64bit)
Linux (32/64bit)
Install RK USB Driver¶
Download Release_DriverAssistant.zip, then “驱动安装”(Driver install).), uncompress it, then run DriverInstall.exe inside.
In order to use new driver for all the rockchip devices, please select “驱动卸载”(Driver uninstall), then “驱动安装”(Driver install).
Device Mode¶
There are two ways to switch the device to upgrade mode.
The first one, device is cut off all the power sources, such as power adapter and Type-C connection:
Keep Type-A cable connected with host PC.
Press and hold RECOVERY key.
Connect Type-C cable to the device.
After around two seconds, release RECOVERY key.
The other way:
Use Type-C cable to connect host and device together.
Press and hold RECOVERY key.
Shortly press RESET key.
After around two seconds, release RECOVERY key.
The host will prompt to have new device detected and configured. Open the Device Management, you’ll find a new device name “Rockusb Device”, as shown below. Return to previous step to reinstall driver if it is not shown.
Download Firmware¶
Download Tool for upgrade¶
Windows OS:
Linux(GPT) or Android8.1: AndroidTool_v2.58
Linux OS:
Linux(GPT) or Android8.1: Upgrade_tool_v1.34
Flash Image in Windows¶
Download AndroidTool,and Uncompress it . AndroidTool defaults to display in Chinese. We need to change it to English. Open config.ini with an text editor (like notepad). The starting lines are:
#选择工具语言:Selected=1(Chinese);Selected=2(English)
[Language]
Kinds=2
Selected=1
LangPath=Language\
Change “Selected=1” to “Selected=2”, and save. From now on, AndroidTool will display in English.Now, run AndroidTool.exe: (Note: If using Windows 7/8, you’ll need to right click it, select to run it as Administrator)
Flash update.img¶
Steps of flashing update.img:
Switch to “Upgrade Firmware” tab page.
Click “Firmware” button and open the image file. Detail information of the image file, like version and chip, is shown.
Click “Upgrade” button to start flash.
If the upgrade fails, Maybe the version of firmware you flash is different from version of the original machine, you can try to erase the Flash by pressing the “EraseFlash” button before upgrading. .
WARNING:”EraseFlash” Be sure to erase and upgrade according to the Flashing Notes
Flash partition image¶
The partition of each firmware may be different. Please note the following two points:
Use Androidtool_2.58 to upgrade ubuntu (GPT) to use the default configuration. To upgrade Android8.1 firmware, please do the following:
Switch to “Download Page”; right click on the form and select “Load Config”; select rk3328-Android81.cfg.
Steps of flashing partition images:
Switch to “Download Image” tab page.
Check the partitions you want.
Make sure the image file’s path is correct. Click the rightmost empty table cell to select new path if needed.
Click “Run” button to start flashing. Device will reboot automatically when finish.
Flash Image in Linux¶
There is no need to install a device driver under Linux. You can connect to the device by referring to the Windows chapter.
Download Upgrade_Tool and install it follow the command to host filesystem :
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
NOTE: If you are prompted with the following error:
upgrade_tool: error while loading shared libraries: libudev.so.1: cannot open shared object file: No such file or directory
You can use the following command to solve:
sudo ln -sf /lib/i386-linux-gnu/libudev.so.1 /lib/i386-linux-gnu/libudev.so.0
Flashing firmware:¶
sudo upgrade_tool uf update.img #update.img:Firmware to be upgraded
If the upgrade fails, you can try to erase and then upgrade. Be sure to erase and upgrade according to the table of Flashing Notes.
# erase flash
sudo upgrade_tool ef update.img #update.img:Firmware to be upgraded
# flashing
sudo upgrade_tool uf update.img
Flashing partition images¶
Android8.1,Use the following way:
sudo upgrade_tool ul bootloader.bin # flash bootloader
sudo upgrade_tool di -p paramater # flash parameter
sudo upgrade_tool di -uboot /path/to/uboot.img
sudo upgrade_tool di -trust /path/to/trust.img
sudo upgrade_tool di -m /path/to/misc.img
sudo upgrade_tool di -baseparameter /path/to/baseparameter.img
sudo upgrade_tool di -b /path/to/boot.img
sudo upgrade_tool di -k /path/to/kernel.img
sudo upgrade_tool di -resource /path/to/resource.img
sudo upgrade_tool di -r /path/to/recovery.img
sudo upgrade_tool di -s /path/to/system.img
sudo upgrade_tool di -vendor /path/to/vendor.img
sudo upgrade_tool di -oem /path/to/oem.img
Ubuntu(GPT),Use the following way:
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
If errors occur due to flash problem, you can try to low format, or erase the flash:
upgrade_tool lf update.img # low format flash
upgrade_tool ef update.img # erase flash