Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Difference between revisions of "Rock/flash the image"

(Before started)
Line 2: Line 2:
 
__TOC__
 
__TOC__
  
This page describe how to install the image to the nand flash of radxa rock, ie, how to flash the board. You can choose either flashing the whole image(ie, [[rock/update.img |update.img]]) to the board or just flashing the selected [[rock/partitions |partitions]]. You can download the [[rock/prebuilt images| prebuilt images]] from our [http://dl.radxa.com/rock/images/ server] or build your own images.
+
This page describes how to install an image to the nand flash of Radxa Rock, ie, how to flash the board. You can choose to either flash the whole image (ie, [[rock/update.img |update.img]]) to the board or just flash the selected [[rock/partitions |partitions]]. You can download the [[rock/prebuilt images| prebuilt images]] from our [http://dl.radxa.com/rock/images/ server] or build your own images.
  
 
== Before you start ==
 
== Before you start ==
  
 
Keep in mind that:
 
Keep in mind that:
     '''You can always flash the rock, it never bricks(as the name :) unless some hardware damage.'''
+
     '''You can always flash the rock, it never bricks (as the name :)) unless some hardware damage occurs.'''
  
What you need to flash the board is:
+
What you will need to flash the board is:
* a radxa rock board(full version or lite version)
+
* a Radxa Rock board (full or lite version)
* a desktop/laptop running Windows(XP 32/64bit, Windows 7 32/64 bit) or Linux(32/64bit)
+
* a PC running Windows (XP 32/64bit, Windows 7 32/64 bit) or Linux (32/64bit)
* a micro usb cable, one side plugged in to the OTG port of radxa rock, the other side plugged in to the usb port on desktop/laptop
+
* a micro USB cable with one side plugged in to the OTG port of Radxa Rock and the other side plugged into the USB port on PC.
  
 
== Windows ==
 
== Windows ==
  
The Windows tool of flashing the image is provided by rockchip. To flash the [[rock/update.img| update.img]], you need to use RKBatchTool, to flash the [[rock/partitions| partitions]], you need to use RKDevelopTool. Both RKBatchTool and RKDeveopTool rely on the RK USB driver. You need to install it first as below:
+
The Windows tool for flashing the image is provided by Rockchip. To flash the [[rock/update.img| update.img]], you need to use the RKBatchTool and to flash the [[rock/partitions| partitions]], you will need to use RKDevelopTool. Both RKBatchTool and RKDevelopTool rely on the RK USB driver so you will need to install it first as below:
  
 
=== Install driver ===
 
=== Install driver ===
 
There two ways to install the driver under Windows:
 
There two ways to install the driver under Windows:
  
# install by RK_DriverAssitant tools - the easy way
+
# install using RKDriverAssistant tools - the easy way
 
+
 
# install manually
 
# install manually
 +
<p></p>
 +
'''If you have already installed the USB driver please skip this step.'''
  
'''If you have installed the usb driver, skip this step.'''
+
==== Install using RK Driver Assistant tools ====
 
+
There’s no need to connect your Rockchip device during this procedure just download and extract [http://dl.radxa.com/rock/tools/windows/RK_DriverAssitant.zip RKDriverAssistant.zip]
==== Install by RK_DriverAssitant tools ====
+
Then double click on DriverInstall.exe in the RKDriverAssistant directory to start the utility.
There’s no need to connect your Rockchip device during this procedure. Download and extract [http://dl.radxa.com/rock/tools/windows/RK_DriverAssitant.zip RK_DriverAssitant.zip]
+
If you've previously tried to install the Rockchip USB drivers for any Rockchip devices make sure you click “Uninstall Driver” first.
Double click on DriverInstall.exe in RK_DriverAssitant directory to start the utility
+
If you’ve already tried to install Rockchip Usb drivers for Rockchip devices, make sure to click “Uninstall Driver” first
+
  
 
[[File:RK_Driver_Assistant_Install_Uninstall.jpg]]
 
[[File:RK_Driver_Assistant_Install_Uninstall.jpg]]
  
Then click “Install Driver”, when driver finish installing, shut down radxa board, Connect the radxa rock board and the pc/laptop, let the board go to [[rock/recovery mode| recovery mode]],then your pc/laptop will detect the board,and will see  
+
Then click “Install Driver” and when the driver has finish installing then shut down radxa board and connect the Radxa Rock board to your computer and let the board go to [[rock/recovery mode| recovery mode]], then your computer will detect the board and you will see it within device manager.
  
 
[[File:RK_Driver_Assistant_Install_Usb_driver.png]]
 
[[File:RK_Driver_Assistant_Install_Usb_driver.png]]
  
Now the driver is OK!
+
Now the driver should have been installed successfully!
  
==== Install manually====
+
==== Install Manually====
  
Download the file (usb_driver_v3.5.zip) from [http://dl.radxa.com/rock/tools/windows/usb_driver_v3.5.zip here]
+
Download the file (usb_driver_v3.5.zip) from [http://dl.radxa.com/rock/tools/windows/usb_driver_v3.5.zip here] and shut down the Radxa Rock board then connect the Radxa Rock board to the computer and let the board go to [[rock/recovery mode| recovery mode]]. After your computer should detect the board and you will see an unknown device within device manager.
Shut down radxa board, Connect the radxa rock board and the pc/laptop, let the board go to [[rock/recovery mode| recovery mode]],then your pc/laptop will detect the board,you will see an Unknown device in the Computer Management
+
  
 
[[File:flash_image_1.jpg]]
 
[[File:flash_image_1.jpg]]
  
Select the UnKnown device , right click and select "Update Driver Software"
+
Select the Unknown device then right click and select "Update Driver Software".
  
  
 
[[File:flash_image_2.jpg]]
 
[[File:flash_image_2.jpg]]
  
Select "Browse the computer for driver software"
+
Select "Browse the computer for driver software".
  
 
[[File:flash_image_2.5.jpg]]
 
[[File:flash_image_2.5.jpg]]
  
Find the file unziped from you just downloaded(usb_driver_v3.5.zip) ,select the right file folder Click "OK" to install
+
Find the file unzipped file you downloaded earlier (usb_driver_v3.5.zip) and select either the 32/64bit folder then click "OK" to install.
  
 
[[File:flash_image_3.jpg]]
 
[[File:flash_image_3.jpg]]
  
When driver is installed successful, you will see a Rockusb Device in the Computer Management window.
+
When the driver is installed successful you will then see a Rockusb Device in the device manager window.
  
 
[[File:flash_image_6.jpg]]
 
[[File:flash_image_6.jpg]]
Line 67: Line 65:
  
 
===Flash Image===
 
===Flash Image===
There are two methods
+
There are two methods to flash an image.
 
   
 
   
 
# use RKBatchTool  (Factory upgrading firmware tool, flash update.img only, it will erase everything.)  
 
# use RKBatchTool  (Factory upgrading firmware tool, flash update.img only, it will erase everything.)  
 
 
# use RKAndroidTool (Development tool, can flash by partitions)
 
# use RKAndroidTool (Development tool, can flash by partitions)
 
+
<br/>
 
====Using RKBatchTool to flash update.img====
 
====Using RKBatchTool to flash update.img====
  
 
   
 
   
Download RKBatchTool from [http://dl.radxa.com/rock/tools/windows/RK_BatchTool_V1.7.zip here]. Unzip it, double click RKBatchTool.exe, you will see the interface as follow:
+
Download RKBatchTool from [http://dl.radxa.com/rock/tools/windows/RK_BatchTool_V1.7.zip here]. Then unzip it and double click RKBatchTool.exe, you will now see the interface as follows:
  
 
[[File:flash_image_7.jpg]]
 
[[File:flash_image_7.jpg]]
  
Select the image(rockdev/update.img ) About how to make the update.img see [[Rock/update.img | update.img]]<br />
+
Select an image (rockdev/update.img). For information on how to make an update.img see [[Rock/update.img | update.img]]<br/>
 
[[File:flash_image_8.jpg]]
 
[[File:flash_image_8.jpg]]
  
Power down radxa board, Connect the radxa rock board and the pc/laptop,let the board go to [[rock/recovery mode]] ,then the program will detect it <br />
+
Power down the Radxa Rock board and connect the Radxa Rock board to the computer then let the board go to [[rock/recovery mode]] after the program should detect the device.<br/>
 
[[File:flash_image_9.jpg]]
 
[[File:flash_image_9.jpg]]
  
Click the "Upgrade" to begin flashing. when flashing finishes successfully ,you will see the follow interface <br/>
+
Click the "Upgrade" button to begin flashing and when the flashing process finishes successfully you will see the following interface.<br/>
 
[[File:flash_image_10.jpg]]
 
[[File:flash_image_10.jpg]]
  
<br/>If the flashing is abort ,it may be some error with the update.img ,you can redo the operations above or make the update.img again !
+
If the flashing has aborted ,it could possibly be an error with the update.img, you can either try to redo the operations above or make the update.img again!
  
 
====Using RKAndroidTool to falsh image by selection ====
 
====Using RKAndroidTool to falsh image by selection ====
Down RKAndroidTool from [http://dl.radxa.com/rock/tools/windows/RKDevelopTool_v1.37.zip here].Unzip it,double click RKAndroidTool.exe you will see the interface as follow:
+
Download RKAndroidTools from [http://dl.radxa.com/rock/tools/windows/RKDevelopTool_v1.37.zip here]. Unzip it the file and double click RKAndroidTool.exe, you will then see the interface as follows:
  
 
[[File:rkandroidtool_flash_image_1.png]]
 
[[File:rkandroidtool_flash_image_1.png]]
  
Power down radxa board, Connect the radxa rock board and the pc/laptop,let the board go to [[rock/recovery mode]] ,then the program will detect it  
+
Power down the Radxa Rock board and connect the Radxa Rock board to the computer and let the board go to [[rock/recovery mode]] then the program will detect it.
  
 
[[File:rkandroidtool_flash_image_2.png]]
 
[[File:rkandroidtool_flash_image_2.png]]
  
There are eight selections, Select the right row , click the most left checkbox , Click the column right of the path, get the right file you want to flash. you can select one or more file and flash them at one time. at last Click "Run" to flash. the most right selection show the log of the progress
+
There are eight selections to choose from so select the correct row and then select the checkbox to the left of the row to select it. After you must click the column on the right side for the path of the file you want to flash. You can then select one or more files and flash them at once. Finally Click "Run" to flash images to the device (the right most selection shows the log of the progress).
  
 
[[File:rkandroidtool_flash_image_3.png]]
 
[[File:rkandroidtool_flash_image_3.png]]
Line 106: Line 103:
 
[[File:rkandroidtool_flash_image_4.png]]
 
[[File:rkandroidtool_flash_image_4.png]]
  
If success, the board will disconnect with the tool and boot system !
+
If successful the board will disconnect from the tool and boot into the system.
 
+
Note:
+
  
# Kernel is contained in boot.img when you package the image by  "./mkimage.sh ota"  you can see [[Rock/Android_Build]]
+
Please Note:
  
# you can flash one of more image at one time as you need
+
# The kernel is contained within the boot.img when you package the image by  "./mkimage.sh ota"  please see [[Rock/Android_Build]] for more information.
 +
# you can flash one of more image at one time as needed
  
=== Trouble shooting ===
+
=== Troubleshooting ===
 
==== RKBatchTool can not recognize the board ====  
 
==== RKBatchTool can not recognize the board ====  
1.Recovery mode : USB device HW:  VID_2207&PID_310B
+
1.Recovery mode : USB device HW:  VID_2207&PID_310B <br/>
 
2.Boot into Android: USB device HW: VID_2207&PID_0006
 
2.Boot into Android: USB device HW: VID_2207&PID_0006
  
For Recovery mode,
+
For Recovery mode<br/>
I have use manually install on Recovery mode for PID_310B.
+
I have use manual install within recovery mode for PID_310B.
The "Rockusb device" driver install successfully on Vista
+
The "Rockusb device" driver installed successfully on Vista but the RKBatchTool can not connect to the RK3188 board for img flashing.
But, RKBatchTool can not connect my RK3188 board for img flashing.
+
  
For Recovery mode connect issue [Solved]
+
For Recovery mode cannot connect issue [Solved]<br/>
RootCause: RK3188 board connect to laptop USB3.0 PMMCIA card.
+
Root Cause: RK3188 board is connected to laptop via USB 3.0 PMMCIA card.
It's USB2.0 to USB3.0 compatibility issue.
+
It's a USB2.0 to USB3.0 compatibility issue so switch USB 3.0 port to a USB 2.0 then the RKBatchTool should connect to the RK3188 board for img flashing.
When I change USB2.0 to USB2.0, the RKBatchTool can connect my RK3188 board for img flashing.
+
  
 
== Linux ==
 
== Linux ==
Rockchip provides the tools of upgrading under Linux(closed source) since Android 4.4. The initial RE work of the Rockchip bootloader updating protocol is by naobsd and improved by some others in '''rkflashtool''', linuxerwang made the GUI version of the rkflashtool called '''rkflashkit'''. Note: both '''rkflashtool''' and '''rkflashkit''' can '''not''' flash the [[rock/update.img]] and can only flash in the [[rock/bootloader]] mode, not [[rock/mask rom]] mode because the [[rock/mask rom]] updating protocol is not RE yet. If you are interested in RE the protocol, ping naobsd at #radxa. Since the [[rock/bootloader]] remains unchanged for a long time, it's enough for normal usage.
+
Rockchip has provided tools for upgrading within Linux (closed source) since Android 4.4. The initial RE work of the Rockchip bootloader updating protocol is by naobsd and has been improved by some in '''rkflashtool'''linuxerwang has made a GUI version of the rkflashtool called '''rkflashkit'''. Please note: both '''rkflashtool''' and '''rkflashkit''' can '''not''' flash the [[rock/update.img]] and can only flash within [[rock/bootloader]] mode and not [[rock/mask rom]] mode because the [[rock/mask rom]] updating protocol is not RE yet. If you are interested in the RE protocol ping naobsd at #radxa on IRC. Since the [[rock/bootloader]] has remained unchanged for a long time it's enough for normal usage.
  
 
=== Flash update.img ===
 
=== Flash update.img ===
  
Download the rockchip linux upgrade tool [http://dl.radxa.com/rock/tools/linux/Linux_Upgrade_Tool_v1.16.zip here]. Unzip it, you will get '''upgrade_tool''', it's binary executable file under linux.
+
Download the Rockchip linux upgrade tool [http://dl.radxa.com/rock/tools/linux/Linux_Upgrade_Tool_v1.16.zip here]. Unzip it and you will get a file called '''upgrade_tool''' which is a binary executable file under Linux.
  
Let the board go to [[rock/recovery mode]], and run the following command to flash the [[rock/update.img]]:
+
Let the board go to [[rock/recovery mode]] and run the following command to flash the [[rock/update.img]]:
 
     sudo ./upgrade_tool uf  /path/to/update.img          #(UF Upgrade Flash)
 
     sudo ./upgrade_tool uf  /path/to/update.img          #(UF Upgrade Flash)
  
If you have error with the upgrading, you can low level format the nand flash first with following command:
+
If you have an error with upgrading you can low level format the nand flash first with the following command:
 
     sudo ./upgrade_tool lf      #(LF Lowlevel Format)
 
     sudo ./upgrade_tool lf      #(LF Lowlevel Format)
  
There are other command of the upgrade_tool, such as:
+
There are other commands in the upgrade_tool, such as:
 
     UL: upgrade the loader
 
     UL: upgrade the loader
 
     EF: erease the nand flash
 
     EF: erease the nand flash
  
 
=== Flash by partitions with GUI ===
 
=== Flash by partitions with GUI ===
You can download the prebuilt rkflashkit [http://dl.radxa.com/rock/tools/linux/rkflashkit_0.1.1_all.deb here] or build it yourself with the following command:
+
You can download the pre-built rkflashkit [http://dl.radxa.com/rock/tools/linux/rkflashkit_0.1.1_all.deb here] or build it yourself with the following command:
  
 
     git clone https://github.com/linuxerwang/rkflashkit  
 
     git clone https://github.com/linuxerwang/rkflashkit  
Line 153: Line 147:
 
     ./waf debian  
 
     ./waf debian  
  
Install it with the following command
+
And install it with the following command
  
 
     sudo apt-get install python-gtk2  
 
     sudo apt-get install python-gtk2  
Line 162: Line 156:
 
     sudo rkflashkit
 
     sudo rkflashkit
  
You can see the interface like this:
+
You can see the interface looks like this:
  
 
[[File:rkflashkit1.png| 600px]]
 
[[File:rkflashkit1.png| 600px]]
  
Connect the radxa rock board and the pc/laptop, let the board go to [[rock/recovery mode]], you can see the the program detects the board in recovery mode.  
+
Connect the Radxa Rock board to the computer and let the board go into [[rock/recovery mode]] you will then see the the program detect the board in recovery mode.  
  
# Click the Nand partition, you will see the partitions of the board listed, choose the one you want to flash.  
+
# Click the Nand partition and you will see the partitions of the board listed then choose the one you want to flash.  
 
# Choose the location of the image you want to flash to that partition.  
 
# Choose the location of the image you want to flash to that partition.  
# Click "Flash image" button, it will start flashing
+
# Click the "Flash image" button and it will start flashing
# After done, click "Reboot Device" to reboot the board.
+
# After it's finished click "Reboot Device" button to reboot the board.
  
  
 
[[File:rkflashkit2.png| 500px]] [[File:rkflashkit3.png| 500px]]
 
[[File:rkflashkit2.png| 500px]] [[File:rkflashkit3.png| 500px]]

Revision as of 00:00, 22 January 2014

This page describes how to install an image to the nand flash of Radxa Rock, ie, how to flash the board. You can choose to either flash the whole image (ie, update.img) to the board or just flash the selected partitions. You can download the prebuilt images from our server or build your own images.

Before you start

Keep in mind that:

   You can always flash the rock, it never bricks (as the name :)) unless some hardware damage occurs.

What you will need to flash the board is:

  • a Radxa Rock board (full or lite version)
  • a PC running Windows (XP 32/64bit, Windows 7 32/64 bit) or Linux (32/64bit)
  • a micro USB cable with one side plugged in to the OTG port of Radxa Rock and the other side plugged into the USB port on PC.

Windows

The Windows tool for flashing the image is provided by Rockchip. To flash the update.img, you need to use the RKBatchTool and to flash the partitions, you will need to use RKDevelopTool. Both RKBatchTool and RKDevelopTool rely on the RK USB driver so you will need to install it first as below:

Install driver

There two ways to install the driver under Windows:

  1. install using RKDriverAssistant tools - the easy way
  2. install manually

If you have already installed the USB driver please skip this step.

Install using RK Driver Assistant tools

There’s no need to connect your Rockchip device during this procedure just download and extract RKDriverAssistant.zip Then double click on DriverInstall.exe in the RKDriverAssistant directory to start the utility. If you've previously tried to install the Rockchip USB drivers for any Rockchip devices make sure you click “Uninstall Driver” first.

RK Driver Assistant Install Uninstall.jpg

Then click “Install Driver” and when the driver has finish installing then shut down radxa board and connect the Radxa Rock board to your computer and let the board go to recovery mode, then your computer will detect the board and you will see it within device manager.

RK Driver Assistant Install Usb driver.png

Now the driver should have been installed successfully!

Install Manually

Download the file (usb_driver_v3.5.zip) from here and shut down the Radxa Rock board then connect the Radxa Rock board to the computer and let the board go to recovery mode. After your computer should detect the board and you will see an unknown device within device manager.

Flash image 1.jpg

Select the Unknown device then right click and select "Update Driver Software".


Flash image 2.jpg

Select "Browse the computer for driver software".

Flash image 2.5.jpg

Find the file unzipped file you downloaded earlier (usb_driver_v3.5.zip) and select either the 32/64bit folder then click "OK" to install.

Flash image 3.jpg

When the driver is installed successful you will then see a Rockusb Device in the device manager window.

Flash image 6.jpg

Now the driver is installed successfully.

Flash Image

There are two methods to flash an image.

  1. use RKBatchTool (Factory upgrading firmware tool, flash update.img only, it will erase everything.)
  2. use RKAndroidTool (Development tool, can flash by partitions)


Using RKBatchTool to flash update.img

Download RKBatchTool from here. Then unzip it and double click RKBatchTool.exe, you will now see the interface as follows:

Flash image 7.jpg

Select an image (rockdev/update.img). For information on how to make an update.img see update.img
Flash image 8.jpg

Power down the Radxa Rock board and connect the Radxa Rock board to the computer then let the board go to rock/recovery mode after the program should detect the device.
Flash image 9.jpg

Click the "Upgrade" button to begin flashing and when the flashing process finishes successfully you will see the following interface.
Flash image 10.jpg

If the flashing has aborted ,it could possibly be an error with the update.img, you can either try to redo the operations above or make the update.img again!

Using RKAndroidTool to falsh image by selection

Download RKAndroidTools from here. Unzip it the file and double click RKAndroidTool.exe, you will then see the interface as follows:

Rkandroidtool flash image 1.png

Power down the Radxa Rock board and connect the Radxa Rock board to the computer and let the board go to rock/recovery mode then the program will detect it.

Rkandroidtool flash image 2.png

There are eight selections to choose from so select the correct row and then select the checkbox to the left of the row to select it. After you must click the column on the right side for the path of the file you want to flash. You can then select one or more files and flash them at once. Finally Click "Run" to flash images to the device (the right most selection shows the log of the progress).

Rkandroidtool flash image 3.png

Rkandroidtool flash image 4.png

If successful the board will disconnect from the tool and boot into the system.

Please Note:

  1. The kernel is contained within the boot.img when you package the image by "./mkimage.sh ota" please see Rock/Android_Build for more information.
  2. you can flash one of more image at one time as needed

Troubleshooting

RKBatchTool can not recognize the board

1.Recovery mode : USB device HW: VID_2207&PID_310B
2.Boot into Android: USB device HW: VID_2207&PID_0006

For Recovery mode
I have use manual install within recovery mode for PID_310B. The "Rockusb device" driver installed successfully on Vista but the RKBatchTool can not connect to the RK3188 board for img flashing.

For Recovery mode cannot connect issue [Solved]
Root Cause: RK3188 board is connected to laptop via USB 3.0 PMMCIA card. It's a USB2.0 to USB3.0 compatibility issue so switch USB 3.0 port to a USB 2.0 then the RKBatchTool should connect to the RK3188 board for img flashing.

Linux

Rockchip has provided tools for upgrading within Linux (closed source) since Android 4.4. The initial RE work of the Rockchip bootloader updating protocol is by naobsd and has been improved by some in rkflashtool. linuxerwang has made a GUI version of the rkflashtool called rkflashkit. Please note: both rkflashtool and rkflashkit can not flash the rock/update.img and can only flash within rock/bootloader mode and not rock/mask rom mode because the rock/mask rom updating protocol is not RE yet. If you are interested in the RE protocol ping naobsd at #radxa on IRC. Since the rock/bootloader has remained unchanged for a long time it's enough for normal usage.

Flash update.img

Download the Rockchip linux upgrade tool here. Unzip it and you will get a file called upgrade_tool which is a binary executable file under Linux.

Let the board go to rock/recovery mode and run the following command to flash the rock/update.img:

   sudo ./upgrade_tool uf  /path/to/update.img          #(UF Upgrade Flash)

If you have an error with upgrading you can low level format the nand flash first with the following command:

   sudo ./upgrade_tool lf       #(LF Lowlevel Format)

There are other commands in the upgrade_tool, such as:

   UL: upgrade the loader
   EF: erease the nand flash

Flash by partitions with GUI

You can download the pre-built rkflashkit here or build it yourself with the following command:

   git clone https://github.com/linuxerwang/rkflashkit 
   cd rkflashkit 
   ./waf debian 

And install it with the following command

   sudo apt-get install python-gtk2 
   sudo dpkg -i rkflashkit_0.1.1_all.deb

Run it with the following command

   sudo rkflashkit

You can see the interface looks like this:

Rkflashkit1.png

Connect the Radxa Rock board to the computer and let the board go into rock/recovery mode you will then see the the program detect the board in recovery mode.

  1. Click the Nand partition and you will see the partitions of the board listed then choose the one you want to flash.
  2. Choose the location of the image you want to flash to that partition.
  3. Click the "Flash image" button and it will start flashing
  4. After it's finished click "Reboot Device" button to reboot the board.


Rkflashkit2.png Rkflashkit3.png