Difference between revisions of "Rock/flash the image"
(→Before started) |
(→Before started) |
||
Line 4: | Line 4: | ||
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 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. | ||
− | == Before | + | == Before you start == |
Keep in mind that: | Keep in mind that: |
Revision as of 17:42, 21 January 2014
Contents
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, update.img) to the board or just flashing 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.
What you need to flash the board is:
- a radxa rock board(full version or lite version)
- a desktop/laptop 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
Windows
The Windows tool of flashing the image is provided by rockchip. To flash the update.img, you need to use RKBatchTool, to flash the partitions, you need to use RKDevelopTool. Both RKBatchTool and RKDeveopTool rely on the RK USB driver. You need to install it first as below:
Install driver
There two ways to install the driver under Windows:
- install by RK_DriverAssitant tools - the easy way
- install manually
If you have installed the usb driver, skip this step.
Install by RK_DriverAssitant tools
There’s no need to connect your Rockchip device during this procedure. Download and extract RK_DriverAssitant.zip 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
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 recovery mode,then your pc/laptop will detect the board,and will see
Now the driver is OK!
Install manually
Download the file (usb_driver_v3.5.zip) from here Shut down radxa board, Connect the radxa rock board and the pc/laptop, let the board go to recovery mode,then your pc/laptop will detect the board,you will see an Unknown device in the Computer Management
Select the UnKnown device , right click and select "Update Driver Software"
Select "Browse the computer for driver software"
Find the file unziped from you just downloaded(usb_driver_v3.5.zip) ,select the right file folder Click "OK" to install
When driver is installed successful, you will see a Rockusb Device in the Computer Management window.
Now the driver is installed successfully.
Flash Image
There are two methods
- use RKBatchTool (Factory upgrading firmware tool, flash update.img only, it will erase everything.)
- use RKAndroidTool (Development tool, can flash by partitions)
Using RKBatchTool to flash update.img
Download RKBatchTool from here. Unzip it, double click RKBatchTool.exe, you will see the interface as follow:
Select the image(rockdev/update.img ) About how to make the update.img see update.img
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
Click the "Upgrade" to begin flashing. when flashing finishes successfully ,you will see the follow interface
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 !
Using RKAndroidTool to falsh image by selection
Down RKAndroidTool from here.Unzip it,double click RKAndroidTool.exe you will see the interface as follow:
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
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
If success, the board will disconnect with the tool and boot system !
Note:
- Kernel is contained in boot.img when you package the image by "./mkimage.sh ota" you can see Rock/Android_Build
- you can flash one of more image at one time as you need
Trouble shooting
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 manually install on Recovery mode for PID_310B. The "Rockusb device" driver install successfully on Vista But, RKBatchTool can not connect my RK3188 board for img flashing.
For Recovery mode connect issue [Solved] RootCause: RK3188 board connect to laptop USB3.0 PMMCIA card. It's USB2.0 to USB3.0 compatibility issue. When I change USB2.0 to USB2.0, the RKBatchTool can connect my RK3188 board for img flashing.
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.
Flash update.img
Download the rockchip linux upgrade tool here. Unzip it, you will get upgrade_tool, it's 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 error with the upgrading, you can low level format the nand flash first with following command:
sudo ./upgrade_tool lf #(LF Lowlevel Format)
There are other command of the upgrade_tool, such as:
UL: upgrade the loader EF: erease the nand flash
Flash by partitions with GUI
You can download the prebuilt rkflashkit here or build it yourself with the following command:
git clone https://github.com/linuxerwang/rkflashkit cd rkflashkit ./waf debian
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 like this:
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.
- Click the Nand partition, you will see the partitions of the board listed, choose the one you want to flash.
- Choose the location of the image you want to flash to that partition.
- Click "Flash image" button, it will start flashing
- After done, click "Reboot Device" to reboot the board.